Commit Graph

91 Commits

Author SHA1 Message Date
Surendar karka 3056979cf3 hal: retrieve license info during init.
FFV/Allplay requires licensing info during init.
 - Retrieve Product_Id using "meta_info_key" from platfrom xml file during HAL-Init.
 - Retrieve Product_License using "audio_calibration_info" from ACDB.
 - Extend QAHW GetParam API to access AllPlay License information.

Change-Id: Ie759f795d76e0038cba3f14ee9084f1c46b64c0a
2018-05-08 14:23:58 +05:30
Surendar Karka 45e692df40 audio: Guard audio_extn_send_dual_mono_mixing_coefficients api
Move audio_extn_send_dual_mono_mixing_coefficients api under
CUSTOM_STEREO_ENABLED flag.

Change-Id: I70377b6a7ccd33e13c226303c17ff84f93e64109
2018-05-07 17:03:48 +05:30
Surendar Karka f51b584d07 audio: add support for multichannel to dual mono conversion
Add support to set channel mix coffecients to convert from
multichannel to dual mono.

Change-Id: I2ecd8babfe53ca48b6e596dce0579e95879ce7e0
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-05-05 13:03:57 +05:30
Chaithanya Krishna Bacharaju f5a1ce676e hal: Modify FFV system property name
Modify FFV system property name to match with naming convention
to use vendor prefix.
Update stream_in sample rate along with config rate for
multi-channel usecase.

Change-Id: Icac259f54e8d7cdd760e826b345a3af0d4cb754b
2018-02-06 01:07:42 -08:00
Md Mansoor Ahmed db1b4f9cc9 hal: Update keep_alive to support silence playback on non-hdmi devices
Keep_alive can now handle silence playback on multiple concurrent
devices such as primary output devices as well as HDMI

Change-Id: I08cbec51394d23255e1a61928e0b2cad552b2ac0
Signed-off-by: Md Mansoor Ahmed <mansoor@codeaurora.org>
2018-01-29 21:00:33 -08:00
Revathi Uddaraju d263403623 hal: Update the stream_in sample rate and also acquire lock for SSR
- Update the stream_in sample rate in adev_open_input_stream
  for surround sound record.
- As the ssr calls are not protected with the locks the ssr_init and ssr_deinit
  calls are coming from different threads and hence crash is seen in the ssr calls.

Change-Id: I22186a33e560a5de70a384b71910eb953fd369f0
2017-12-18 05:40:08 -08:00
Manish Dewangan 338c50a293 audio-hal: 64 bit hal porting changes
-Use long for mixer control with integer type to match with
 kernel snd_ctl_elem_value definition.
-Use packed structure for mixer controls with byte type

Change-Id: I9fbb1d10c5ee212348b58fc4b27a3d74403d8bda
2017-10-23 15:03:03 +05:30
Varun Balaraj 003ee7576e audio: hal: Adding safe checks to avoid crash
Added checks for parameter validation.

Change-Id: I9cf7f967b0c9be222b37ea2cca69161073460c83
2017-10-04 16:35:01 -07:00
Garmond Leung e2433c38c9 hal: Add support for Fluence Far Field Voice
Add support for 6mic Fluence pre-processing of
captured stream using Far Field Voice (FFV) algorithm.

Change-Id: I7a643014f3e090482db7772dce2fc812fd469b2d
2017-10-04 16:28:44 -07:00
Varun Balaraj e49253e19a hal: Adding Pan-Scale, downmix mixer control support.
Add support in HAL to send mix matrix params using downmix,
Pan-Scale mixer controls. Add new interactive usecases and
also add support to open and teardown for interactive streams.
Add support in test app for supporting up to 9 concurrent
streams. Add support for mixer matrix params handling.

Change-Id: I0dc5b908ee779b2b2c526a67609c057f591f26e7
2017-08-29 16:26:38 -07:00
Haynes Mathew George d539d5243e audio: close dlopen'ed library on error
Close dlopen'ed perf library on error

