Commit Graph

98 Commits

Author SHA1 Message Date
Naresh Tanniru dcb47c51ca hal: Add support to get active microphones on input stream
Add support to get active microphones on input stream.
Get microphone device id and channel map based on active
usecase and sound device. Active microphone characteristics
are retrieved from platform info using this device id.

Change-Id: I63ec99e70980869097fa896bc4b309fc0583fb3a
2018-06-26 07:50:50 -07:00
Weiyin Jiang ff72f818fe audio: enable 5.1.2 channel mask configuration
- Support query of DP max channels.
- Enable 5.1.2 channel mask configuration.

Change-Id: I0fa6f50fc21189b539ec963f35bd627d4bd261da
2018-05-30 19:20:06 -07:00
Aditya Bavanari 29bcea2437 hal: Update acdb extn and platform to pass Instance ID support info
Update acdb extn and platform to pass Instance ID support info
in order to enable ACDB loader use this info and call the respective
ACDB SW APIs. Update GEF APIs to support instance ID feature.
Add a property to query the instance ID support and use that
to call ACDB loader for instance ID support.

CRs-Fixed: 2199639
Change-Id: I64b41faf23cb42ec2af1695adb8a7021cad996dc
2018-03-06 18:08:57 -08:00
Haynes Mathew George ef51488fc5 audio: MMAP NOIRQ mode shareable file descriptor
Derive a shareable file descriptor for the DMA buffer
used for MMAP NOIRQ

Change-Id: Ibdd633fad35ed397f6de746e5755a02522e39777
2017-08-29 16:26:30 -07:00
Aniket Kumar Lata 8fc67e65e2 hal: Update prefixes for audio system properties
Vendor created android system properties are required to have
vendor/qti prefix. Update vendor specific audio system
properties used in HAL.

CRs-Fixed: 2034869
Change-Id: Ibdb1d12fedee1ce12073e8b90fdec814318f3acf
2017-07-11 15:40:19 -07:00
Naresh Tanniru 29bce4e5dd hal: qahw: Add support for Input channel map config
Add new set param api to configure input channel map to DSP

Change-Id: I47f8c165040be59c4da70b13b0cbc66c8802f71b
2017-06-08 19:27:54 +05:30
Siena Richard 7c2db77671 hal: add support for multi-copps for multiple BEs
Add support for multi-copps for multiple BEs with independent
calibration data. This allows for more accurate calibration of device
copps.

Change-Id: I2628cf16564a6cd596e7f2663063a7cd64749bdc
CRs-Fixed: 1110415
2017-02-06 21:33:20 -08:00
Dhanalakshmi Siddani 21be3ac064 audio: Add support for multiple metainfo keys update
Add changes to read acdb metainfo key and module name from platform
info xml. Changes to add acdb key values to a list and query key value
based on module name.

CRs-Fixed: 1081424
Change-Id: Ia287a27c86f63fea16cdb35d553de6e2e853b4e9
2017-02-03 05:09:16 -08:00
Aniket Kumar Lata f56b64077f hal: add support to override volume gain to step mapping table
- if customer mapping is added in platform info file, use that
- in absence of customer table use default mapping

CRs-Fixed: 1089771
Change-Id: I4bf8bcf1913f16ad6298ff1f3fa5dd649c889b2a
2016-12-19 06:17:14 -08:00
Haynes Mathew George bfe8ff4a3a audio: derive sound device for concurrent playback usecases
When a new playback usecase has to be started, existing playback
usecases might have to be re-routed (or not) to the new device
based on usecase requirements or h/w limitations
(e.g headphones and speaker sharing the same backend).

This change addresses this requirement by deriving the
new device based on pre-defined cases.

CRs-Fixed: 1077122
Bug: 31671778
Change-Id: Ic0fd4e8d2c1119e7198dc5bb5e5a51817f0110c1
2016-11-14 14:19:09 -08: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
Preetam Singh Ranawat 6a83666d71 hal: native DSD and mix path concurrency fix.
- Enable ASRC mode for incoming mix path use case(Headphone backend)
   if Headphone 44.1 or Native DSD backends are enabled for any of
   the current use case.
   e.g. 48-> + (Naitve DSD or Headphone 44.1)

 - Disable current mix path use case(Headphone backend) and re-enable it with
   ASRC mode for incoming Headphone 44.1 or Native DSD use case.
   e.g. Naitve DSD or Headphone 44.1 -> + 48

