Commit Graph

217 Commits

Author SHA1 Message Date
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
Mingming Yin 3ee55c65a2 hal: Support for FLAC 24 bit format in offload path
- Add flac in supported codecs list
- Set FLAC codec specific parameters
- Set fragment size based on bit width and sampling rate
  for flac
- Configure backend to 24/16 bit based on the current
  usecases running

Change-Id: If013078e277fd3053fba6489345803f8f58bd86d
2014-08-06 11:42:43 -07:00
Linux Build Service Account 132d8fc6b3 Merge "hal: miscellaneous fixes" 2014-08-05 13:53:57 -07:00
Linux Build Service Account 5bcf706e04 Merge "hal: fix to update voice call devices in apq8084" 2014-08-05 00:14:23 -07:00
Linux Build Service Account 2fcabb355a Merge "hal: add DSDA support on APQ targets" 2014-08-05 00:14:22 -07:00
Vidyakumar Athota 339342fb92 hal: fix to update voice call devices in apq8084
In APQ8084, Audio HAL needs to update voice call rx and tx
devices in csd client before call start otherwise csd client
sends default devices to MDM. Fix to update csd client devices.

Change-Id: I0a5a1689a92475f052d80a92003e3eacb68d2051
2014-08-04 13:28:02 -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
Mingming Yin 514a8bc220 hal: support for wide-band speech audio over BT
- Adding support for WB audio with BT devices
- Deprecate bt_samplrate" keyvalue pair which was
  used earlier to determine wide band speech useCase.

Change-Id: Idc766dc4d8ecf25818f16bccc48c6740b0dfce65
2014-07-30 11:23:21 +05:30
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
Gopikrishnaiah Anandan e85d046e57 hal: Speaker protection pre-emption fixes
Speaker protection module should acquire the device lock for all global
operations. This change will ensure that the pre-conditions required for
calibration will be met and if any audio/voice usecase is started when
speaker calibration is being done,speaker protection thread should
cancel the calibration.

Change-Id: I0d5fa23657161ec971e851944a0045a01d8248ea
CRs-fixed: 688972
2014-07-24 08:19:10 -07:00
Linux Build Service Account 3b402c4b85 Merge "hal: SSR support for compress offload" 2014-07-09 17:16:30 -07:00
Naresh Tanniru d7205b68e6 hal: SSR support for compress offload
- reject offload request based on sound
  card state

Change-Id: I38256ce6163f948a9e9c14cb895de3f71529a0e9
2014-07-08 17:12:26 -07:00
Avinash Vaish 4d6167d205 hal: Permit device switch for primary output in a voip call
The device switch from speaker to earpiece or vice versa fails
during a QQ voip call. Currently, we use the same devices for
all usecases as that of voice/voip call and avoid switching the
same for other usecases when a voip/voice call is active. At
times, voip call has primary output which uses deep buffer path.
With current design in place, we do not permit device switch on
deep buffer path since voip call is active despite the rx on
primary output.
Do not select voip usecase devices if the output stream uses
primary output or in effect permit switching.

Change-Id: Ie61a7d7d8f27d55a393d173a724697045f66e1d6
CRs-Fixed: 685222
2014-07-08 11:44:38 -07:00
Naresh Tanniru 8065983e75 hal: SSR support for compress offload
- add support for time stamp error propagation
  to frameworks on compress driver error

- close active compress session on SSR

Change-Id: I9cbd3a6c271097b81c9b79e71573fda8d78c7dbf
2014-06-27 11:02:18 -07:00
Mingming Yin 07972cc595 hal: add support for pcm_ioctl() api
- Tinyalsa doesn't expose an api to call
  ioctls exposed by the audio drivers.
- Add pcm_ioctl() api to support pcm ioctl.

Change-Id: I448252e8d3347257a73c56bc8ed341abc2dd2dab
2014-06-16 11:42:12 -07:00
Dhananjay Kumar 45b71743aa hal: Add support for listen playback concurrency
Add support for concurrency handling between number of
listen capture session and playback activity.

Change-Id: I4a0656f240c62f2cc6266a714a96fdcdc13ae9d8
2014-06-06 23:35:16 +05:30
Linux Build Service Account e940215ed3 Merge "hal: Fix 64 bit compilation errors" 2014-06-03 12:09:26 -07:00
Linux Build Service Account 2ee2f60d7b Merge " Audio: Revert hal changes to block pcm_close during SSR" 2014-05-29 04:34:33 -07:00
Apoorv Raghuvanshi 44bd917f85 hal: Fix 64 bit compilation errors
- Fix 64 bit compilation errors seen
  with lpdk64 builds

