Commit Graph

91 Commits

Author SHA1 Message Date
Vignesh Kulothungan 5539688e3b audio: Add ACDB INIT extension
- Add an audio extension for ACDB
- ACDB Init from AHAL and STHAL are routed via this extension

CRs-Fixed: 2028493
Change-Id: Ib63c8fa4bf1f89d4dbfce8b6584ac1d8271e5f38
2017-05-24 23:06:54 -07:00
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
Linux Build Service Account cb40b14e08 Merge "audio: derive sound device for concurrent playback usecases" 2016-11-18 05:38:06 -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
Ashish Jain a052e57d42 hal: Configure correct COPP sample rate for USB and HDMI devices.
-In case of playback over HDMI/USB, the device might not support
the same sample rate as of the stream, though it is preferred that
resampling happens after post processing, but if device sample rate
is not even a multiple of stream sample rate, ensure that resampling
happens in the COPP.

Change-Id: Ia8cdff5294433ec099b703001d11da905bf82c9b
2016-11-08 07:54:34 +05:30
Linux Build Service Account dda886e89f Merge "hal: Fix aanc sequence during voice call" 2016-11-06 23:59:01 -08:00
Linux Build Service Account 51eb248cf0 Merge "hal: Address missing sysfs update during DP disconnect" 2016-11-03 00:47:24 -07:00
Linux Build Service Account 12e950896e Merge "hal: Restrict SSR recording to channel position representation" 2016-11-02 06:50:00 -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
Garmond Leung e3b6d48399 hal: Address missing sysfs update during DP disconnect
During display port disconnect, adev_set_parameter() is calling
platform_invalidate_hdmi_config() before the audio extension.
Attempts to read the current display type in order to determine
which sysfs node to communicate with. The solution is to
relocate invalidate function in audio extension to ensure that
it does not get called prematurely.

Change-Id: Ifc7bc8cc753855edacb8fa90a9f784086fef7594
CRs-Fixed: 1082254
2016-10-27 15:15:49 -07:00
Divya Narayanan Poojary 45f1919f3d hal: Restrict SSR recording to channel position representation
Surround Sound Recording(SSR) supports only channel position
representation while default channel mask for multi-channel
recording is always index representation.
Return updated channel mask in case index representation is sent
for channel count 6. This ensures audio flinger reopens the session
with updated position representation channel mask.
And also handled the case if any client requests recording with
multichannel when SSR is not enabled, will check the max_mic_count
supported by the device and update the channel mask accordingly.

Change-Id: Ib925a5f31d50182cd595e547f3412ed809224a5a
2016-10-25 11:29:04 -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
Kuirong Wang 0b947f7bc2 hal: update to add BE channel configuration for USB capture
Update to add BE channel configuration for USB capture and more
BE configuration options for sample rate and channel number.

Change-Id: I1e0af7a19a67aecba5afae95ecc62eec4a2d650b
CRs-Fixed: 1071868
2016-10-05 11:38:34 -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
Ashish Jain b26edfbb1d hal: Enable support for multichannel tunnel USB.
-Update platform_check_codec api to enable support for multichannel
tunnel USB
-Update condition to check if voice call is active on a specific backend
then only force configure it
-Update the check to ensure that offload callback is triggered only for
non blocking writes.

Change-Id: I0dbd61c28b24cdba22f63b0e014eb7c362e2df34
2016-09-16 03:33:16 -07: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
Haynes Mathew George 3a1f1fbde2 audio: sndmonitor
Monitor sound card status and report online/offline
events back to the streams registered with it and to audio_dev.

Bug: 30075678
CRs-Fixed: 1053073
Change-Id: Iea74d5c83f7fe92ba4a24f4f4650ce255bdb48e8
2016-09-02 06:37:57 -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
Ashish Jain f1eaa58966 hal: Enable direct playback support for AUDIO_FORMAT_PCM_FLOAT
-Add changes to support PCM_FLOAT format using direct track.
-For targets supporting true 32 bit, convert FLOAT pcm data
to 32 bit.
-Targets which dont support true 32 bit, convert FLOAT or
32 bit input to 24 bit Packed in HAL.

Change-Id: I8052c8b878bbd4d70c0453df054953d494773b0a
2016-07-04 17:14:55 +05:30
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
Sidipotu Ashok e6f78cb2c6 hal: Changes to support true 44.1 Native playback
- add changes to support single BE mode on top of the
Double BE mode which is supported.

- support reading of version or mode from XML.

- add logic to switch between single and double BE
based on the mode in XML.

- define a new device for true native.

- add logic to read tasha codec version and allow
true native only for 2.0 version of codec

- enchance log msgs for better debugging.

Change-Id: I970487f16af32144ec26f967e8bfcb32d44d67a4
2015-12-28 05:00:00 -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
Srikanth Uyyala a1e3235705 hal: update apptype configuration logic for recording usecase
General recording apptype is used for capture usecases

Change-Id: Ia90a3f05764be3acee21a3de55e94997bbe93b08
2015-11-03 18:47:03 -08: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
Linux Build Service Account c53dd19afb Merge "Revert "hal: audio: add tz_names extn to support from audio platform_info xml"" 2015-09-09 21:39:23 -07:00
Linux Build Service Account 075e69ba9c Merge "hal: Add codec EC reference support" 2015-09-09 21:39:21 -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
Ravi Kumar Alamanda 14b0f2d79b hal: update platform info parser to read key value pairs
Add support to parse platform specific configuration as
key value pairs from audio_platform_info.xml file.

Change-Id: Id1199f6f5cb3a060476f713a69b5de05f48815ce
2015-08-20 14:46:44 -07:00
Apoorv Raghuvanshi 924b3028b6 hal: Add codec EC reference support
- We need to set codec EC reference instead of MSM/AFE
  EC ref for Native audio usecase along with other
  usecases running on 48K port. In this scenario we
  will run two AFE ports, one regular port and the
  other port running at 44.1KHz and mixing done in codec.
  So set appropriate codec EC reference.

- One example of such usecase is VoIP over audio path
  and a 44.1KHz stream playback. But this change is generic
  enough to accommodate other possible usecases if any.

Change-Id: Ib980e36d111c1671303abe2b19341568d9fd2331
2015-08-07 17:32:42 -07:00
Linux Build Service Account 48a4d2bd52 Merge "hal: Add sound card update API" 2015-07-17 02:04:47 -07:00
Linux Build Service Account 5b0b06a127 Merge "audio: Re-initialize ACDB after SSR" 2015-07-17 02:04:47 -07:00
Linux Build Service Account 92d0231a84 Merge "hal: add interface to enable volume based audio calibration support" 2015-07-11 07:25:14 -07:00
Ben Romberger feca4b81f0 hal: Add sound card update API
Add API to notify platform when sound card
status is changed. Use function to reinitialize
ACDB-loader or resend common custom topology.

Change-Id: I59198f0ad8412ddc0d379b0c39a7807d6e22f4f7
2015-07-10 10:54:40 -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
Ramjee Singh 203473ba27 audio: Re-initialize ACDB after SSR
- If Modem SSR happens during boot up, Audio HAL
  fails to initialize ACDB. It does not check the
  error from acdb_init and does not re-initialize
  when Sound Card is ONLINE after SSR
- Fix is to re-initialize ACDB after Sound Card is
  ONLINE

Change-Id: Icb7a7ca7bb682d55a3cc8f7b26dc0bf511c30a69
2015-07-07 12:35:15 -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