When aanc is enabled during voice call, TX and RX path mixer
controls are issued back to back, this causes the codec path to be
enabled from TX to RX as the internal loopback for aanc exists. Due
to enabling this path, mute is observed on handset. This issue
is fixed by treating aanc as special usecase and changing the enable
and disable sequence of aanc mixer controls.
Change-Id: I305156cb80e6faf35bd6ab4fc089740ffa847f43
Add device sidetone support for USB ADSP solution if the USB headset
has the sidetone capability.
CRs-Fixed: 1019158
Change-Id: Ie40c286eb9988aeb5093f32c7f81cdb142e88eb6
No audio is observed in voice call scenario since in_call state
is not update when voice usecase is stopped. This results in not
starting voice call usecase when setting up next call.
Fix by setting in_call state as false in voice_stop_usecase(). This
is to ensure that voice usecase is stopped and in_call state is update
properly.
CRs-Fixed: 996510
Change-Id: I480bb14899d678a47df8a61fbdd208b75ef7b395
With CLANG enabled and -Wall & -Werror being set in
LOCAL_CFLAGS, all warnings are treated as errors.
This commit fixes all the warnings most of which are
about unused variables and functions.
Change-Id: I32c6593fa0ad6a4fdca5dc8e6c76982a146a8bc6
- setPhoneState checks call-state in audio hal to filter out
unworthy usage of this API.
- With M upgrade, change to update call-state with audio hal is
removed, instead permission checks are introduced to prevent
random usage of such APIs. But setPhoneState is still checking
for this call-state causing improper concurrency handling.
- Fix the issue by removing state check from setPhoneState.
- Remove set and get for parameter "in_call" from voice_extn.
Change-Id: I92fe10c617d6158976a0e07eed3275acb0aadd15
Sometimes the mode of HAL may be not in AUDIO_MODE_NORMAL while
active call stopped, then it will return with incorrect call state
to APM.
Update the state to false regardless of the HAL mode when active
call stopped.
Change-Id: I8b1c356f65ec273802cda282b1500a3859e837ce
CRs-Fixed: 899756
When sidetone is enabled during voice call, the RX and TX path mixer
controls are issued back to back, this causes the codec path to be
enabled from TX to RX as the internal loopback for sidetone exists. Due
to enabling this path, pop noise is observed on headphones. This issue
is fixed by treating sidetone as special case and changing the enable
and disable sequence of sidetone mixer controls.
CRs-fixed: 839663
Change-Id: I7aea55af963cf939286e5b349ff25fd783314679
When sidetone is enabled during voice call, the RX and TX path mixer
controls are issued back to back, this causes the codec path to be
enabled from TX to RX as the internal loopback for sidetone exists. Due
to enabling this path, pop noise is observed on headphones. This issue
is fixed by treating sidetone as special case and changing the enable
and disable sequence of sidetone mixer controls.
CRs-fixed: 839663
Change-Id: I7aea55af963cf939286e5b349ff25fd783314679
Sometimes ANR is observed, if In-call recording is started at the
end of voice call.
Incorrect use case "afe-proxy-record" is being picked up in this
case as voice call is not active by the time audio HAL starts
the input stream, thus resulting in pcm device open failures.
Fix this by rejecting start input request if voice call is not
active by the time input is started.
CRs-Fixed: 810997
Change-Id: I8a9d0789cf37f5523de5d1da5e9fda59198eb901
Incall recording usecase should select non-fluence
device in audio path to avoid recorded data from
getting cancelled in audio path when fluence is
enabled.
Fix by adding missing break for the case statements.
Change-Id: I3832013423956683f403c8322d0547325c336c73
When speaker protection is turned on input stream can be
NULL. Add a check to fix de-referencing NULL pointer.
Change-Id: I75647d9360a559b5255c29d0baca264b1274eba2
The Audio COPP topology is hard coded to NULL topology in kernel
for incall recording stream. Remove the hard coding in kernel and
send default input device's audio calibration from audio hal
so that AUDIO_TX_MONO_COPP topology will be used for incall
recording stream.
This change is needed to be able to fine tune audio calibration
data for incall recording stream.
Change-Id: I1680731afb0c0e1c1eedbc9afd56064d856e3940
When MULTI_VOICE_SESSIONS feature flag is not enabled, the state of
incall recording stream is returned incorrectly. Fix the issue by
moving the corresponding piece of code from voice_extn.c to voice.c.
Change-Id: Id350bad65d12a4f165e80ee11cda3a8f342d38ee
Use voice_is_in_call() instead of mode == MODE_IN_CALL
as a valid indication that we are in call to choose sound
devices.
Change-Id: Iefa968ee463d4ade6c7d09626be667faab6eda98
Add support for routing voice calls to devices in other audio
HALs by allowing playback and capture to/from AFE proxy
Change-Id: I2c6a1ddec072e1d5f1a8b7ded874e9c082a7b810
Fix unused param warnings.
Take care of coding style issues.
Remove unwanted code to set acdb_settings.
Fix compilation issues on 8960 platform.
Change-Id: Ifc72472b487abee83ff85e21fd324cee938973e9
If there is any difference in the signature of a function declared
as extern, it will not be reported by the compiler and may result
in unexpected results when executed.
All the API functions should be declared in a header file.
Change-Id: I89662e23da8118c3a9eac728b389498ed52e19c2
If set parameters API called with key "tty_mode" and
MULTI_VOICE_SESSION_ENABLED flag is not enabled then tty mode is
not executed because voice_extn_set_parameters returns error(-ENOSYS).
Fix by ignore -ENOSYS return code for voice_extn_set_parameters
and voice_extn_compress_voip_set_parameters.
Change-Id: Id2308b2218fdf74e420ecbe25eeadd49756494f1
adev->voice_device_set flag is to indicate voice call
device routing update from policymanager to HAL. It is
set to true in voice_start_call and reset in update_calls()
which causes mismatch in flag update during back to back
voice calls scenario. Update adev->voice_device_set flag
in voice_stop_call instead of update_calls(). Rename
voice_device_set flag to in_call for readability.
Change-Id: Ie07105671f254899890bdb4c0635c7dc1f55dbff
- All VoIP, compress, deep buffer, record usecases need to close
before voice call setup and don't allow these usecases during
voice call on 8916.
- setMode(IN_CALL) itself is not sufficient to know if we are
in actual voice call.
- Add keyvalue parameters support to know if we are in voice call
and policy hal can query the same and make decissions based on it.
CRs-Fixed: 662804
Change-Id: I20d660fadd07c4d227a7e3dfe356fc39806ca167
- Unable to apply the mute in MT SIP call during Voice call
in CALL_HOLD.
- Mute is only applied if the voice call state is INACTIVE.
Thus when SIP call is made during Voice call in CALL_HOLD,
the mute is not being reflected.
- Fix this issue by checking voice stream type to allow
the mute to be applied.
Change-Id: I3af5225edd8e9a4123867b647de9405d5c4b9efc
CRs-Fixed: 642893
Remove update_mixer (as its unused) and change function signatures
wherever used.
Remove code chunk to set BT sample rate before enabling device as
thats part of the mixer path file now.
Change-Id: I5eb3bce5183acf505596be2b0ec93cdbd728bdaa
CRs-Fixed: 581453
Update devices for Voice2, VoLTE and QCHAT sessions
based on the TTY mode. This change is needed to support
enabling/disabling and switching TTY mode during
voice call.
Change-Id: I4f1fde8ce6b20fad0d24e0cd963e2c3709ff25d5
CRs-fixed: 608183
There are specific xml files used for I2S based external modem.
Add check to load the correct xml file.
For I2S based external modem, voice sample rate can be 8k or
16k based on vocoder type. Call csd client api to get the
correct sample rate to configure voice call.
Change-Id: Ie9799336620f49a890355be74fe1830eb348cabe
String returned from str_parms_to_str for set/get parameter in
debug logs is not de-allocated. Fix is to make sure the memory
allocated for set parameter key value pair is de-allocated.
CRs-Fixed: 610079
Change-Id: I5027d8f1741c9e7223e7b4721f8d5473404998d3
HAL doesnt let voice calls start if the device is set to speaker
as voice calls generally start on devices other than speaker.
However QCHAT calls start by calling setForceUse and setting the
device to speaker.
Fix by updating a flag whenever device routing happens when
AUDIO_MODE_IN_CALL. Reset the flag when mode is AUDIO_MODE_NORMAL.
CRs-fixed: 596074
Change-Id: I546959d2b0123828562dba1f6439aa494a365c3f
When setparameters() is called and if the known keys are not found,
the implementation returns -2 error.Fix this by setting error only
when keys are found and there is an error while executing corresponding
implemention.
CRs-fixed: 589280
Change-Id: If5544d6fdeac47ddfc1f7e8e18bfa81e2ef5cbc2
- HAL always assumed SOUND_CARD/MIXER_CARD
number to be zero. This could cause HAL
not to load when some other card is
detected earlier to HAL.
- Fix by removing these Macro(s) and reading
correct sound card number runtime while loading
- Corrected its use cases across HAL replacing it
with appropriate platform API
CRs-fixed: 580226
Change-Id: I4512e4a2f7f81d8415c3ba8ec393c96867e6d69a
Currently, AMR WB recording uses tunnel mode instead of
software encoding. Update audio hal to use compress audio
path to do incall recording with AMR WB format.
Change-Id: I93deb3dbc7dcd6a8d2b178334f8b43117ee6841c
CRs-Fixed: 581298
-In-call recording feature support is added in APQ.
-In-call music delivery support is added in APQ.
Change-Id: Id473eac87da33f1f566b6910ec1feadcd3f08317
Listen needs be stopped when audio capture is active. Also
Listen needs to be started again after audio capture becomes
inactive. Stop and start listen based on audio capture device.
Change-Id: I05ca7cccd59b43a163604881bd9c6ee10cc8fba3
Depends-on: 510494
Select AMR-WB and start incall recording, the audio quality is bad.
The root cause is that the sample rate is set to 8k not 16k for AMR-WB.
Use audio record configure instead of voice configure for incall recording.
Change-Id: Ib71e0e8d1f2c5eb72db3260110e55179e415fa26
CRs-Fixed: 576412
APQ8084 uses external modem to make voice calls.
APQ uses CSD QMI interface to communicate with external
modem. Add csd client apis to support voice calls
Change-Id: I11fe0cc614ee38c42e95b40d5cd5e2d8b3afd43a
Telephony will call set_mode(AUDIO_MODE_NORMAL) when a
call is ended which will trigger audio policy manager setting
routing with audio usecase compatible device. Voice calls can
still be active if RIL has not yet called
setparameters(vsid,callstate). This would result in routing
voice call usecases with incompatible device for voice calls.
Fix this by ending all voice calls when set_mode(MODE_NORMAL)
is called.
Change-Id: Id2c9f2ff9ed46969e5cbd27b525b81735c1d49d8
- Most of the targets supports multiple hardware variants such as
MTP, CDP, Fluid, Liquid etc. The mixer paths for certain devices
may vary on some of the variants. For example, the mixer controls
for speaker device are different on msm8974 MTP and Fluid variants.
- Update audio HAL to select corresponding entry in the
mixer_paths.xml file based on HW information.
Change-Id: I060f2e6c331344dd41417c19fb688ff27a129308
Conflicts:
hal/Android.mk