Change-Id: I25126485b30c1c66cca9654f8c017dee2cf4239a
2014-05-28 18:09:32 -07:00
Dhanalakshmi Siddani 8fc6d91dda Audio: Revert hal changes to block pcm_close during SSR
pcm driver supports pcm_close during SSR, so reverted
 HAL code to block pcm session close during SSR.

 CRs-Fixed: 663477

Change-Id: I752e3f4f55288f91294e090b974ba1367c27122d
2014-05-28 13:39:53 +05:30
Linux Build Service Account da5ef4897d Merge "hal: send calibration parameters in stream route" 2014-05-27 14:55:26 -07:00
Subhash Chandra Bose Naripeddy 542746726d hal: send calibration parameters in stream route
The stream's output rendering policy requires calibration to be
sent when stream routing configuration is set instead of the
device enable as each stream can have it's own routing with
different calibration needs.

Change-Id: If8bd365c4a6c616ed86b9383ba540ee8e28c4079
2014-05-26 22:10:39 -07:00
Karthik Reddy Katta 060a6c49a5 hal: Fix for no audio on BT headset till waiting call is ended.
-Issue: Voice call audio is not routing to BT headset
 though connected, till the waiting call is ended.
-Rootcause: During voice call, if another call is received, the
 audio mode is changed to MODE_RINGTONE. Due to this, the primary
 output on which the voice call is setup, is not able to find
 new device as BT in getNewdevice().
-Fix: Avoid mode change to MODE_RINGTONE when voice call is already
 active.

Change-Id: I38582e2500ff4c44eb5ac45dab3aab35606d1c7d
CRs-Fixed: 662883
2014-05-22 19:06:57 +05:30
Subhash Chandra Bose Naripeddy 19dc03b51f hal: configure playback stream rendering based on output policy
For the usecases where individual streams have to be rendered
through different post processing chain on DSP an output policy
is defined. The output configuration is read from the
output policy file based on the stream atrributes to render the
playback appropriately.

Change-Id: I095592013ffa5b04bea69254026ebb78e2934822
2014-05-18 21:04:42 -07:00
Naresh Tanniru 4c63039cfa hal: SSR support for pcm playback,pcm record usecases
- Added SSR event handling support in HAL

- Added support to drop incoming pcm data for pcm playback
  usecase during SSR

- Added support to send dummy input(mute/zero buffer) for
  record usecase during SSR

Change-Id: I158b62fa443bb523091128fe1308c9a9b1415502
2014-05-13 00:25:49 +05:30
Linux Build Service Account e1be46f950 Merge "hal: improve logging." 2014-05-08 17:37:02 -07:00
Linux Build Service Account 09e624082a Merge "hal: Fix VoIP Mute failure in SIP call during Voice call HOLD" 2014-05-08 12:24:01 -07:00
Sidipotu Ashok f43018c6f8 hal: improve logging.
-log to print open/close/standby of out/in streams
-log to print the the device switches

Change-Id: I1b3bf3d6ba19faa4df804f781fc15c0f96a5b80f
2014-05-08 17:02:47 +05:30
Linux Build Service Account 63114437bd Merge "hal: configure HDMI channels based on sink capability." 2014-05-06 07:25:27 -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
Mingming Yin 9c04139034 hal: configure HDMI channels based on sink capability.
- configure output HDMI channel count based on sink
  capability when audio.use.hdmi.sink.cap is set to true

CRs-Fixed: 656308
Change-Id: I3dd3226054c68a69a2c29f8bb2f9c27e429ad2dc
2014-05-02 10:42:50 -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
Haynes Mathew George ef1e3d331e audio: use of audio_route_{apply/reset}_and_update_path APIs
1) Update enable/disable device and route to use the new APIs.
   With this change, mixer controls will be updated in the order
   listed in mixer paths XML file.
2) update_mixer is now an unused var.

Change-Id: Ic0a8874e4a2080347cfa0c2e66af606a08a207a7
CRs-Fixed: 581453
2014-04-29 14:54:13 -07:00
Linux Build Service Account d3bc0d753f Merge "hal: Ensure all the mutexes are initialized" 2014-04-28 22:26:19 -07:00
Linux Build Service Account a518e5166d Merge "hal: Add support for multiple instances of offload playback" 2014-04-28 19:33:52 -07:00
Subhash Chandra Bose Naripeddy 16ff4f86f2 hal: Add support for multiple instances of offload playback
Add support for multiple offload playback instances

