Commit Graph

42 Commits

Author SHA1 Message Date
Ravi Kumar Alamanda 060bc5a327 hal: add support to send/receive voice call TX/RX audio
Add support for routing voice calls to devices in other audio
HALs by allowing playback and capture to/from AFE proxy

Change-Id: I2c6a1ddec072e1d5f1a8b7ded874e9c082a7b810
2014-10-17 09:57:20 -07:00
Venkata Narendra Kumar Gutta 6b5e728e55 hal: properly reset sample rate of VoIP data
During skype call if headset is inserted next voip
input request is failed.
VoIP data sample rate is not being reset properly is
causing the aforementioned issue.

CRs-Fixed: 725583
Change-Id: I9f85936aec0caeaf53b9aeff93a481fd38afe3ff
2014-09-22 06:44:19 -07:00
Linux Build Service Account b5b2cb4308 Merge "hal: fix unused param warnings" 2014-09-20 07:35:53 -07: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
kunleiz f266f48890 hal: Update active input stream for Voip when voip input started
When voip input started, active input stream is not updated.
Therefore, as active input stream is NULL no tx device switch
occurs for a voip call with primary output.

Fixed this by updating active input stream for voip when
voip input started.

Change-Id: I058bfaa0091eea4a0259224de17be32f271dbdc9
CRs-Fixed: 710923
2014-09-16 23:24:29 -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
Mingming Yin 2d8aa2e3dc hal: NULL pointer check before using audio_usecase
- Add check for NULL pointer before using audio_usecase

Change-Id: Iaedd7b1dfbcf727957f6b19a54199d29afa25703
2014-08-14 14:07:36 -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
Linux Build Service Account 132d8fc6b3 Merge "hal: miscellaneous fixes" 2014-08-05 13:53:57 -07:00
Linux Build Service Account 2fcabb355a Merge "hal: add DSDA support on APQ targets" 2014-08-05 00:14:22 -07:00
Haynes Mathew George b51ceb1e78 hal: miscellaneous fixes
Fixes for the following issues reported by KW

21725, 21726, 21727, 21737, 21738, 21739, 21740, 21750,
21751, 21752, 25317, 30602, 32620, 36778, 41817, 41819,
50942, 54468, 54470, 54479, 55569, 54481, 55570, 55571,
58485, 85112, 85122, 85123

Change-Id: I9abef07db7ccdc19789a201eb268a97e1b360cad
2014-07-31 08:17:03 -07:00
Venkata Narendra Kumar Gutta ed0f94ff0a hal: Enhance VoIP call auto recovery if SSR occurs during call
Enhance support for VoIP auto recovery if SSR occurs during
the VoIP call.

Change-Id: Id69cb9d17fc78fd98754b19bf84539290ff54cd9
2014-07-31 08:11:17 -07:00
Venkata Narendra Kumar Gutta bc9c9ca6b0 hal: VoIP call auto recovery if SSR happens during call
Add support for VoIP call auto recovery if subsystem
restart(SSR) happens during VoIP call.

Change-Id: I5617c22b79548de668b28a97c116008e7c704dee
2014-07-31 08:10:50 -07:00
Vidyakumar Athota 21b3bb9608 hal: add DSDA support on APQ targets
-This change adds DSDA support for APQ based targets
 where external modem is used for voice calls.
-Add new CSD API to support local call hold.

Change-Id: I7743a1df43dc1abac4e325ff104ec1bb64c9e12b
2014-07-29 17:08:28 -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
Linux Build Service Account d72dde4c99 Merge "hal: fix for voice + voip call concurrency" 2014-05-14 14:44:31 -07:00
Vidyakumar Athota cdce407b03 hal: fix for voice + voip call concurrency
-When voice call interrups ongoing voip call, voip call goes
 to hold state and voice call becomes active. During voice call end
 stop_call is not being called because mode is not set to MODE_NORMAL.
 Voip call becomes active and mode is set to MODE_IN_COMMUNICATION
 after voice call end.
-Fix this issue by removing the dependency on MODE_NORMAL to end
 voice call.

Change-Id: I0103f5c6833fb929cb7975f838bc2c5ec4d94313
CRs-Fixed: 633437
2014-05-06 10:13:44 -07:00
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
Haynes Mathew George 1376ca60d8 audio: Remove unused var and unnecessary code
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
2014-04-29 14:54:21 -07:00
Mingming Yin 67e34518ac hal: add missing flags for extended features
- add missing feature flags and definitions
  to compile hal without extended features
  enabled.

