In order to activate proprietary sound pre- and post-processing,
the following parts of audio HAL were revised:
* Activated ENABLE_PREPROCESSING directive in Android.mk
* Removed unused variables and functions
* Re-written set_preprocessor_echo_delay() function
Change-Id: I868087f422764895df7d2bc6bbf4bbd76672b8e7
This commit cause bug - no sound after end voice call when
using speaker. Sound come back after audioflinger send
standby and hal reenable speaker for new stream (usecase).
Reason - hal need reenable speaker (or other devices) for
other streams (usecases).
This reverts commit f33a728b205f7656ca6211a07e3dd69c623b75ca.
Change-Id: Icde4e83ab824008e931b681cdbb6e11d6a2a7aa5
Use AUDIO_DEVICE_OUT_BLUETOOTH_SCO
AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET and
AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT
and not only AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET for voice calls.
Remove default voice_mic for sco devices - why we need default mic
for sco output devices if now we handle all sco output devices.
Change-Id: Ibf4eb42eebcf7dc229649d8afe6e8b3ea9354165
Myabe this related to htc flounder hw but this
not needed for samsung and this cause bug when
hal trying open bt pcm device for system sounds
while voice call active on sco and bt pcm device
opened with start_voice_session_bt_sco.
Change-Id: I75482dad42feccae5e8ca9df2623ef4693a7bdb0
Add check_and_route_usecases -
this function is to make sure that all the usecases that are active on
the hardware codec backend are always routed to any one device that is
handled by the hardware codec.
Example:
When voice call starting - we need earpice -
hal enable earpice, but befor - we put call button -
and hal enable speaker and play sound - "click"
And now we have speaker and earpice enabled.
Later when audioflinger send standby (default after 3 sec) to stream
which use speaker - hal disable speaker while voice call active - and
we have no sound in earpice.
check_and_route_usecases will not allow such situations.
Change-Id: Ibc534bb14c25e4a4ffb4f3487d1424e9e1ed6a67
This never use - because -
out->sample_rate and out->config configured in adev_open_output_stream
out->config = can have deep or no pcm config with only 48000 sample rate.
Change-Id: Ie1c4025585ab6e1b7a900486181c1bceeff88139
Current get_pcm_device return always first finded pcm_profile.
And out->pcm_dev_list always have only pcm_device_playback pcm_profiles.
But if we need use deep_buffer pcm device
we need use deep_bufer pcm_config - current hal
don't did this...
And we configure out->config in adev_open_output_stream
function with proper pcm_config (deep or no).
Change-Id: I86fdb18202afb0e83393f32830d57c929f174ae6
(cherry picked from commit 39d1d019965d04ddfad2c643de53cd5501803aa4)
On some devices, certain input and output mixer controls share the same
endpoint, which means that if an input stream is disabled (and the mixer
is updated), that shared endpoint may be disabled as well.
This would result in no audio, because no one is aware that the output
stream in fact does still need the shared endpoint to be enabled.
We prevent this by enabling the output mixers after disabling input mixers,
if any.
Change-Id: I4d80fcd0648a11099f27177da3cd29095b6a8c34
(cherry picked from commit 507e8ce5bffb36fae8b1cd4e5498fa19a6273ee6)
This should now support both old and new headsets,
as we rely on codec negotiation in the bluetooth
stack for narrow/wide band switching.
Change-Id: Ie9d308dfc55726fd1591a7d158f610bd267340e6
(cherry picked from commit d462f7b86e957f858959ef5d80fd1744689ee6ea)
Previously, we would only end the voice call once the next output
stream happened (and parameters would be set).
Change-Id: Id0d2711605e57ad69d9b26b36afb562444349358
(cherry picked from commit 5169e86c10b7429b01d6ab0500a0509141dcbfe1)
The whole code block was no-op, since we would override
(in|out)_snd_device at a later point anyways.
Change-Id: Ieb2b0918c9c72f18d195d6b34b5c9768fce130b3
(cherry picked from commit f33a728b205f7656ca6211a07e3dd69c623b75ca)
When we change the device during a phone call we need to completely
restart it. This is required by the modem.
Change-Id: I902c78bf50dfb5dc3da51fca0fb862f872df86ca
* if (usecase == NULL) should actually be if (vc_usecase == NULL)
* Avoid unnecessary if-block indentation by updating the control
flow
Change-Id: If00ac405a1eac429862b953580e8614227015134
* abs() accepts ints as parameters,
but this breaks compile since
the times are longs, not ints
* Use labs() instead, which accepts
longs as parameters, to fix compile
Change-Id: I8f980a78380cdae18abd5b9602e281beae3ee4d3
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
We have a value for SND_DEVICE_NONE so we should use that. There is no
field for SND_DEVICE_MIN so we need to check it is bigger.
Change-Id: I041930c8c4b552d45804a178aeb1aa981ae7c13f
When a voice call is stopped we switch back to the default primary
output (speaker). Then this function gets executed and as ther was
no active PCM because voice_session is handling that it segfaults
because the PCM is NULL.
Change-Id: I927504b7962b096c0d4c3642b48aee55c85ec013
The unused functions have just been commented out.
This also sets the CFLAGS to -Wall and -Werror.
Change-Id: Iea097426313a68a01a074627115853fccc680579
We want that to avoid an error message in the log, so revert the
revomal.
This reverts commit cdad20da45.
Change-Id: Ic90cd6b02e5b3e8aae73d824153c3084643a8acc
This just allocates the structre and creates the RIL connection. This is
per audio_device structure to make sure we to not run into issues with
audioserver threading.
Change-Id: I42e1b7ae57579f39c5f76566ef5b67d4e2c13e3f