Change-Id: I9d35b68fc8ca27c4eeb3976eb508b06c5ad3ca8f
2014-04-28 10:43:03 -07:00
Bharath Ramachandramurthy 0de1678475 hal: fix listen and audio calibration concurency
- ACDB loader is maintaining the same calibration buffers
for both listen and audio. So there is a possibility that
the audio calibration buffers may be overwritten with listen
calibration soon after notifying the device busy state to
listen hal
- Avoid this issue by notifying listen hal before sending the
audio calibration so that listen hal can complete pushing its
calibration

Change-Id: I4d954b1287b59ee4e1510707db25f466d14dca97
2014-04-25 12:52:06 -07:00
Ravi Kumar Alamanda 40703105d8 hal: Ensure all the mutexes are initialized
- Ensure all the mutex locks are initialized before using them,
  to avoid native crashes.

Change-Id: I7b6253f1d08a36a24d366d69004ce969d73c13e1
CRs-Fixed: 654375
2014-04-24 10:39:35 -07:00
Linux Build Service Account 4c93505e1d Merge "hal: fix to handle voip issue when input stream starts first" 2014-04-22 15:36:58 -07:00
Linux Build Service Account 5a55119371 Merge "hal: fix BT device switch issue for audio playback during VoIP call" 2014-04-22 15:36:17 -07:00
Linux Build Service Account 6b75dd74ef Merge " Audio: Fix for audio loss on switching between speaker and USB headset" 2014-04-22 06:37:36 -07:00
Linux Build Service Account 593897be43 Merge " hal: Fix device disable/enable sequence" 2014-04-22 06:36:49 -07:00
Narsinga Rao Chella c17cab6487 hal: fix BT device switch issue for audio playback during VoIP call
- When VoIP call is active on non-BT device and if the music playback
tries to switch to BT device, it will continue to route to non-BT
device on which the VoIP call is active already.
- Fix the issue by not selecting VoIP devices for audio playback when
they are on different back ends.

Change-Id: Iff9251fcf02f897d9b1cdc17fcf27c262518ada8
CRs-fixed: 652129
2014-04-21 15:20:05 -07:00
Dhanalakshmi Siddani 929a1f18a3 Audio: Fix for audio loss on switching between speaker and USB headset
- snd device reference count is not decremented when usb headset is
   unplugged, because touch tone is still active on usb headset.
   So when usb is plugged again device routing is not triggered as
   present and prev devices are same
 - Fix is to route audio to speaker as soon as usb headset is
   disconnected

   CRs-Fixed: 630425

Change-Id: Idfa37478fa19cd5a1c75c7e1d2f77b4dc02b311a
2014-04-19 21:06:20 +05:30
Narsinga Rao Chella 7ce0535f70 hal: fix to handle voip issue when input stream starts first
- adev_open_output_stream() fails if the use case is already enabled.
Because of this, in case of VoIP, when the input stream is created
and started before creating Audio Track, then the output stream
creation fails.

- Fix this issue by giving exception for VoIP use case.

Change-Id: I5e7329d64075a09b99e5760a9050ace8c62a4e87
CRs-fixed: 651761
2014-04-18 14:22:05 -07:00
Venkata Narendra Kumar Gutta 7610e63587 hal: Fix device disable/enable sequence
In Skype call, observed no rx data when headset is inserted
  during call.

  During device switch from handset to headset, audio HAL is
  enabling the headset mixer controls first then disabling
  handset mixer controls leading to no audio during downlink
  as codec clock in 8916 is disabled due to the followed
  sequence.

  The current device switch logic doesn't make sure that all
  previous devices are disabled before enabling the selected
  devices. Fix this by changing the logic to disable all the
  previous devices first and enable the selected devices.

  CRs-Fixed: 648710

Change-Id: I0adfb62ea0ad8e2a2fe1a5473732e8bef61c492a
2014-04-16 22:28:28 +05:30
Vidyakumar Athota 3c9fb7fa96 hal: Update BT sample rate for BT input device
-BT sample rate should be set before opening BT SCO output
 or input device. Currently it is set only for output device.
-Set sample rate for BT SCO input device also

Change-Id: I356557a727f5946ff3b4eb89ea16e4c16d84d21c
2014-04-15 16:07:02 -07:00
Linux Build Service Account 4c73dca05d Merge "hal: update bt-sco sample rate before device enable" 2014-04-02 10:22:41 -07:00