Change-Id: I70e4cd95e97ffac116f83d1949f4dbe78d8f944d
CRs-Fixed: 2047997
2017-08-29 16:26:10 -07:00
Satish Babu Patakokila c3c5d43c4c hal: Add API to support device configuration
Add new API to set device configuration from Client.
Currently the device config is set from edid.
New API overwrites the default device config with
client provided values.

CRs-fixed: 2071954
Change-Id: I1f0918acf0a420f9c9d8a17bc070637199cb7105
2017-08-15 15:02:34 -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
Dhananjay Kumar e6293dd5b4 audio: enable SoundMonitor to handle ADSP SSR events
Enable SoundMonitor in audio hal to handle ADSP SSR events,
do required cleanup and restore any active sessions gracefully.

Change-Id: I83270b7c12095e56a6677f41efe0f5618a27e0e5
2017-07-11 15:01:33 -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
Naresh Tanniru 6160c71228 audio: hal: add DSP clock recovery support
-Changes to add DSP clock recovery support

Conflicts:
        qahw_api/test/qahw_playback_test.c
	    hal/audio_extn/utils.c

CRs-Fixed: 2036937
Change-Id: I32e18e415c4a7dfdc7ae13d0e50c1ca76d739cc0
2017-06-08 13:04:27 +05:30
Revathi Uddaraju 1eac8b0e2d hal: Add support for dynamic logging
Changes to support dynamic logging in hal

Change-Id: I315c919bd940d8ccdb9103eb06bf67c1e3ff3f4b
2017-05-29 03:20:20 -07:00
Linux Build Service Account f76bec3f82 Merge "audio: hal: Add support for registering adsp events" 2017-05-21 23:50:24 -07:00
Aalique Grahame 404a15e399 hal: fix compilation error after disabling Dolby
Disabling Dolby causes unused variable error during
compilation. Cache adev variable to solve this.

CRs-Fixed: 2046777
Change-Id: I9579d58b7e95cc4ada50fc81b02a29f9604b831e
2017-05-18 11:28:27 -07:00
Ben Romberger d771a7c8ca audio: hal: Add support for registering adsp events
Add support for AHAL clients to register for adsp events
and receive event callbacks when an event is triggered by adsp.

CRs-Fixed: 2023812
Change-Id: Ie22efee6e859c3d819ed3939e164cb7baebab71b
2017-05-18 21:24:23 +05:30
Kuirong Wang 9426c29133 hal: update the notification of HDMI/DisplayPort connection
Update the notification mechanism of HDMI/DisplayPort cable
Connection/disconnect between audio and display driver.

Change-Id: I484f52c13ecddec7638261cad11394b362677763
CRs-Fixed: 2003481
2017-02-28 09:01:15 -08:00
Satya Krishna Pindiproli c6b0a745a4 hal: update HFP PCM device ID from platform_info.xml
Update HFP PCM device ID from platform_info.xml file (if defined)
instead of using explicitly defined hardcoded values.

CRs-Fixed: 1117322
Change-Id: Id903b32d12666d510326c2656133f0b957485418
2017-02-09 04:10:57 -08:00
Dhanalakshmi Siddani 18737938db audio: Changes to support Aptx decoder in offload mode
Add support to send license key value and bt device address
to DSP. Add Aptx format related changes. Also add support for
struct based set params using set api.

CRs-Fixed: 1081424
Change-Id: I2877239e61d3841e6ae90af2d39fb0b93cc2b6db
2017-02-03 05:50:13 -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
Chaithanya Krishna Bacharaju e3d711e1df hal: Add support to set SVA execution mode
Pass SVA execution mode to sound trigger HAL received
as part of setparameters.
Add support for getparameters in soundtrigger and return
SVA execution mode status from sound trigger HAL when
queried.

