Commit Graph

298 Commits

Author SHA1 Message Date
Derek Chen 6c0f3de886 hal: update audio patch handling in auto hal
Update audio patch in automotive HAL extension
to support device to device patch only.
Remove playback or capture patch as they are
supported at audio hw level.

Change-Id: If3cf097e4ed010548e1d3ab421611490f284157b
2020-02-26 16:06:30 -08:00
Aniket Kumar Lata 544846d837 hal: Clean up legacy FM TX out device
FM TX out device defined in HAL conflicts with hearing
aid output device defined in audio-base.h. Clean up FM
device as it is no longer needed.

Change-Id: Ibe2923272a69d24c3a1e44a045a590d185493caf
2020-02-04 23:25:01 -08:00
Aniket Kumar Lata 0e6e1e5e30 hal: Remove storage of audio device on bitfields
Audio devices were stored in HAL on variables with
type audio_devices_t. This change removes the storage
of multiple devices on a bitfield. Device comparisons,
assigments, removal have been updated. Helper functions
have been introduced for device operations.

Change-Id: I9ce8b0f9bdc542c386cbfe45b685158cc51d47b6
2020-01-21 07:30:16 -08:00
Aniket Kumar Lata 1fda943d0f hal: Add support for audio patches in HAL
Implement create_audio_patch and release_audio_patch
APIs for stream routing. Framework will
call these APIs instead of set_parameters to update
routing for a stream.
Increment HAL major version to 3.

Change-Id: Ife914f3277f2b3aa02e88e722d191c3f930e8095
2020-01-09 16:39:24 -08:00
Guodong Hu f5e614d72d hal: add external echo reference to ecns-hfp calls
* Add ec_car_state to switch between single-mic
  and multi-mic ecns hfp calls.
* Add the capability to have an echo reference for
  both single-mic and multi-mic ecns hfp call.
* New snd device is introduced for multi-mic ecns hfp.

Change-Id: I5a8c869cf6854020e15efb61cbaf78f3f027e1ee
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2019-10-17 10:22:42 -07:00
qctecmdr 21e45917f0 Merge "audio: Add HiFi Filter support" 2019-09-11 08:53:35 -07:00
qctecmdr be81f8e22d Merge "hal: enhance vndk fwk detection" 2019-09-11 08:39:03 -07:00
Weiyin Jiang d5718bde6a hal: enhance vndk fwk detection
getVendorEnhancedInfo() was added in vndk fwk detection library, and it
offers more detailed info on system and odm partitions. Accomodate this
enhancement into HAL as it's needed for GSI variant.

CRs-Fixed: 2519894
Change-Id: I41fb065a66edb15839d3efe570162997debdda37
2019-09-05 09:41:23 +08:00
Ramlal Karra ab51d045b2 audio: Add HiFi Filter support
- Enable HiFi filter for 48kHz, 44.1kHz Music playback

Change-Id: I87a87b0d719ac4ba82b3d16331711b85459a3edb
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
2019-09-03 15:43:00 +05:30
Guodong Hu 267bdf87d2 hal: update snd device selection in auto hal
Use BUS device associated usecases for SND
device selection on automotive platform.

The criteria for SND device selection are
* HFP calls: usecase->id;
* NON HFP calls: out->car_audio_stream.

Change-Id: If5eb1283e6bfec074efceb4f545a28fdd3dbf601
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2019-08-27 16:09:35 -07:00
Derek Chen f7092791c5 hal: support calibration for hfp with dual asm loopback
Add support TX and RX calibration for HFP call
on both uplink and downlink ASM loopback path.

Change-Id: I66dec9ec01e0645ba6f5c21a4e64aabd10e2b6a5
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2019-08-27 16:08:30 -07:00
Vignesh Kulothungan 39fc6a26c8 hal: add multi stream support for display port
Add support to switch audio stream between multiple
display ports.

CRs-Fixed: 2504445
Change-Id: I6ff80d12ea92b83b765faaf93b94ced98ea10d35
2019-08-19 14:44:58 -07:00
qctecmdr f03153a8a1 Merge "hal: add rear seat playback support for automotive" 2019-08-11 03:19:53 -07:00
qctecmdr ec36e178ea Merge "hal: fix media param not sent during gapless transition" 2019-08-04 12:09:11 -07:00
Derek Chen df05eea69b hal: add rear seat playback support for automotive
Add rear seat playback support for multi-zone
audio support on automotive platform.

