Commit Graph

24 Commits

Author SHA1 Message Date
Kunlei Zhang a3b3abfa32 hal: fix voip device selection is not proper after voice call stop
In voip+voice concurrency case, when voip resume after voice call stop,
voip device still uses voice devices. This is due to in_call flag isn't
reset even if voice usecase doesn't exist.

Fix it by adding function to check voice usecase existence and get
correct device for non-voice usecases.

Change-Id: I39ba1092a0ab19c686baa1b80bb9913f64849590
2019-06-26 16:07:54 +08:00
Arun Mirpuri b1bec9c80b hal: enable dynamic audio HAL feature extensions
Move audio and voice extension feature to seperate
dynamic libraries. Loading these libraries will be
controlled from config store based on target. These
flags can be changed at runtime

Change-Id: I042450768243124ea80945efac0821984f96b9bf
2019-01-30 17:36:06 -08:00
Aalique Grahame 22e4910d3d audio: unify hal
Unify audio hal components

CRs-Fixed: 2380934
Change-Id: Iacafdc44d935de5f343240421a1572a0a3241bd0
2019-01-25 15:15:46 +05:30
Divya Narayanan Poojary 85d0a59463 hal: Fixed incall recording backend ids
During in call recording, input device is same as that of voice
use case but the backend used in routing driver is different.
Due to mismatch of backend ids, Wrong acdb id and app type are
being set in routing driver when adm port is opened.

Defined new devices for in call recording and used the new devices
to retrive the backend ids.

CRs-Fixed: 2183315
Change-Id: I278996185badad640e16f60730176916d81e3626
2018-09-20 14:55:00 +08:00
Arun Mirpuri ef53ce51ee hal: Fix in call music stream muted issue when mic is muted
Fix in-call music stream mute issue when mic is muted within
dialer app. Issue is caused due to mute applied on mixed
voice stream containing both Voice Tx and incall music stream.
Solution is to apply mute on voice device as and when mic is
muted and incall music usecase is active. Mute cannot be
always applied on device as comfort noise can only be applied
after Mute in Voice stream leg

CRs-Fixed:2308665
Change-Id: Ibcb0ef45bbe9a4f906f2016aa70aff2e919eca24
2018-09-14 16:49:28 -07:00
Vidyakumar Athota ea269c646d hal: Fix aanc sequence during voice call
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
2016-11-01 16:08:22 -07:00
Alexy Joseph b13799480b hal: Fix warnings in audio HAL and policy
Enable Wall and Werror and fix warnings in
HAL and policy manager

CRs-Fixed: 962049

Change-Id: Ie93c8f933943875ac68e8318d777602ed864f531
2016-03-08 04:50:17 -08:00
Dhananjay Kumar 9125b2a775 policy_hal: fix improper voice-playback concurrency handling
- 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
2015-12-14 04:31:19 -08:00
Bhalchandra Gajare 45fee28d6c hal: Fix sidetone sequence during voice call
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
2015-06-25 16:58:28 -07:00
Vidyakumar Athota 0e1093537b hal: add single session VSID voice call support
With new Voice architecture, a voice session per subscription
will support different call types such as Voice/VoLTE/VoWLAN etc.
These new voice sessions will be tagged with new VSID.

Change-Id: I7e9c90fb3935ebce5ff281f2d1c25c66aa96e55e
2015-04-14 16:11:05 -07:00
Narsinga Rao Chella 212e254a47 hal: use AUDIO_TX_MONO_COPP topology for incall record usecases
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
2014-11-21 22:21:37 -08:00
Ravi Kumar Alamanda bdf1416c29 hal: fix unused param warnings
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
2014-09-18 15:56:42 -07:00
Ravi Kumar Alamanda 263d80ca36 hal: avoid usage of extern functions and tables
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
2014-08-21 10:46:25 -07:00
Vidyakumar Athota ad34d57000 hal: fix voice call device routing issue
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
2014-08-08 16:56:47 -07:00
Venkata Narendra Kumar Gutta 5f64eea499 hal: Enhance voice concurrency support for 8916
- 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
2014-05-29 15:05:25 +05:30
kunleiz c5a639b0ba hal: Fix VoIP Mute failure in SIP call during Voice call HOLD
- 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
2014-05-05 19:31:24 -07:00
Narsinga Rao Chella 22d8d7acd1 hal: apply TTY mode change for all voice use cases
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
2014-03-21 15:32:09 -07:00
Vicky Sehrawat 7e4fc158b3 hal: Add support for VoWLAN feature
Add VoWLAN pcm id, usecase to enable voice
over WLAN feature.

Change-Id: I2d10ff06342bfcbef15a4769ba90deaeb4218107
2014-02-26 22:50:21 -08:00
Shiv Maliyappanahalli 07a9ea232c hal: fix no audio in qchat call with speaker as default device
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
2014-01-10 16:27:18 -08:00
Shiv Maliyappanahalli f93084982f hal: add support for all_call_states key
Add support for all_call_states which can be queried by
applications to know call states.

Change-Id: I5ba66186e9d9f6d5769a814f4c1e0627c6f6dd74
2014-01-02 10:24:37 -08:00
Vidyakumar Athota 2850d5327d hal: In-call recording and In-call music support on APQ targets
-In-call recording feature support is added in APQ.
-In-call music delivery support is added in APQ.

Change-Id: Id473eac87da33f1f566b6910ec1feadcd3f08317
2013-11-22 11:17:57 -08:00
Shiv Maliyappanahalli f3b9a42020 hal: add incall music delivery feature
In multisim scenarios, local call hold tone has to be played
to the uplink on the sub on local call hold. Add incall music
delivery feature so that call hold tones can be played to the
uplink.

Change-Id: I8cecf0139926a4bfee603c02542bbedc67720bf4
2013-10-28 12:45:41 -07:00
Shiv Maliyappanahalli da10764803 audio_hal: add incall recording feature
The uplink, downlink and the combination of both can be
recorded using sound recorder app. Add support for incall
recording feature in audio HAL.

Change-Id: Ia828ab5b3af8044d82b6ef8eb989ae0ba9bbba16
2013-10-21 12:37:25 -07:00
Shiv Maliyappanahalli 34b585f05a audio_hal: Add support for multi voice sessions
Update HAL to add multi SIM voice support. Seperate
out voice features to voice files.

Add getprop/setprop for BT sample rate, Fluence and Slow talk.

Change-Id: Ief61466f78c7b915549981a28fc7ff32731607a5
2013-10-19 00:06:47 -07:00