Change-Id: I63c482920ee778beb806e3138c93e005e15ca897
2017-02-01 13:49:53 +05:30
Srinivas Julakanti 1ca769ac64 hal: add changes to support RAS
Receiver Aided Stereo(RAS) is a feature to support stereo
playback over receiver and speaker. Add new RAS property
and device to support this feature.

Change-Id: I8cd62a352b2847d6068285ea84e2d8f85e931619
2017-01-27 12:25:31 -08:00
Lakshman Chaluvaraju b4ec8702b6 hal: Porting QTI Audio framework related bug fixes on Mainline
- Adding control for compress output format
- Fix for Avsync issue whild playing video clip due to QAF latency.
- updating to use channels instead of channel_mask.
- Added support for msmd
- Added Passthrough playback support for AC3, EAC3 and
  Multichannel PCM formats.

Change-Id: Ia52192b6a8a9970617d0f1d9b3f613d12beb73c6
2017-01-06 03:42:08 -08:00
Dhanalakshmi Siddani 0b1488e0fb hal: Add proxy support for BT playback
Changes to read decoded pcm data from DSP via proxy port.

CRs-Fixed: 1081411
Change-Id: Ia60e284de5e30b162dbde1705e263f17f4c5e187
2016-12-07 10:55:45 +05:30
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
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
Garmond Leung 37850abb13 hal: Changes Relating to DisplayPort Audio
- Update the way we scan for HDMI fb nodes. We
  currently scan nodes 0, 1 & 2 which is not
  sufficient when fb3 is present. We will now open
  fbx until we get an error to ensure we will not
  miss any nodes if new ones are added.

- Fix return value of read_hdmi_sink_caps(), we are
  currently returning the displaytype. The caller
  of the function is interpreting it as an error.

Change-Id: I4a81e93d246d234b86a81eb6597cf641e1ea1991
CRs-Fixed: 1075152
2016-10-19 03:15:18 -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
Ashish Jain d84fd6a76e hal: Refactor HDMI backend configuration
-In current design HDMI backend configuration does not validate
incoming configuration against what is supported by the
connected sink ( using edid). This results in an incorrect
configuration of the HDMI backend, sometimes leading to no audio.
-Move HDMI backend configuration to
platform_check_and_set_codec_backend_cfg, this design ensures
that HDMI backend configuration happens with valid and only
supported parameters (sample rate, channels and bit width)
by the connected sink.
-Remove usleep from keep_alive and move to conditional timed wait,
this ensures to break from the keep_alive loop quickly, instead
of waiting for the complete usleep duration.

CRs-Fixed: 1039831
Change-Id: Id46ae76575f1b8169370cee817b505b97af8fe01
2016-08-16 23:28:21 -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
Kuirong Wang a9f7cee071 hal: Add USB audio via ADSP support
Add changes to support USB audio via ADSP tunnel
solution.

CRs-Fixed: 1019158
Change-Id: I95a9796d7cad71e09dedd2bcd451183cbd25ca71
2016-06-23 10:28:19 -07:00
Ashish Jain ad78edc05f audio: configs: Enable DEVICE_OUT_PROXY support
-Enable PROXY device support.
-Fix compilation issue due to unused variable.

Change-Id: I68128df404d34087f27900ed826b6f40da260b24
2016-05-06 09:59:50 +05:30
vivek mehta 344576aca7 hal: Fix WFD and voice call over USB concurrency
- If WFD framework occupies the AFE proxy, it may result unintended
  behavior while starting voice call over USB.
- Audio is always routed to the USB audio device when connected,
  even if WFD is connected. So no need to allow afe proxy port
  usage by WFD framework.
- Disallow the afe proxy port usage by external modules when
  AUDIO_DEVICE_OUT_USB_DEVICE is connected.

CRs-Fixed: 998488