Change-Id: I94df832ba5e2a26e9179d66d4639f168b5c30eeb
2016-10-19 02:11:57 -07:00
Rohit kumar f412040b08 hal: add support for configurable mono speaker
Add devices to support right speaker as mono device along with
speaker protection support. It also provides option to switch
between left and right speaker using setparameter.

CRs-Fixed: 1051075
Change-Id: Iac140448bd6f49444d22a9e496b71e3502dfaefe
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2016-10-13 23:56:10 -07:00
Lakshman Chaluvaraju 22ba9f1ab2 hal: Integrated QTI Audio framework changes
- Added support for DD/DDP/AAC/MP4 decode through QAF.
- Added support for Rencoding to DD/DDP through QAF..
- Added support for DAP through QAF.
- Added suport for mixing DD/DDP with PCM through QAF.
- Added suport for mixing AAC with PCM through QAF.
- Added support for Dual Decode through QAF.

CRs-Fixed: 1063555
Change-Id: Icc3ddf62f9bc1c45e1027fb93bf9fa0e154a783e
2016-09-30 02:27:17 -07:00
Weiyin Jiang aa80acd9f1 hal: Add support for generic effect framework
Base changes for supporting generic effect framework
in HAL

Change-Id: I1f5a8d7748848cd5981b86017e6a4466d6b27be7
CRs-Fixed: 1043932
2016-09-21 16:45:33 +08:00
Shiv Maliyappanahalli c065640fb6 hal: enable audio over display port
Add support for audio over display port.

Change-Id: I3480d89c61ee5e5983715ec943fb02b1a9d5d151
2016-09-16 01:31:25 -07:00
Preetam Singh Ranawat b0c0dd7063 hal : native DSD concurrency support over headphone.
-Enable ASRC mode for headphone backend if headphone 44.1 or
  native DSD backend is active.
 -Disable headphone backend and reopen it with ASRC mode for upcoming
  use case over headphone 44.1 or native DSD backend

Change-Id: Ic8fb0ab9f254d3472fda49dbb824f622d518a451
2016-08-29 00:33:57 -07:00
Preetam Singh Ranawat cb6212e053 hal: Add support for native-DSD and native sampling rates
-set passthrough flag and diable gapless for native dsd
 -Select new backend for native dsd.
 -Add support for e2e playback of clips with sampling rate
  multiple of 44.1.

Change-Id: I6aa0ef5ea176a0923b0b88924ab046f9a11b7b12
2016-08-29 00:09:16 -07:00
Naresh Tanniru 9d027a653f audio: Add support to enable split A2DP
- Add new audio extension module for a2dp
- Add support to configure AFE encoder based
  on BT device capabilities
- Add support for soft handoff to re-configure
  AFE based on new BT device capability

Change-Id: I5d710fda1a8d8fa3b5d85aaa2b3096cff8fd7ce5
2016-08-12 04:50:45 -07:00
Mingming Yin ddd610b494 audio: config audio backend for HDMI playback
-check EDID info for supported audio configuration,
 and config audio backend for HDMI audio playback
 with proper bitwidth and sample rate.

Change-Id: Iae65e00b0f4d2f74f303ef03610f8b3a098dc7aa
2016-06-27 10:31:34 +05:30
Kuirong Wang 1cad714fb6 hal: Add device sidetone support for USB audio ADSP solution
Add device sidetone support for USB ADSP solution if the USB headset
has the sidetone capability.

CRs-Fixed: 1019158
Change-Id: Ie40c286eb9988aeb5093f32c7f81cdb142e88eb6
2016-06-23 10:37:38 -07:00
Ashish Jain 5106d36bb0 audio: Enable 24 bit packed direct pcm support.
-Add support for 24 bit packed audio in audio hal.
-Disable gapless for AV playback and direct pcm usecase,
this ensures that the buffering in DSP is not more.
-Simulate rendered time stamp for direct pcm usecase
based on the number of frames written to the compress
driver, bufferring in the driver and DSP latency.
-Pass mixer instance to offload effects library to avoid
an unnecessary mixer_open call, this optimizes audio
start delay in compress playback.

Change-Id: I422a53af5632eaf6cc362a6c44f62ff8412965f7
2016-05-31 05:17:13 -07:00
Manish Dewangan ba9fcfa29e hal: changes to support 24 bit record
-Changes to support 24 bit record if input format request is
 AUDIO_FORMAT_PCM_8_24_BIT or AUDIO_FORMAT_PCM_24_BIT_PACKED