Change-Id: Ia3d4c4a4f78950e99a8d4955e910cc8902b6bb17
2019-08-01 13:57:49 -07:00
qctecmdr 4d9f528884 Merge "hal: support dynamic feature enablement for auto hal" 2019-07-31 03:52:47 -07:00
qctecmdr ebdeca5c60 Merge "fm: Restore fm on Speaker" 2019-07-31 03:44:56 -07:00
Derek Chen f082fdb7f1 hal: support dynamic feature enablement for auto hal
Support dynamic feature enablement for auto hal
driver compilation.
Update fp for ext_hw_plugin driver.

Change-Id: Id534530875068b9641df103a3b58aaac06c7578e
2019-07-26 13:45:56 -07:00
Weiyin Jiang d9b5a4ef76 hal: fix media param not sent during gapless transition
QC defined interfaces in tinycompress to handle metadata of extended
audio format. These interfaces aren't enabled in tinycompress lib.

Use feature flag to enable these APIs for QC AHAL.

CRs-Fixed: 2491047
Change-Id: I0644bd0965a3850ef4c728ca881bf81cdbd8bc53
2019-07-25 10:54:15 +08:00
qctecmdr a9a0b134b3 Merge "hal: enable app type calibration for car streams" 2019-07-24 02:52:50 -07:00
Lakshman Chaluvaraju 06677b41af fm: Restore fm on Speaker
During fm plaback even though routing device is changed from WHP
to SPK on UI, fm continues to route through WHP on targets with
shared backend for WHP and SPK. This is due to APM unaware of
routing device is change to SPK and selects WHP to play LL touch
tones causes all active usecase on SPK to move to WHP and fm
routes through WHP.

Change is to handle this scenario by re-routing fm on SPK once
standby is received for LL touch tones.

Change-Id: Ia503d4c134a3679fc2a51e2f9b7b8343e7b7cd1e
2019-07-23 10:50:18 +05:30
qctecmdr 71530c5844 Merge "audio: limit sampling rates to 192Khz for WCD9380 varient." 2019-07-20 00:21:49 -07:00
Derek Chen 090dfc578c hal: enable app type calibration for car streams
Enable app type calibration for car streams
based on output flags.

Change-Id: I3f275ee674a315b0a912de2bdafd03ff2477e020
2019-07-18 00:47:31 -07:00
qctecmdr 467f0898a7 Merge "hal: support snd card status with set parameters" 2019-07-17 05:25:33 -07:00
Preetam Singh Ranawat 9d0d8e47af audio: limit sampling rates to 192Khz for WCD9380 varient.
-WCD9380 supports sampling rates upto 192Khz, hence limit
  SR > 192Khz to 192Khz.

Change-Id: I1435919320d784bedf4147a9e467867d777b594b
2019-07-16 14:42:54 +05:30
qctecmdr 5c2d1a7183 Merge "hal: add apptype as a part of event_value" 2019-07-12 02:25:57 -07:00
Derek Chen 6f2936746e hal: support snd card status with set parameters
Support snd card status string with set parameters
API for audio HAL dev and input/output streams.
Remove hostless session control in auto hal as it
is managed in audiod.

Change-Id: I3390ca26cf49cef86df116d8e28c5c558f9afee6
2019-07-09 11:39:51 -07:00
Weiyin Jiang 40dcdb9b53 hal: add apptype as a part of event_value
Add apptype as a part of event_value.

Change-Id: Ic9f33994693afafd0b1c2d5d34688be76a0c811a
2019-07-08 17:34:06 +08:00
qctecmdr de7166b7b9 Merge "hal: Add support for FAST FLAG in compress path" 2019-07-08 01:46:40 -07:00
qctecmdr 65ddcddb67 Merge "hal: Add support for low latency compress capture" 2019-07-08 01:35:40 -07:00
qctecmdr e9616515cf Merge "hal: Add API support to stop input stream" 2019-07-08 01:28:48 -07:00
qctecmdr 85fa627fca Merge "hal: Add QAP extention" 2019-07-06 08:41:31 -07:00
Deeraj Soman fa377bff15 hal: Add support for FAST FLAG in compress path
Add support for FAST FLAG in capture path.
Clients may request to open the compress session
in perf mode by passing the FAST FLAG.

Change-Id: I2b6cc50b0dd45aa6d6d78362392e4ee39dddd967
2019-07-03 03:06:11 -07:00
Deeraj Soman 1423092192 hal: Add support for low latency compress capture
Add support for low latency compress capture.
Client may pass the required capture duration as part
of config. HAL will decided the buffer size based on
this.

Change-Id: I39aa6d99c954877449a827468cea4b1d4304637d
2019-07-03 03:05:26 -07:00
Manish Dewangan 46e079872c hal: Add API support to stop input stream
Add API support to stop input stream.
Expose in_stop in HAL via QAHW so that clients may call it
when necessary.

