Commit Graph

37 Commits

Author SHA1 Message Date
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
Narsinga Rao Chella d06b0984b4 hal: fix Rx path mute issue during incall recording
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
2014-11-21 16:20:39 -08:00
Ravi Kumar Alamanda be149396ca hal: use consistent in call indication
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
2014-10-21 15:51:14 -07:00
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
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
Linux Build Service Account 1697c95a6c Merge "hal: avoid usage of extern functions and tables" 2014-08-27 01:57:25 -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 8d931f0b7c hal: fix to set tty mode properly
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
2014-08-13 12:09:03 -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
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 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
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
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
Helen Zeng 6a16ad7ed0 hal: add support for I2S based external modem
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
2014-03-03 14:16:24 -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 d3072b6915 Merge "hal: fix incorrectly updated copyrights for source files" 2014-01-13 23:12:43 -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
Helen Zeng e56b485b7a hal: Use compress audio for incall recording with AMR WB
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
2013-12-05 12:14:55 -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
Kiran Kandi de144c8495 hal: notify listen while enabling/disabling snd device
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
2013-11-21 11:45:19 -08:00
Linux Build Service Account 81d733416c Merge "hal: Fix incall recording with AMR-WB format" 2013-11-20 20:12:35 -08:00
Helen Zeng fe095b41c8 hal: Fix incall recording with AMR-WB format
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
2013-11-20 11:37:53 -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
Linux Build Service Account c497a3ca34 Merge "hal: add voice call support on apq8084" 2013-11-15 03:14:44 -08:00
Vidyakumar Athota d9d9ff34fa hal: add voice call support on apq8084
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
2013-11-13 16:56:22 -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
Kiran Kandi 910e186c70 hal: Enable support for Listen voice wakeup feature
enable the support for Listen voice wakeup feature by loading
listen hal library dynamically.

Change-Id: Ife8e71589620342e21b4c52751466edaccc536ef
2013-11-05 15:35:27 -08:00
Ravi Kumar Alamanda 48c921d4e8 hal: Add support for multiple hardware variants
- 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
2013-11-03 15:44:13 -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
Shruthi Krishna ace1085d17 Merge remote-tracking branch into aosp
audio/hal: Configure HDMI channels based on output stream channels
  hal: Fix for Tx Mute issue when a new call accepted while in call
  Level measurement in offloaded visualizer
  audio: Presentation time enhancements
  implement get_presentation_position() for offloaded outputs
  audio : add new TMUS MCC and MNC list
  audio : add new TMUS MCC and MNC list
  audio : add new TMUS MCC and MNC list
  add offloaded audio visualizer
  audio: compress offload enhancements
  audio: enable AAC offload
  audio: set cached volume before starting voice call
  audio: set cached volume before starting voice call
  Implement HAL API get_presentation_position
  hal: force stop after drain.
  hal: Add support for Tunnel mode audio playback

Conflicts:
	Android.mk
	hal/audio_hw.c
	hal/audio_hw.h
	hal/msm8960/platform.c
	hal/msm8974/platform.c

Change-Id: I0c66fd6bae9b4974e1791f4e848c775d389da3d0
2013-10-25 14:32:12 -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