Change-Id: I68076524ccccbf9f0be3c88bb01180ae7e4fd8b1
2016-05-26 04:43:41 -07:00
Linux Build Service Account fb0a0eb806 Merge "audio: enable compress passthrough" 2016-05-04 16:34:36 -07:00
Mingming Yin 218546574a hal: add support for compress passthrough
- Add support for compress passthrough.

Change-Id: I4934470ac8b23cb8de9b2d7d1b0014afe74b5a27
2016-04-29 10:07:58 +05:30
Mingming Yin 3a941d4a7f hal: read HDMI sink capability for dynamic output profile
- update read_hdmi_sink_caps to support dynamic sample
  rate, channel, and format based on HDMI EDID information

Change-Id: I69b3f19cb1d81c3e51695adae4f2379cbb439dc8
2016-04-29 10:01:51 +05:30
Sidipotu Ashok 9f0b16e9c0 hal: update combo device handling
If the wired headset/headphone/line devices are handled by
a different backend than speaker/earpiece devices, the combo
devices such as speaker+headphones can be split into individual
devices and enabled/disabled independently.

Conflicts:
	hal/msm8916/platform.c
	hal/msm8974/platform.c

Change-Id: I30e90f398ef204d106b5d8dac8fba166583bdbc8
2016-04-29 09:03:25 +05:30
Sidipotu Ashok eaec639e10 Revert "hal: update combo device handling"
This reverts commit 993e1f42e7.

Change-Id: I758f222fdb861feb730b7caba1416ba2e393b5b7
2016-04-19 10:37:42 +05:30
Kuirong Wang 993e1f42e7 hal: update combo device handling
If the wired headset/headphone/line devices are handled by
a different backend than speaker/earpiece devices, the combo
devices such as speaker+headphones can be split into individual
devices and enabled/disabled independently.

CRs-fixed: 989410
Change-Id: I379b56940eaf384d3cd1d9fe392b7fec65df023b
2016-04-14 23:20:57 -07:00
Venkata Narendra Kumar Gutta 7f4817f3c0 hal: Add support for FBSP in WSA analog mode
Feedback speaker protection(FBSP) is supported in WSA
analog mode. Add the required changes to support this
feature on 8937/8953 internal codec platforms.

CRs-Fixed: 970156
Change-Id: I1e5f6c1408ba6eb1c216cf8b254ac29551837dbb
2016-02-10 22:20:13 -08:00
Mingming Yin dda29e60cb hal: fix resource leak issues in platform.c
- fix resource leak issues related to mixer
  controls and file handles

Change-Id: I3675da4504a93a084ad582e5e6eb7c75f38e736e
2016-02-04 23:00:20 -08:00
Xiaojun Sang 040cc9f842 hal: audio_extn: enable speaker protection for tasha
Add speaker protection support for wsa speaker.

Change-Id: I5468b2875d0fd028e5c32f25c15b5de0095e7007
2015-12-20 22:48:08 -08:00
Preetam Singh Ranawat 61716b1bcc Merge 9c4ba54b3e on remote branch
Change-Id: I5a80c57243eda5a4fdd98a233766cd622b4ef9a3
2015-12-14 11:55:32 +05:30
Karthik Reddy Katta 81c4261add hal: Use AUDIO_TX_MONO_COPP topology for incall record usecases
-Issue: Two sessions with fluence topology are created
in case of voice call + incall voice recording.
-Rootcause: To avoid fluence topology for incall
recording usecase when voice call is active, default
input device's audio calibration was used earlier.
But while re-organizing audio_extn_utils_send_audio_calibration()
incall recording usecase is not considered.
-Fix: Send default input device's audio calibration
for incall recording usecases

Change-Id: I0d3734be3c793d350b1c73d8f8fc4380bf06fe30
2015-12-07 03:57:16 -08:00
Banajit Goswami 4dc87fb68f hal: mark unused parameters correctly
Some of the parameters passed to functions in older platforms
are not used anymore, though we maintain the platform code for
backward compatibility.
Mark the unused parameter explicitely as __unused.

Change-Id: I814f5f233590ecfd3e79bf58b97ad6d37be74601
2015-10-11 21:46:07 -07:00
Banajit Goswami 20cdd21a6b hal: Add support to enable VBat feature
Add support to enable VBat feature. This includes required changes
to select VBat speaker devices for audio and voice usecases and
sending the VBat calibration data to codec driver.

Change-Id: I2234bee3cc4d6f16934a4b27ef9da21cde74bb48
2015-09-13 17:45:37 -07:00
Vidyakumar Athota b3cfd1313c Revert "hal: audio: add tz_names extn to support from audio platform_info xml"
tz_names support is added using key value pairs under
config params in audio_platform_info.xml.