Change-Id: I8c04ae54e6597ed43de60b2d01ca333070aef675
2014-04-23 16:41:03 -07:00
Shiv Maliyappanahalli c6fd8eedbf hal: add support for device mute
Add support for muting the RX and TX devices without affecting
the voice stream. This feature is added to enable voice call
quality testing by carriers.

Change-Id: I4d0f599e44ae24ce02d29333f496ef18f889ac55
2014-03-12 15:00:57 -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
Narsinga Rao Chella 7d5a3e8ffe hal: start voip driver independent of voip output stream
- Voip driver requires voip output stream to be opened
to start itself. But it is possible that some applications
may use voip input and normal audio output. Code changes are
done to handle this scenario.
- It is possible that some applications may use different
sample rates for voip input and voip output streams. It is
handled now in such a way that, if the sample rate of the
secondly opening stream does not match with that of the
first one, the second stream will not be allowed to open
voice path for VoIP.

Change-Id: Id9d86181eeee2c4ea0aa49a723ca92c1961a559b
CRs-fixed: 601785
2014-02-10 15:48:10 -08:00
Krishnankutty Kolathappilly 061a9499e2 hal: Fix memory leak in HAL debug logs
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
2014-02-03 15:19:05 -08:00
Linux Build Service Account 60d65d1d29 Merge "hal: add support for voip_out_stream_count key in get_parameters" 2014-01-14 17:59:42 -08:00
Narsinga Rao Chella 7a9e59d8ed hal: Fix compilation issue seen when a feature flag is defined
This change is needed to fix a compilation warning in Compress VoIP
code when the feature flag "AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS"
is defined.

Change-Id: Ie19f542dc71705bc27a7278c83236904782f3a5e
CRs-Fixed: 590219
2014-01-14 09:39:46 -08:00
Linux Build Service Account d3072b6915 Merge "hal: fix incorrectly updated copyrights for source files" 2014-01-13 23:12:43 -08:00
Narsinga Rao Chella 707e751813 hal: add support for voip_out_stream_count key in get_parameters
Add support for voip_out_stream_count in get_parameters which
will be queried by Audio Track to decide whether to open direct
output or not in case of VoIP.

Change-Id: Ic0d058dff32d9002cd452689636f342e748a7fe5
2014-01-10 17:05:56 -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 8911f28005 hal: fix incorrectly updated copyrights for source files
Fix incorrectly updated copyrights for source files.

Change-Id: If321f8fb0489f3088e867d4f200c6d1581ed9f57
2014-01-10 15:56:19 -08:00
Shiv Maliyappanahalli 3e064fdd0f hal: fix set_parameter() returning -2 error
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
2014-01-02 10:53:12 -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
Apoorv Raghuvanshi 84fa2fe20e hal: Detect sound card dynamically
- 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
2013-12-17 12:29:42 -08:00
Linux Build Service Account 2d74b27e35 Merge "hal: Fix voice calls starting on speaker unintendedly" 2013-12-05 01:20:44 -08:00
Narsinga Rao Chella 1eceff805c hal: Fix framesize issue for compress VoIP
- Correct the framesize for 16KHz VoIP use cases
- Add proper checks to enable compress VoIP use case
- Add get_parameters() support to query audio mode

Change-Id: I470d538f1e136780264e81b509fb439baead603d
2013-12-03 20:39:44 -08:00
Narsinga Rao Chella 05573b74bf hal: Add support for compressed voip
Add support to enable voip calls using compressed
audio formats.

Change-Id: If20493b75befbcc56945e4309c8f01384948a7b5
2013-11-18 14:47:49 -08:00
Shiv Maliyappanahalli 7a2545c8b3 hal: Fix voice calls starting on speaker unintendedly
If setParameters(vsid, callstate) call is processed before
setparameter(routing), voice calls will be started on speaker.
Fix by not starting voice calls by checking if the primary output
device is speaker.

Change-Id: If3ecb83bbcb02d5da40d66340276263413adabc9
2013-11-11 14:59:08 -08:00
Shiv Maliyappanahalli 3bb7358558 hal: end all calls when setmode(AUDIO_MODE_NORMAL) is called
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
2013-11-11 13:36:11 -08:00
Shiv Maliyappanahalli 303f51dd95 hal: compile voice extensions based on board config flag
Compile voice extensions based on the flag
AUDIO_FEATURE_DISABLED_MULTI_VOICE_SESSIONS defined
in BoardConfigVendor.mk.

Change-Id: I06c42bf4b79294fed2077c1d2771ed155f68de00
2013-10-28 16:29:12 -07: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