Change-Id: I889be7f477ae3f7ad46757592a46f3d0e8eb41e2
2016-04-18 03:14:56 -07:00
Vidyakumar Athota 4ffc926a9c hal: Add support to get speaker FTM parameters
Add SET and GET parameter APIs to query speaker
parameters in feedback speaker protection FTM mode.

Change-Id: I14a2b8ccc2e0d61c4ccdcadd63c353ca31b9c8ad
2016-03-10 01:28:07 -08:00
Alexy Joseph b13799480b hal: Fix warnings in audio HAL and policy
Enable Wall and Werror and fix warnings in
HAL and policy manager

CRs-Fixed: 962049

Change-Id: Ie93c8f933943875ac68e8318d777602ed864f531
2016-03-08 04:50:17 -08:00
Venkata Narendra Kumar Gutta 4bd09d0b13 hal: Add support to dynamically configure MI2S rx sample rate
Add support to dynamically configure MI2S rx sample rate to
support sampling rates upto 192KHZ on head phones for internal
codec. Add and set explicit mixer control to notify the sample
rate value to machine driver.

CRs-Fixed: 970158
Change-Id: Ib7968eaf9aeb5f9911f3c985af61a16a7e06744d
2016-02-15 23:27:11 -08:00
Leena Winterrowd f98e42f296 hal: Remove return values from void functions
Remove values returned from void functions to resolve CLANG
compilation issues.

CRs-Fixed: 963698
Change-Id: I75a960b116985bbf226e4984aec4db5676448824
2016-02-15 02:02:26 -08:00
Alexy Joseph aee4fddb77 hal: Fix potential memory leaks in HAL
Fix potential memory leaks in HAL

Change-Id: Ifd491cc185a7d1afa647f03639e57d1685d18803
2016-02-10 14:03:10 -08:00
Shiv Maliyappanahalli 8d019b07b0 hal: fix to enable aanc handset dynamically during voice call
AANC handset device doesnt get enabled if anc is enabled via
setparameters() during a voice call. Add check for EARPIECE
device to enable aanc handset device for all non-capture
usecases.

CRs-Fixed: 958813
Change-Id: I4d8d4026d3abb388c4b1ea2c8de328a61d9bbd81
2016-02-07 18:48:14 +05:30
Dhananjay Kumar 24a4c7be3f hal: fix audio loss from concurrent usage of 44.1 native and anc support
- Audio loss is observed if anc feature is turned on/off dynamically
  during an 44.1 native playback session.
- Since 44.1 playback is not supported when anc is on, handle 44.1
  sessions before applying anc configuration.

Change-Id: I7239dae8529fa4f960ace6acd2fcb668510abe66
2016-01-11 04:53:08 -08:00
Mingming Yin 00611c3ce6 hal: add audio notification acknowledge feature
- Modify sysfs node to allow audio hal to acknowledge
  every HDMI connect/disconnect event.
- This makes audio hal and HDMI driver to be in sync
  with respect to notifications and avoid any fast
  plug-in/out notification issues.

Change-Id: I6aead358967c3e978f4f599de66c9884b28bf7e9
2016-01-05 18:41:14 -08:00
Shiv Maliyappanahalli 5a10aea18d hal: Add support for 3-mic surround sound recording
Add support for stereo surround sound recording using 3 mics.

Change-Id: I741dd5507d72ac45dff8006d3875abe8dbdc2df2
2015-12-14 21:38:22 -08:00
Mingming Yin 12125e85ac hal: fix compilation issues with audio FM extention
- Update FM device references to match latest
  definitions to fix compilation of FM extention.
- Update FM feature flag for power optimization.

Change-Id: I17a9e240e552c4089d3e9c7a25e437fb5b5433f9
2015-10-30 10:17:54 -07:00
Sudheer Papothi fa9d228c71 hal: Add performance lock for playback usecase
Add performance lock during device path bringup in
playback usecase to reduce cold start output latency.

Change-Id: I2ff217beedb270f057fd4ea577a7a317ee1f20e6
2015-10-20 06:21:47 +05:30