Change-Id: I5b1112166453371ab4d79c31fa99fb1f6b3bff3f
2019-07-03 15:32:43 +05:30
Quinn Male 70f20f3253 hal: Expand the list of Barge-in usecases
This change adds new usecases to the list that will raise a
usecase event to sthal. USECASE_AUDIO_PLAYBACK_LOW_LATENCY and
USECASE_AUDIO_PLAYBACK_ULL are added with system property checks.
USECASE_AUDIO_PLAYBACK_MMAP is also added without a system
property. Additionally, screen state events can now be sent to
sthal.

Change-Id: I936b2390d886b67695daf184a2ca1b018ed17567
2019-07-01 17:37:35 -07:00
qctecmdr bb3ed7642f Merge "hal: Add support to capture mic and ec reference data" 2019-06-25 07:32:43 -07:00
qctecmdr e0cd6e67be Merge "hal: add snd card status callback in auto hal for ssr" 2019-06-21 03:28:09 -07:00
Chaithanya Krishna Bacharaju c9f9971a85 hal: Add support to capture mic and ec reference data
Add support to capture mic and ec reference data in single stream.
Add changes to update custom matrix params to configure PSPD.

Change-Id: I29f38c0d778d44217a9e0d59e4b1324f4ee81fdd
2019-06-21 09:12:53 +05:30
qctecmdr 479bb9c268 Merge "hal: support bus dev volume over audio port config" 2019-06-19 09:07:21 -07:00
qctecmdr f6ec46a123 Merge "hal: support car audio stream for bus devices" 2019-06-19 08:54:21 -07:00
Derek Chen d6f371d39c hal: add snd card status callback in auto hal for ssr
Add snd card status callback in auto hal for hostless
session (early TDM clock)  enablement in the event of
subsystem restart.

Change-Id: I9758f6a737f25387cffa8ffaade24bd89ef239a2
2019-06-13 11:00:32 -07:00
Sidipotu Ashok d2f10ba3e8 hal: Add QAP extention
Add new source file in audio_extn folder

Change-Id: If62e948f74f5e9e933704b5b6e061471d3a62a38
2019-06-13 18:18:59 +05:30
Derek Chen f13dd499e8 hal: support bus dev volume over audio port config
Support bus device based audio stream volume
control in dsp or codec h/w over audio HAL port
config interface for automotive audio.

Change-Id: I87be963c0af96bf27dfa65900d8a916525ba0356
2019-06-11 17:34:36 -07:00
Derek Chen f6318be8f5 hal: support car audio stream for bus devices
Add support for car audio streams and usecases
including media, system notification, navigation
guidance and phone.
The car audio streams are routed to bus devices
with assigned address, which is defined in audio
policy configuration. This enables dynamic mixing
and routing done by Android car framework from
application to AudioFlinger and audio HAL.

Change-Id: I583fc7b5f2e8850b064a3cde5f93693b16c47841
2019-06-11 16:41:48 -07:00
Zhou Song 06761ddc74 hal: get correspoding sample rate per device when sending cal data
For combo devices, each of the sound device may have different
sample rate, so calibration data should be sent with its own
sample rate value.
Use the sample rate per sound device for calibration.

Change-Id: If1989b8ceb166a905f3e438161765b4b3a6dc5f5
2019-06-05 02:45:26 -07:00
Surendar Karka 287348c7ff audio: add support to query presentation position from DSP
Add support to query presentation position from DSP
in system time domain.

Change-Id: I475aeedb7a3691027698ca91747b801dff569d21
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-05-23 13:18:29 +05:30
qctecmdr d293a67203 Merge "hal: Do not force mono for VoIP Rx with stock configuration" 2019-05-21 07:08:10 -07:00
Aniket Kumar Lata 4f9a2a5a82 hal: Do not force mono for VoIP Rx with stock configuration
HAL forces mono configuration for VoIP. This is due to VoIP
topology being configured as mono. However, pure AOSP
targets support VoIP with stereo configuration. HAL forcing
mono would lead to mismatched configuration. Correct this by
forcing mono only on vendor enhanced targets.

Change-Id: Icc63e14469ef67b5d916cebdba56a45910dcf28d
2019-05-17 10:10:04 -07:00
vivek mehta ae1018c3b0 hal: remove feature manager
- use vendor property to check if feature is enabled or disabled
  and remove feature manager and helper

Change-Id: I6cd70ad364720f1c241ecabe5c4a795b33e0e4e5
2019-05-14 10:16:34 -07:00