This reverts commit 8225243c24

Change-Id: I5bee7225f945b31e3df9372d00aeb003c2092d8b
2015-09-08 14:58:55 -07:00
Linux Build Service Account f24cb8f626 Merge 4957408904 on remote branch
Change-Id: Ie006885b5cd9774b13cfee8f0a510a36107b0d25
2015-08-16 23:56:30 -06:00
Venkata Narendra Kumar Gutta 55def54bf1 hal: Add support to enable vbat feature
Add support to enable vbat feature. This includes required changes
to select vbat speaker devices for audio, voice usecases and
sending the vbat calibration data to codec driver.

Change-Id: I2234bee3cc4d6f16934a4b27ef9da21cde74bb48
2015-08-14 19:07:10 +05:30
Linux Build Service Account 9071f3f7a4 Merge "hal: reroute active capture usecases which share same backend" 2015-08-07 12:18:41 -07:00
Narsinga Rao Chella 81491baea9 hal: reroute active capture usecases which share same backend
During device switch, all active capture usecases need to be
switched to new sound device if they all share same backend.
This is not happening because of an improper check of capture
usecase's device against output backend devices. Correct the
check to compare against input backend devices.

Change-Id: Iaf43c30b091f78c2ffb8b2740f241f2edfbe5a08
CRs-fixed: 873528
2015-08-04 18:37:18 -07:00
Laxminath Kasam be641abfa4 hal: audio_extn: enable speaker protection for wsa analog mono speaker
Update required acdb ids and channel config for supporting
speaker protection in 8952 WSA Analog mode.

Change-Id: I2642ba8cf0fc5854cd26ceaf6f773786b87bff74
2015-07-30 01:50:45 -07:00
Narsinga Rao Chella f99003cf91 hal: reroute active capture usecases which share same backend
During device switch, all active capture usecases need to be
switched to new sound device if they all share same backend.
This is not happening because of an improper check of capture
usecase's device against output backend devices. Correct the
check to compare against input backend devices.

Change-Id: Iaf43c30b091f78c2ffb8b2740f241f2edfbe5a08
CRs-fixed: 873528
2015-07-20 23:30:59 -07:00
Panwar Vivek b306983b0e Merge commit 'eb9127a942289de0cf9587d7456cc6c9a44eb411' into remote_branch
Change-Id: Ic630ae55085197a1bc7b79c726f7a0e39b9927b4
2015-07-13 19:10:23 +05:30
Linux Build Service Account 92d0231a84 Merge "hal: add interface to enable volume based audio calibration support" 2015-07-11 07:25:14 -07:00
vivek mehta a76401a7f5 hal: add interface to enable volume based audio calibration support
- expose new api from audio HAL that volume listner module will call
  to set volume calibration level

Change-Id: If74bf66d32def85022d79ccb9f84c3b85c8a2dc9
2015-07-07 16:11:03 -07:00
Mingming Yin 497419fcb8 hal: compilation fix for extended feature flags
- Fix compilation error for offload, Dolby,
  HDMI pass through, FLAC decoder, and hardware
  accelerated effects when extended feature
  flags are disabled.

Change-Id: I5b36d7668f63a396ed930d62c0337c2c3f311c95
2015-07-06 10:44:23 -07:00
Venkata Narendra Kumar Gutta bfdfa150d3 hal: Fix device selection at start of the voice call
Voice call setup latency value is exceeding 500 msec. It is due to
primary output selecting handset instead of voice handset causing
the extra delay. Fix this by selecting voice handset when the mode
is set to MODE_IN_CALL.

CRs-Fixed: 855783
Change-Id: Ibfaee75d658bffbcf2e9cdeaa589e0487c214b41
2015-07-03 15:10:06 -07:00
Linux Build Service Account 9985378693 Merge "hal: Fix device selection at start of the voice call" 2015-07-03 10:56:42 -07:00
Venkata Narendra Kumar Gutta 5cd79b8d59 hal: Fix device selection at start of the voice call
Voice call setup latency value is exceeding 500 msec. It is due to
primary output selecting handset instead of voice handset causing
the extra delay. Fix this by selecting voice handset when the mode
is set to MODE_IN_CALL.

CRs-Fixed: 855783
Change-Id: Ibfaee75d658bffbcf2e9cdeaa589e0487c214b41
2015-06-30 18:22:48 +05:30