Merge "configs: lito: Update pcm id's for fm and spkr prot"
diff --git a/configs/kona/audio_effects.xml b/configs/kona/audio_effects.xml
index 7c0cd22..15adc92 100644
--- a/configs/kona/audio_effects.xml
+++ b/configs/kona/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -47,11 +44,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -60,19 +57,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/kona/audio_platform_info_intcodec.xml b/configs/kona/audio_platform_info_intcodec.xml
index 03e0e39..80fc6be 100644
--- a/configs/kona/audio_platform_info_intcodec.xml
+++ b/configs/kona/audio_platform_info_intcodec.xml
@@ -106,6 +106,13 @@
<param key="hfp_pcm_dev_id" value="39"/>
<param key="input_mic_max_count" value="4"/>
</config_params>
+ <gain_db_to_level_mapping>
+ <gain_level_map db="-59" level="5"/>
+ <gain_level_map db="-17.4" level="4"/>
+ <gain_level_map db="-13.8" level="3"/>
+ <gain_level_map db="-10.2" level="2"/>
+ <gain_level_map db="0" level="1"/>
+ </gain_db_to_level_mapping>
<acdb_ids>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
<device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15"/>
@@ -128,7 +135,7 @@
<device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" acdb_id="145"/>
<device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" acdb_id="146"/>
<device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
- <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="157"/>
+ <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="191"/>
</acdb_ids>
<backend_names>
<device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
diff --git a/configs/kona/audio_platform_info_qrd.xml b/configs/kona/audio_platform_info_qrd.xml
index dfcbcf6..fdeb319 100644
--- a/configs/kona/audio_platform_info_qrd.xml
+++ b/configs/kona/audio_platform_info_qrd.xml
@@ -103,6 +103,13 @@
<param key="hfp_pcm_dev_id" value="39"/>
<param key="input_mic_max_count" value="4"/>
</config_params>
+ <gain_db_to_level_mapping>
+ <gain_level_map db="-59" level="5"/>
+ <gain_level_map db="-17.4" level="4"/>
+ <gain_level_map db="-13.8" level="3"/>
+ <gain_level_map db="-10.2" level="2"/>
+ <gain_level_map db="0" level="1"/>
+ </gain_db_to_level_mapping>
<acdb_ids>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
<device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15"/>
@@ -125,7 +132,7 @@
<device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" acdb_id="145"/>
<device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" acdb_id="146"/>
<device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" acdb_id="147"/>
- <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="157"/>
+ <device name="SND_DEVICE_IN_HANDSET_GENERIC_QMIC" acdb_id="191"/>
</acdb_ids>
<module_ids>
<aec>
diff --git a/configs/kona/kona.mk b/configs/kona/kona.mk
index c091ce6..e9b79de 100644
--- a/configs/kona/kona.mk
+++ b/configs/kona/kona.mk
@@ -81,6 +81,8 @@
AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := true
##AUDIO_FEATURE_FLAGS
+BOARD_SUPPORTS_OPENSOURCE_STHAL := true
+
AUDIO_HARDWARE := audio.a2dp.default
AUDIO_HARDWARE += audio.usb.default
AUDIO_HARDWARE += audio.r_submix.default
@@ -392,7 +394,7 @@
vendor.audio.feature.compress_in.enable=true \
vendor.audio.feature.compress_meta_data.enable=true \
vendor.audio.feature.compr_voip.enable=false \
-vendor.audio.feature.concurrent_capture.enable=true \
+vendor.audio.feature.concurrent_capture.enable=false \
vendor.audio.feature.custom_stereo.enable=true \
vendor.audio.feature.display_port.enable=true \
vendor.audio.feature.dsm_feedback.enable=false \
diff --git a/configs/lito/mixer_paths.xml b/configs/lito/mixer_paths.xml
index 3e40870..a8f65b8 100644
--- a/configs/lito/mixer_paths.xml
+++ b/configs/lito/mixer_paths.xml
@@ -163,12 +163,12 @@
<!-- usb headset end -->
<!-- fm -->
<ctl name="Tert MI2S LOOPBACK Volume" value="0" />
- <ctl name="WSA_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="WSA_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="0" />
<ctl name="WSA_CDC_DMA_RX_0_DL_HL Switch" value="0" />
- <ctl name="RX_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="RX_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="0" />
<ctl name="RX_CDC_DMA_RX_0_DL_HL Switch" value="0" />
- <ctl name="MultiMedia1 Mixer TERT_MI2S_TX" value="0" />
- <ctl name="MultiMedia2 Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="0" />
<!-- fm end -->
<!-- Multimode Voice1 -->
@@ -424,7 +424,7 @@
<!-- defaults for mmap record -->
<ctl name="MultiMedia16 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="MultiMedia16 Mixer SLIM_7_TX" value="0" />
- <ctl name="MultiMedia16 Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="0" />
<ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="0" />
<!-- These are audio route (FE to BE) specific mixer settings -->
@@ -1382,7 +1382,7 @@
</path>
<path name="audio-record capture-fm">
- <ctl name="MultiMedia1 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="1" />
</path>
<path name="audio-record-compress">
@@ -1428,22 +1428,22 @@
</path>
<path name="low-latency-record capture-fm">
- <ctl name="MultiMedia8 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia8 Mixer SLIM_8_TX" value="1" />
</path>
<path name="fm-virtual-record capture-fm">
- <ctl name="MultiMedia2 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="1" />
</path>
<path name="play-fm">
<ctl name="Tert MI2S LOOPBACK Volume" value="1" />
- <ctl name="WSA_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="WSA_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="1" />
<ctl name="WSA_CDC_DMA_RX_0_DL_HL Switch" value="1" />
</path>
<path name="play-fm headphones">
<ctl name="Tert MI2S LOOPBACK Volume" value="1" />
- <ctl name="RX_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="RX_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="1" />
<ctl name="RX_CDC_DMA_RX_0_DL_HL Switch" value="1" />
</path>
@@ -2641,7 +2641,7 @@
</path>
<path name="mmap-record capture-fm">
- <ctl name="MultiMedia16 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
</path>
<path name="mmap-record usb-headset-mic">
diff --git a/configs/lito/mixer_paths_qrd.xml b/configs/lito/mixer_paths_qrd.xml
index 70f047d..6f54bb2 100644
--- a/configs/lito/mixer_paths_qrd.xml
+++ b/configs/lito/mixer_paths_qrd.xml
@@ -163,12 +163,12 @@
<!-- usb headset end -->
<!-- fm -->
<ctl name="Tert MI2S LOOPBACK Volume" value="0" />
- <ctl name="WSA_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="WSA_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="0" />
<ctl name="WSA_CDC_DMA_RX_0_DL_HL Switch" value="0" />
- <ctl name="RX_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="RX_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="0" />
<ctl name="RX_CDC_DMA_RX_0_DL_HL Switch" value="0" />
- <ctl name="MultiMedia1 Mixer TERT_MI2S_TX" value="0" />
- <ctl name="MultiMedia2 Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="0" />
<!-- fm end -->
<!-- Multimode Voice1 -->
@@ -424,7 +424,7 @@
<!-- defaults for mmap record -->
<ctl name="MultiMedia16 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="MultiMedia16 Mixer SLIM_7_TX" value="0" />
- <ctl name="MultiMedia16 Mixer TERT_MI2S_TX" value="0" />
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="0" />
<ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="0" />
<!-- These are audio route (FE to BE) specific mixer settings -->
@@ -1394,7 +1394,7 @@
</path>
<path name="audio-record capture-fm">
- <ctl name="MultiMedia1 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="1" />
</path>
<path name="audio-record-compress">
@@ -1440,22 +1440,22 @@
</path>
<path name="low-latency-record capture-fm">
- <ctl name="MultiMedia8 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia8 Mixer SLIM_8_TX" value="1" />
</path>
<path name="fm-virtual-record capture-fm">
- <ctl name="MultiMedia2 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="1" />
</path>
<path name="play-fm">
<ctl name="Tert MI2S LOOPBACK Volume" value="1" />
- <ctl name="WSA_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="WSA_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="1" />
<ctl name="WSA_CDC_DMA_RX_0_DL_HL Switch" value="1" />
</path>
<path name="play-fm headphones">
<ctl name="Tert MI2S LOOPBACK Volume" value="1" />
- <ctl name="RX_CDC_DMA_RX_0 Port Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="RX_CDC_DMA_RX_0 Port Mixer SLIM_8_TX" value="1" />
<ctl name="RX_CDC_DMA_RX_0_DL_HL Switch" value="1" />
</path>
@@ -2045,7 +2045,7 @@
</path>
<path name="mmap-record capture-fm">
- <ctl name="MultiMedia16 Mixer TERT_MI2S_TX" value="1" />
+ <ctl name="MultiMedia16 Mixer SLIM_8_TX" value="1" />
</path>
<path name="mmap-record usb-headset-mic">
diff --git a/configs/msm8998/audio_effects.xml b/configs/msm8998/audio_effects.xml
index 7c0cd22..15adc92 100644
--- a/configs/msm8998/audio_effects.xml
+++ b/configs/msm8998/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -47,11 +44,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -60,19 +57,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/msmnile/audio_effects.xml b/configs/msmnile/audio_effects.xml
index 7c0cd22..15adc92 100644
--- a/configs/msmnile/audio_effects.xml
+++ b/configs/msmnile/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -47,11 +44,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -60,19 +57,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/msmnile/mixer_paths_tavil.xml b/configs/msmnile/mixer_paths_tavil.xml
index fd29629..f2e4842 100644
--- a/configs/msmnile/mixer_paths_tavil.xml
+++ b/configs/msmnile/mixer_paths_tavil.xml
@@ -603,6 +603,10 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe">
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="deep-buffer-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia1" value="1" />
</path>
@@ -638,6 +642,11 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe-and-usb-headphones">
+ <path name="deep-buffer-playback usb-headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="deep-buffer-playback headphones">
<ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia1" value="1" />
</path>
@@ -651,16 +660,31 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe-and-headphones">
+ <path name="deep-buffer-playback headphones" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="deep-buffer-playback speaker-and-bt-sco">
<path name="deep-buffer-playback bt-sco" />
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe-and-bt-sco">
+ <path name="deep-buffer-playback bt-sco" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="deep-buffer-playback speaker-and-bt-sco-wb">
<path name="deep-buffer-playback bt-sco-wb" />
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe-and-bt-sco-wb">
+ <path name="deep-buffer-playback bt-sco-wb" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="low-latency-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -669,6 +693,10 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe">
+ <path name="low-latency-playback" />
+ </path>
+
<path name="low-latency-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia5" value="1" />
</path>
@@ -704,6 +732,11 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe-and-usb-headphones">
+ <path name="low-latency-playback usb-headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="low-latency-playback headphones">
<ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia5" value="1" />
</path>
@@ -717,6 +750,11 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe-and-headphones">
+ <path name="low-latency-playback headphones" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="low-latency-playback resume">
<ctl name="MultiMedia5_RX QOS Vote" value="Enable" />
</path>
@@ -726,11 +764,21 @@
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe-and-bt-sco">
+ <path name="low-latency-playback bt-sco" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="low-latency-playback speaker-and-bt-sco-wb">
<path name="low-latency-playback bt-sco-wb" />
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe-and-bt-sco-wb">
+ <path name="low-latency-playback bt-sco-wb" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="audio-ull-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -739,6 +787,10 @@
<path name="audio-ull-playback" />
</path>
+ <path name="audio-ull-playback speaker-safe">
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="audio-ull-playback headphones">
<ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia8" value="1" />
</path>
@@ -752,6 +804,11 @@
<path name="audio-ull-playback headphones" />
</path>
+ <path name="audio-ull-playback speaker-safe-and-headphones">
+ <path name="audio-ull-playback" />
+ <path name="audio-ull-playback headphones" />
+ </path>
+
<path name="audio-ull-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia8" value="1" />
</path>
@@ -787,11 +844,21 @@
<path name="audio-ull-playback" />
</path>
+ <path name="audio-ull-playback speaker-safe-and-bt-sco">
+ <path name="audio-ull-playback bt-sco" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="audio-ull-playback speaker-and-bt-sco-wb">
<path name="audio-ull-playback bt-sco-wb" />
<path name="audio-ull-playback" />
</path>
+ <path name="audio-ull-playback speaker-safe-and-bt-sco-wb">
+ <path name="audio-ull-playback bt-sco-wb" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
</path>
@@ -808,6 +875,10 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe">
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback display-port">
<ctl name="DISPLAY_PORT Mixer MultiMedia4" value="1" />
</path>
@@ -847,6 +918,11 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe-and-usb-headphones">
+ <path name="compress-offload-playback usb-headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback headphones">
<ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia4" value="1" />
</path>
@@ -868,16 +944,31 @@
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe-and-headphones">
+ <path name="compress-offload-playback headphones" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback speaker-and-bt-sco">
<path name="compress-offload-playback bt-sco" />
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe-and-bt-sco">
+ <path name="compress-offload-playback bt-sco" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback speaker-and-bt-sco-wb">
<path name="compress-offload-playback bt-sco-wb" />
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe-and-bt-sco-wb">
+ <path name="compress-offload-playback bt-sco-wb" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="compress-offload-playback2">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -917,6 +1008,11 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-safe-and-usb-headphones">
+ <path name="compress-offload-playback2 usb-headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback2 headphones">
<ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia7" value="1" />
</path>
@@ -938,16 +1034,31 @@
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-safe-and-headphones">
+ <path name="compress-offload-playback2 headphones" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback2 speaker-and-bt-sco">
<path name="compress-offload-playback2 bt-sco" />
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-safe-and-bt-sco">
+ <path name="compress-offload-playback2 bt-sco" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback2 speaker-and-bt-sco-wb">
<path name="compress-offload-playback2 bt-sco-wb" />
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-safe-and-bt-sco-wb">
+ <path name="compress-offload-playback2 bt-sco-wb" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia10" value="1" />
</path>
@@ -2073,6 +2184,10 @@
<path name="speaker" />
</path>
+ <path name="speaker-safe">
+ <path name="speaker-mono"/>
+ </path>
+
<path name="sidetone-iir">
<ctl name="IIR0 Enable Band1" value="1" />
<ctl name="IIR0 Enable Band2" value="1" />
@@ -2314,7 +2429,7 @@
<path name="headset-mic">
<path name="amic2" />
- <ctl name="DEC0 Volume" value="84" />
+ <ctl name="DEC1 Volume" value="84" />
</path>
<path name="headset-mic-liquid">
@@ -2403,6 +2518,11 @@
<path name="speaker" />
</path>
+ <path name="speaker-safe-and-headphones">
+ <path name="headphones" />
+ <path name="speaker-safe" />
+ </path>
+
<path name="speaker-and-line">
<path name="speaker-and-headphones" />
</path>
@@ -2484,6 +2604,11 @@
<path name="usb-headphones" />
</path>
+ <path name="speaker-safe-and-usb-headphones">
+ <path name="speaker-safe" />
+ <path name="usb-headphones" />
+ </path>
+
<path name="speaker-and-display-port">
<path name="speaker" />
<path name="display-port" />
@@ -2960,6 +3085,11 @@
<path name="bt-a2dp" />
</path>
+ <path name="speaker-safe-and-bt-a2dp">
+ <path name="speaker-safe" />
+ <path name="bt-a2dp" />
+ </path>
+
<path name="deep-buffer-playback bt-a2dp">
<ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
</path>
@@ -3013,21 +3143,41 @@
<path name="deep-buffer-playback" />
</path>
+ <path name="deep-buffer-playback speaker-safe-and-bt-a2dp">
+ <path name="deep-buffer-playback bt-a2dp" />
+ <path name="deep-buffer-playback" />
+ </path>
+
<path name="compress-offload-playback speaker-and-bt-a2dp">
<path name="compress-offload-playback bt-a2dp" />
<path name="compress-offload-playback" />
</path>
+ <path name="compress-offload-playback speaker-safe-and-bt-a2dp">
+ <path name="compress-offload-playback bt-a2dp" />
+ <path name="compress-offload-playback" />
+ </path>
+
<path name="low-latency-playback speaker-and-bt-a2dp">
<path name="low-latency-playback bt-a2dp" />
<path name="low-latency-playback" />
</path>
+ <path name="low-latency-playback speaker-safe-and-bt-a2dp">
+ <path name="low-latency-playback bt-a2dp" />
+ <path name="low-latency-playback" />
+ </path>
+
<path name="compress-offload-playback2 speaker-and-bt-a2dp">
<path name="compress-offload-playback2 bt-a2dp" />
<path name="compress-offload-playback2" />
</path>
+ <path name="compress-offload-playback2 speaker-safe-and-bt-a2dp">
+ <path name="compress-offload-playback2 bt-a2dp" />
+ <path name="compress-offload-playback2" />
+ </path>
+
<path name="compress-offload-playback3 speaker-and-bt-a2dp">
<path name="compress-offload-playback3 bt-a2dp" />
<path name="compress-offload-playback3" />
@@ -3068,6 +3218,11 @@
<path name="audio-ull-playback" />
</path>
+ <path name="audio-ull-playback speaker-safe-and-bt-a2dp">
+ <path name="audio-ull-playback bt-a2dp" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="mmap-playback">
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -3085,6 +3240,11 @@
<path name="mmap-playback headphones" />
</path>
+ <path name="mmap-playback speaker-safe-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
<path name="mmap-playback bt-sco">
<ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
</path>
@@ -3129,6 +3289,11 @@
<path name="mmap-playback" />
</path>
+ <path name="mmap-playback speaker-safe-and-usb-headphones">
+ <path name="mmap-playback usb-headphones" />
+ <path name="mmap-playback" />
+ </path>
+
<path name="mmap-record">
<ctl name="MultiMedia16 Mixer SLIM_0_TX" value="1" />
</path>
@@ -3230,6 +3395,10 @@
<path name="incall_music_uplink" />
</path>
+ <path name="incall_music_uplink speaker-safe-and-usb-headphones">
+ <path name="incall_music_uplink" />
+ </path>
+
<path name="incall_music_uplink headphones">
<path name="incall_music_uplink" />
</path>
@@ -3238,10 +3407,18 @@
<path name="incall_music_uplink" />
</path>
+ <path name="incall_music_uplink speaker-safe-and-headphones">
+ <path name="incall_music_uplink" />
+ </path>
+
<path name="incall_music_uplink speaker-and-bt-sco">
<path name="incall_music_uplink" />
</path>
+ <path name="incall_music_uplink speaker-safe-and-bt-sco">
+ <path name="incall_music_uplink" />
+ </path>
+
<path name="incall_music_uplink voice-tty-hco-handset">
<path name="incall_music_uplink" />
</path>
@@ -3250,6 +3427,10 @@
<path name="incall_music_uplink" />
</path>
+ <path name="incall_music_uplink speaker-safe-and-bt-a2dp">
+ <path name="incall_music_uplink" />
+ </path>
+
<path name="incall_music_uplink bt-a2dp">
<path name="incall_music_uplink" />
</path>
diff --git a/configs/msmsteppe/msmsteppe.mk b/configs/msmsteppe/msmsteppe.mk
index 2c21fb9..e35d6be 100644
--- a/configs/msmsteppe/msmsteppe.mk
+++ b/configs/msmsteppe/msmsteppe.mk
@@ -350,6 +350,51 @@
PRODUCT_PROPERTY_OVERRIDES += \
persist.audio.fluence.voicecomm=true
+#add dynamic feature flags here
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.feature.a2dp_offload.enable=true \
+vendor.audio.feature.afe_proxy.enable=true \
+vendor.audio.feature.anc_headset.enable=true \
+vendor.audio.feature.audio_sphere.enable=true \
+vendor.audio.feature.battery_listener.enable=false \
+vendor.audio.feature.compr_cap.enable=false \
+vendor.audio.feature.compress_in.enable=false \
+vendor.audio.feature.compress_meta_data.enable=true \
+vendor.audio.feature.compr_voip.enable=false \
+vendor.audio.feature.concurrent_capture.enable=false \
+vendor.audio.feature.custom_stereo.enable=true \
+vendor.audio.feature.display_port.enable=true \
+vendor.audio.feature.dsm_feedback.enable=false \
+vendor.audio.feature.dynamic_ecns.enable=false \
+vendor.audio.feature.ext_hw_plugin.enable=false \
+vendor.audio.feature.external_dsp.enable=false \
+vendor.audio.feature.external_speaker.enable=false \
+vendor.audio.feature.external_speaker_tfa.enable=false \
+vendor.audio.feature.fluence.enable=true \
+vendor.audio.feature.fm.enable=true \
+vendor.audio.feature.hdmi_edid.enable=true \
+vendor.audio.feature.hdmi_passthrough.enable=true \
+vendor.audio.feature.hfp.enable=true \
+vendor.audio.feature.hifi_audio.enable=false \
+vendor.audio.feature.hwdep_cal.enable=false \
+vendor.audio.feature.incall_music.enable=false \
+vendor.audio.feature.keep_alive.enable=false \
+vendor.audio.feature.kpi_optimize.enable=true \
+vendor.audio.feature.maxx_audio.enable=false \
+vendor.audio.feature.ras.enable=true \
+vendor.audio.feature.record_play_concurency.enable=false \
+vendor.audio.feature.src_trkn.enable=true \
+vendor.audio.feature.spkr_prot.enable=true \
+vendor.audio.feature.ssrec.enable=true \
+vendor.audio.feature.usb_offload.enable=true \
+vendor.audio.feature.usb_offload_burst_mode.enable=false \
+vendor.audio.feature.usb_offload_sidetone_volume.enable=false \
+vendor.audio.feature.deepbuffer_as_primary.enable=false \
+vendor.audio.feature.vbat.enable=true \
+vendor.audio.feature.wsa.enable=false \
+vendor.audio.feature.audiozoom.enable=false \
+vendor.audio.feature.snd_mon.enable=true
+
# for HIDL related packages
PRODUCT_PACKAGES += \
android.hardware.audio@2.0-service \
diff --git a/configs/sdm660/audio_effects.xml b/configs/sdm660/audio_effects.xml
index b49284b..e5ce555 100644
--- a/configs/sdm660/audio_effects.xml
+++ b/configs/sdm660/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -46,11 +43,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -59,19 +56,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/sdm710/audio_effects.xml b/configs/sdm710/audio_effects.xml
index 7c0cd22..15adc92 100644
--- a/configs/sdm710/audio_effects.xml
+++ b/configs/sdm710/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -47,11 +44,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -60,19 +57,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/sdm845/audio_effects.xml b/configs/sdm845/audio_effects.xml
index 7c0cd22..15adc92 100644
--- a/configs/sdm845/audio_effects.xml
+++ b/configs/sdm845/audio_effects.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--- Copyright (c) 2018, The Linux Foundation. All rights reserved. -->
+<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
@@ -30,9 +30,6 @@
<libraries>
<library name="bundle" path="libbundlewrapper.so"/>
<library name="reverb" path="libreverbwrapper.so"/>
- <library name="qcbassboost" path="libqcbassboost.so"/>
- <library name="qcvirt" path="libqcvirt.so"/>
- <library name="qcreverb" path="libqcreverb.so"/>
<library name="visualizer_sw" path="libvisualizer.so"/>
<library name="visualizer_hw" path="libqcomvisualizer.so"/>
<library name="downmix" path="libdownmix.so"/>
@@ -47,11 +44,11 @@
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
- <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
- <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
@@ -60,19 +57,19 @@
</effectProxy>
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
<effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
- <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
- <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
- <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
<libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
</effectProxy>
<effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
diff --git a/configs/trinket/trinket.mk b/configs/trinket/trinket.mk
index 95a653d..919c8c2 100644
--- a/configs/trinket/trinket.mk
+++ b/configs/trinket/trinket.mk
@@ -232,6 +232,51 @@
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.adm.buffering.ms=2
+#add dynamic feature flags here
+PRODUCT_PROPERTY_OVERRIDES += \
+vendor.audio.feature.a2dp_offload.enable=true \
+vendor.audio.feature.afe_proxy.enable=true \
+vendor.audio.feature.anc_headset.enable=true \
+vendor.audio.feature.audio_sphere.enable=true \
+vendor.audio.feature.battery_listener.enable=false \
+vendor.audio.feature.compr_cap.enable=false \
+vendor.audio.feature.compress_in.enable=false \
+vendor.audio.feature.compress_meta_data.enable=true \
+vendor.audio.feature.compr_voip.enable=false \
+vendor.audio.feature.concurrent_capture.enable=false \
+vendor.audio.feature.custom_stereo.enable=true \
+vendor.audio.feature.display_port.enable=true \
+vendor.audio.feature.dsm_feedback.enable=false \
+vendor.audio.feature.dynamic_ecns.enable=false \
+vendor.audio.feature.ext_hw_plugin.enable=false \
+vendor.audio.feature.external_dsp.enable=false \
+vendor.audio.feature.external_speaker.enable=false \
+vendor.audio.feature.external_speaker_tfa.enable=false \
+vendor.audio.feature.fluence.enable=true \
+vendor.audio.feature.fm.enable=true \
+vendor.audio.feature.hdmi_edid.enable=true \
+vendor.audio.feature.hdmi_passthrough.enable=true \
+vendor.audio.feature.hfp.enable=true \
+vendor.audio.feature.hifi_audio.enable=false \
+vendor.audio.feature.hwdep_cal.enable=false \
+vendor.audio.feature.incall_music.enable=false \
+vendor.audio.feature.keep_alive.enable=false \
+vendor.audio.feature.kpi_optimize.enable=true \
+vendor.audio.feature.maxx_audio.enable=false \
+vendor.audio.feature.ras.enable=true \
+vendor.audio.feature.record_play_concurency.enable=false \
+vendor.audio.feature.src_trkn.enable=true \
+vendor.audio.feature.spkr_prot.enable=true \
+vendor.audio.feature.ssrec.enable=true \
+vendor.audio.feature.usb_offload.enable=true \
+vendor.audio.feature.usb_offload_burst_mode.enable=false \
+vendor.audio.feature.usb_offload_sidetone_volume.enable=false \
+vendor.audio.feature.deepbuffer_as_primary.enable=false \
+vendor.audio.feature.vbat.enable=true \
+vendor.audio.feature.wsa.enable=false \
+vendor.audio.feature.audiozoom.enable=false \
+vendor.audio.feature.snd_mon.enable=true
+
# for HIDL related packages
PRODUCT_PACKAGES += \
android.hardware.audio@2.0-service \
diff --git a/hal/Android.mk b/hal/Android.mk
index 0ee2625..0ce2d6e 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -74,6 +74,7 @@
ifneq ($(filter kona,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS := -DPLATFORM_KONA
LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
+ LOCAL_CFLAGS += -DINCALL_STEREO_CAPTURE_ENABLED
endif
ifneq ($(filter $(MSMSTEPPE) ,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS := -DPLATFORM_MSMSTEPPE
@@ -85,6 +86,7 @@
endif
ifneq ($(filter lito,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS := -DPLATFORM_LITO
+ LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4"
endif
ifneq ($(filter sdm660,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS := -DPLATFORM_MSMFALCON
diff --git a/hal/audio_extn/a2dp.c b/hal/audio_extn/a2dp.c
old mode 100644
new mode 100755
index b76b5ec..6915603
--- a/hal/audio_extn/a2dp.c
+++ b/hal/audio_extn/a2dp.c
@@ -76,6 +76,7 @@
#define MEDIA_FMT_SBC_ALLOCATION_METHOD_LOUDNESS 0
#define MEDIA_FMT_SBC_ALLOCATION_METHOD_SNR 1
#define MIXER_ENC_CONFIG_BLOCK "SLIM_7_RX Encoder Config"
+#define MIXER_ENC_APTX_AD_CONFIG_BLOCK "SLIM_7_RX APTX_AD Enc Cfg"
#define MIXER_SOURCE_DEC_CONFIG_BLOCK "SLIM_7_TX Decoder Config"
#define MIXER_SINK_DEC_CONFIG_BLOCK "SLIM_9_TX Decoder Config"
#define MIXER_ENC_BIT_FORMAT "AFE Input Bit Format"
@@ -577,6 +578,30 @@
struct abr_enc_cfg_t abr_cfg;
} __attribute__ ((packed));
+struct aptx_ad_enc_cfg_ext_r2_t
+{
+ uint32_t sampling_freq;
+ uint32_t mtu;
+ uint32_t channel_mode;
+ uint32_t min_sink_modeA;
+ uint32_t max_sink_modeA;
+ uint32_t min_sink_modeB;
+ uint32_t max_sink_modeB;
+ uint32_t min_sink_modeC;
+ uint32_t max_sink_modeC;
+ uint32_t mode;
+ uint32_t input_mode;
+ uint32_t fade_duration;
+ uint8_t sink_cap[11];
+} __attribute__ ((packed));
+
+struct aptx_ad_enc_cfg_r2_t
+{
+ struct custom_enc_cfg_t custom_cfg;
+ struct aptx_ad_enc_cfg_ext_r2_t aptx_ad_cfg;
+ struct abr_enc_cfg_t abr_cfg;
+} __attribute__ ((packed));
+
/* APTX AD SPEECH structure */
struct aptx_ad_speech_enc_cfg_t
{
@@ -636,21 +661,26 @@
} audio_aptx_default_config;
typedef struct {
- uint8_t sampling_rate;
- uint8_t channel_mode;
- uint16_t mtu;
- uint8_t min_sink_modeA;
- uint8_t max_sink_modeA;
- uint8_t min_sink_modeB;
- uint8_t max_sink_modeB;
- uint8_t min_sink_modeC;
- uint8_t max_sink_modeC;
+ uint32_t sampling_rate;
+ uint32_t mtu;
+ int32_t channel_mode;
+ uint32_t min_sink_modeA;
+ uint32_t max_sink_modeA;
+ uint32_t min_sink_modeB;
+ uint32_t max_sink_modeB;
+ uint32_t min_sink_modeC;
+ uint32_t max_sink_modeC;
+ uint32_t encoder_mode;
uint8_t TTP_modeA_low;
uint8_t TTP_modeA_high;
uint8_t TTP_modeB_low;
uint8_t TTP_modeB_high;
+ uint8_t TTP_TWS_low;
+ uint8_t TTP_TWS_high;
uint32_t bits_per_sample;
- uint16_t encoder_mode;
+ uint32_t input_mode;
+ uint32_t fade_duration;
+ uint8_t sink_cap[11];
} audio_aptx_ad_config;
typedef struct {
@@ -1127,11 +1157,15 @@
} else {
sampling_rate = a2dp.enc_sampling_rate;
}
- //For LDAC encoder and AAC decoder open slimbus port at
- //96Khz for 48Khz input and 88.2Khz for 44.1Khz input.
+ /*
+ * For LDAC encoder and AAC decoder open slimbus port at
+ * 96Khz for 48Khz input and 88.2Khz for 44.1Khz input.
+ * For APTX AD encoder, open slimbus port at 96Khz for 48Khz input.
+ */
if (((a2dp.bt_encoder_format == CODEC_TYPE_LDAC) ||
(a2dp.bt_decoder_format == CODEC_TYPE_SBC) ||
- (a2dp.bt_decoder_format == AUDIO_FORMAT_AAC)) &&
+ (a2dp.bt_decoder_format == AUDIO_FORMAT_AAC) ||
+ (a2dp.bt_encoder_format == CODEC_TYPE_APTX_AD)) &&
(sampling_rate == 48000 || sampling_rate == 44100 )) {
sampling_rate = sampling_rate *2;
}
@@ -1698,6 +1732,79 @@
return ret;
}
+static int update_aptx_ad_dsp_config_r2(struct aptx_ad_enc_cfg_r2_t *aptx_dsp_cfg,
+ audio_aptx_encoder_config *aptx_bt_cfg)
+{
+ int ret = 0;
+
+ if (aptx_dsp_cfg == NULL || aptx_bt_cfg == NULL) {
+ ALOGE("Invalid param, aptx_dsp_cfg %p aptx_bt_cfg %p",
+ aptx_dsp_cfg, aptx_bt_cfg);
+ return -EINVAL;
+ }
+
+ memset(aptx_dsp_cfg, 0x0, sizeof(struct aptx_ad_enc_cfg_r2_t));
+ aptx_dsp_cfg->custom_cfg.enc_format = MEDIA_FMT_APTX_AD;
+
+
+ aptx_dsp_cfg->aptx_ad_cfg.sampling_freq = aptx_bt_cfg->ad_cfg->sampling_rate;
+ aptx_dsp_cfg->aptx_ad_cfg.mtu = aptx_bt_cfg->ad_cfg->mtu;
+ aptx_dsp_cfg->aptx_ad_cfg.channel_mode = aptx_bt_cfg->ad_cfg->channel_mode;
+ aptx_dsp_cfg->aptx_ad_cfg.min_sink_modeA = aptx_bt_cfg->ad_cfg->min_sink_modeA;
+ aptx_dsp_cfg->aptx_ad_cfg.max_sink_modeA = aptx_bt_cfg->ad_cfg->max_sink_modeA;
+ aptx_dsp_cfg->aptx_ad_cfg.min_sink_modeB = aptx_bt_cfg->ad_cfg->min_sink_modeB;
+ aptx_dsp_cfg->aptx_ad_cfg.max_sink_modeB = aptx_bt_cfg->ad_cfg->max_sink_modeB;
+ aptx_dsp_cfg->aptx_ad_cfg.min_sink_modeC = aptx_bt_cfg->ad_cfg->min_sink_modeC;
+ aptx_dsp_cfg->aptx_ad_cfg.max_sink_modeC = aptx_bt_cfg->ad_cfg->max_sink_modeC;
+ aptx_dsp_cfg->aptx_ad_cfg.mode = aptx_bt_cfg->ad_cfg->encoder_mode;
+ aptx_dsp_cfg->aptx_ad_cfg.input_mode = aptx_bt_cfg->ad_cfg->input_mode;
+ aptx_dsp_cfg->aptx_ad_cfg.fade_duration = aptx_bt_cfg->ad_cfg->fade_duration;
+ for (int i = 0; i < sizeof(aptx_dsp_cfg->aptx_ad_cfg.sink_cap); i ++)
+ aptx_dsp_cfg->aptx_ad_cfg.sink_cap[i] = aptx_bt_cfg->ad_cfg->sink_cap[i];
+ aptx_dsp_cfg->abr_cfg.imc_info.direction = IMC_RECEIVE;
+ aptx_dsp_cfg->abr_cfg.imc_info.enable = IMC_ENABLE;
+ aptx_dsp_cfg->abr_cfg.imc_info.purpose = IMC_PURPOSE_ID_BT_INFO;
+ aptx_dsp_cfg->abr_cfg.imc_info.comm_instance = a2dp.abr_config.imc_instance;
+
+
+ switch(aptx_dsp_cfg->aptx_ad_cfg.channel_mode) {
+ case APTX_AD_CHANNEL_UNCHANGED:
+ case APTX_AD_CHANNEL_JOINT_STEREO:
+ case APTX_AD_CHANNEL_DUAL_MONO:
+ case APTX_AD_CHANNEL_STEREO_TWS:
+ case APTX_AD_CHANNEL_EARBUD:
+ default:
+ a2dp.enc_channels = CH_STEREO;
+ aptx_dsp_cfg->custom_cfg.num_channels = CH_STEREO;
+ aptx_dsp_cfg->custom_cfg.channel_mapping[0] = PCM_CHANNEL_L;
+ aptx_dsp_cfg->custom_cfg.channel_mapping[1] = PCM_CHANNEL_R;
+ break;
+ case APTX_AD_CHANNEL_MONO:
+ a2dp.enc_channels = CH_MONO;
+ aptx_dsp_cfg->custom_cfg.num_channels = CH_MONO;
+ aptx_dsp_cfg->custom_cfg.channel_mapping[0] = PCM_CHANNEL_C;
+ break;
+ }
+ switch(aptx_dsp_cfg->aptx_ad_cfg.sampling_freq) {
+ case APTX_AD_SR_UNCHANGED:
+ case APTX_AD_48:
+ default:
+ a2dp.enc_sampling_rate = SAMPLING_RATE_48K;
+ aptx_dsp_cfg->custom_cfg.sample_rate = SAMPLING_RATE_48K;
+ break;
+ case APTX_AD_44_1:
+ a2dp.enc_sampling_rate = SAMPLING_RATE_441K;
+ aptx_dsp_cfg->custom_cfg.sample_rate = SAMPLING_RATE_441K;
+ break;
+ }
+ ALOGV("Successfully updated APTX AD enc format with \
+ samplingrate: %d channels:%d",
+ aptx_dsp_cfg->custom_cfg.sample_rate,
+ aptx_dsp_cfg->custom_cfg.num_channels);
+
+ return ret;
+}
+
static void audio_a2dp_update_tws_channel_mode()
{
char* channel_mode;
@@ -1810,6 +1917,7 @@
bool configure_aptx_enc_format(audio_aptx_encoder_config *aptx_bt_cfg)
{
struct mixer_ctl *ctl_enc_data = NULL;
+ struct mixer_ctl *aptx_ad_ctl = NULL;
int mixer_size = 0;
bool is_configured = false;
int ret = 0;
@@ -1827,9 +1935,17 @@
#ifndef LINUX_ENABLED
struct aptx_enc_cfg_t aptx_dsp_cfg;
struct aptx_ad_enc_cfg_t aptx_ad_dsp_cfg;
+ struct aptx_ad_enc_cfg_r2_t aptx_ad_dsp_cfg_r2;
if (a2dp.is_aptx_adaptive) {
- mixer_size = sizeof(struct aptx_ad_enc_cfg_t);
- ret = update_aptx_ad_dsp_config(&aptx_ad_dsp_cfg, aptx_bt_cfg);
+ aptx_ad_ctl = mixer_get_ctl_by_name(a2dp.adev->mixer,
+ MIXER_ENC_APTX_AD_CONFIG_BLOCK);
+ if (aptx_ad_ctl) {
+ mixer_size = sizeof(struct aptx_ad_enc_cfg_r2_t);
+ ret = update_aptx_ad_dsp_config_r2(&aptx_ad_dsp_cfg_r2, aptx_bt_cfg);
+ } else {
+ mixer_size = sizeof(struct aptx_ad_enc_cfg_t);
+ ret = update_aptx_ad_dsp_config(&aptx_ad_dsp_cfg, aptx_bt_cfg);
+ }
sample_rate_backup = aptx_ad_dsp_cfg.custom_cfg.sample_rate;
} else {
mixer_size = sizeof(struct aptx_enc_cfg_t);
@@ -1842,7 +1958,11 @@
}
if (a2dp.is_aptx_adaptive) {
- ret = mixer_ctl_set_array(ctl_enc_data, (void *)&aptx_ad_dsp_cfg,
+ if (aptx_ad_ctl)
+ ret = mixer_ctl_set_array(aptx_ad_ctl, (void *)&aptx_ad_dsp_cfg_r2,
+ mixer_size);
+ else
+ ret = mixer_ctl_set_array(ctl_enc_data, (void *)&aptx_ad_dsp_cfg,
mixer_size);
} else {
ret = mixer_ctl_set_array(ctl_enc_data, (void *)&aptx_dsp_cfg,
diff --git a/hal/audio_extn/audio_defs.h b/hal/audio_extn/audio_defs.h
index 3fd4b85..d8d1bbb 100644
--- a/hal/audio_extn/audio_defs.h
+++ b/hal/audio_extn/audio_defs.h
@@ -249,6 +249,12 @@
struct audio_device_cfg_param dev_cfg_params;
};
+struct audio_out_presentation_position_param {
+ struct timespec timestamp;
+ uint64_t frames;
+ int32_t clock_id;
+};
+
typedef struct mix_matrix_params {
uint16_t num_output_channels;
uint16_t num_input_channels;
@@ -282,6 +288,7 @@
struct audio_device_cfg_param device_cfg;
struct mix_matrix_params mm_params;
struct audio_license_params license_params;
+ struct audio_out_presentation_position_param pos_param;
} audio_extn_param_payload;
typedef enum {
@@ -305,6 +312,7 @@
AUDIO_EXTN_PARAM_CH_MIX_MATRIX_PARAMS,
/* License information */
AUDIO_EXTN_PARAM_LICENSE_PARAMS,
+ AUDIO_EXTN_PARAM_OUT_PRESENTATION_POSITION,
} audio_extn_param_id;
typedef union {
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index 11b96e7..f00f74d 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -3132,6 +3132,13 @@
ALOGE("%s:: avdrift query failed error %d", __func__, ret);
}
break;
+ case AUDIO_EXTN_PARAM_OUT_PRESENTATION_POSITION:
+ ret = audio_ext_get_presentation_position(out,
+ (struct audio_out_presentation_position_param *)payload);
+ if (ret < 0)
+ ALOGE("%s:: presentation position query failed error %d",
+ __func__, ret);
+ break;
default:
ALOGE("%s:: unsupported param_id %d", __func__, param_id);
break;
@@ -5164,3 +5171,29 @@
ALOGD_IF(kv_pairs != NULL, "%s: returns %s", __func__, kv_pairs);
free(kv_pairs);
}
+
+int audio_ext_get_presentation_position(struct stream_out *out,
+ struct audio_out_presentation_position_param *pos_param)
+{
+ int ret = -ENODATA;
+
+ if (!out) {
+ ALOGE("%s:: Invalid stream",__func__);
+ return ret;
+ }
+
+ if (is_offload_usecase(out->usecase)) {
+ if (out->compr != NULL)
+ ret = audio_extn_utils_compress_get_dsp_presentation_pos(out,
+ &pos_param->frames, &pos_param->timestamp, pos_param->clock_id);
+ } else {
+ if (out->pcm)
+ ret = audio_extn_utils_pcm_get_dsp_presentation_pos(out,
+ &pos_param->frames, &pos_param->timestamp, pos_param->clock_id);
+ }
+
+ ALOGV("%s frames %lld timestamp %lld", __func__, (long long int)pos_param->frames,
+ pos_param->timestamp.tv_sec*1000000000LL + pos_param->timestamp.tv_nsec);
+
+ return ret;
+}
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index facf590..b3297ed 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -1083,6 +1083,12 @@
int audio_extn_utils_set_downmix_params(
struct stream_out *out,
struct mix_matrix_params *mm_params);
+int audio_ext_get_presentation_position(struct stream_out *out,
+ struct audio_out_presentation_position_param *pos_param);
+int audio_extn_utils_compress_get_dsp_presentation_pos(struct stream_out *out,
+ uint64_t *frames, struct timespec *timestamp, int32_t clock_id);
+int audio_extn_utils_pcm_get_dsp_presentation_pos(struct stream_out *out,
+ uint64_t *frames, struct timespec *timestamp, int32_t clock_id);
#ifdef AUDIO_HW_LOOPBACK_ENABLED
/* API to create audio patch */
int audio_extn_hw_loopback_create_audio_patch(struct audio_hw_device *dev,
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index af89a8a..09921af 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -30,6 +30,7 @@
#include <log/log.h>
#include <cutils/misc.h>
#include <unistd.h>
+#include <sys/ioctl.h>
#include "audio_hw.h"
@@ -39,6 +40,7 @@
#include "voice.h"
#include <sound/compress_params.h>
#include <sound/compress_offload.h>
+#include <sound/devdep_params.h>
#include <tinycompress/tinycompress.h>
#ifdef DYNAMIC_LOG_ENABLED
@@ -2258,6 +2260,80 @@
}
#endif
+#ifdef SNDRV_COMPRESS_DSP_POSITION
+int audio_extn_utils_compress_get_dsp_presentation_pos(struct stream_out *out,
+ uint64_t *frames, struct timespec *timestamp, int32_t clock_id)
+{
+ int ret = -EINVAL;
+ uint64_t *val = NULL;
+ uint64_t time = 0;
+ struct snd_compr_metadata metadata;
+
+ ALOGV("%s:: Quering DSP position with clock id %d",__func__, clock_id);
+ metadata.key = SNDRV_COMPRESS_DSP_POSITION;
+ metadata.value[0] = clock_id;
+ ret = compress_get_metadata(out->compr, &metadata);
+ if (ret) {
+ ALOGE("%s::error %s", __func__, compress_get_error(out->compr));
+ ret = -errno;
+ goto exit;
+ }
+ val = (uint64_t *)&metadata.value[1];
+ *frames = *val;
+ time = *(val + 1);
+ timestamp->tv_sec = time / 1000000;
+ timestamp->tv_nsec = (time % 1000000)*1000;
+
+exit:
+ return ret;
+}
+#else
+int audio_extn_utils_compress_get_dsp_presentation_pos(struct stream_out *out __unused,
+ uint64_t *frames __unused, struct timespec *timestamp __unused,
+ int32_t clock_id __unused)
+{
+ ALOGD("%s:: dsp presentation position not supported", __func__);
+ return 0;
+
+}
+#endif
+
+#ifdef SNDRV_PCM_IOCTL_DSP_POSITION
+int audio_extn_utils_pcm_get_dsp_presentation_pos(struct stream_out *out,
+ uint64_t *frames, struct timespec *timestamp, int32_t clock_id)
+{
+ int ret = -EINVAL;
+ uint64_t time = 0;
+ struct snd_pcm_prsnt_position prsnt_position;
+
+ ALOGV("%s:: Quering DSP position with clock id %d",__func__, clock_id);
+ prsnt_position.clock_id = clock_id;
+ ret = pcm_ioctl(out->pcm, SNDRV_PCM_IOCTL_DSP_POSITION, &prsnt_position);
+ if (ret) {
+ ALOGE("%s::error %d", __func__, ret);
+ ret = -EIO;
+ goto exit;
+ }
+
+ *frames = prsnt_position.frames;
+ time = prsnt_position.timestamp;
+ timestamp->tv_sec = time / 1000000;
+ timestamp->tv_nsec = (time % 1000000)*1000;
+
+exit:
+ return ret;
+}
+#else
+int audio_extn_utils_pcm_get_dsp_presentation_pos(struct stream_out *out __unused,
+ uint64_t *frames __unused, struct timespec *timestamp __unused,
+ int32_t clock_id __unused)
+{
+ ALOGD("%s:: dsp presentation position not supported", __func__);
+ return 0;
+
+}
+#endif
+
#define MAX_SND_CARD 8
#define RETRY_US 1000000
#define RETRY_NUMBER 40
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index bc74132..a7df7d6 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -583,14 +583,19 @@
adev->adm_request_focus(adev->adm_data, out->handle);
}
-static void request_in_focus(struct stream_in *in, long ns)
+static int request_in_focus(struct stream_in *in, long ns)
{
struct audio_device *adev = in->dev;
+ int ret = 0;
- if (adev->adm_request_focus_v2)
+ if (adev->adm_request_focus_v2_1)
+ ret = adev->adm_request_focus_v2_1(adev->adm_data, in->capture_handle, ns);
+ else if (adev->adm_request_focus_v2)
adev->adm_request_focus_v2(adev->adm_data, in->capture_handle, ns);
else if (adev->adm_request_focus)
adev->adm_request_focus(adev->adm_data, in->capture_handle);
+
+ return ret;
}
static void release_out_focus(struct stream_out *out)
@@ -1843,33 +1848,40 @@
if (channels > MAX_HIFI_CHANNEL_COUNT)
channels = MAX_HIFI_CHANNEL_COUNT;
- channel_count = DEFAULT_CHANNEL_COUNT;
-
if (is_playback) {
- // For playback we never report mono because the framework always outputs stereo
- // audio_channel_out_mask_from_count() does return positional masks for channel counts
- // above 2 but we want indexed masks here.
- supported_channel_masks[num_masks++] = audio_channel_out_mask_from_count(channel_count);
+ // start from 2 channels as framework currently doesn't support mono.
+ if (channels >= FCC_2) {
+ supported_channel_masks[num_masks++] = audio_channel_out_mask_from_count(FCC_2);
+ }
+ for (channel_count = FCC_2;
+ channel_count <= channels && num_masks < max_masks;
+ ++channel_count) {
+ supported_channel_masks[num_masks++] =
+ audio_channel_mask_for_index_assignment_from_count(channel_count);
+ }
} else {
+ // For capture we report all supported channel masks from 1 channel up.
+ channel_count = MIN_CHANNEL_COUNT;
// audio_channel_in_mask_from_count() does the right conversion to either positional or
// indexed mask
- supported_channel_masks[num_masks++] = audio_channel_in_mask_from_count(channel_count);
- }
-
- for (channel_count = channels; ((channel_count >= DEFAULT_CHANNEL_COUNT) &&
- (num_masks < max_masks)); channel_count--) {
- const audio_channel_mask_t mask =
- audio_channel_in_mask_from_count(channel_count);
- supported_channel_masks[num_masks++] = mask;
- const audio_channel_mask_t index_mask =
- audio_channel_mask_for_index_assignment_from_count(channel_count);
- if (mask != index_mask && num_masks < max_masks) { // ensure index mask added.
- supported_channel_masks[num_masks++] = index_mask;
+ for ( ; channel_count <= channels && num_masks < max_masks; channel_count++) {
+ audio_channel_mask_t mask = AUDIO_CHANNEL_NONE;
+ if (channel_count <= FCC_2) {
+ mask = audio_channel_in_mask_from_count(channel_count);
+ supported_channel_masks[num_masks++] = mask;
+ }
+ const audio_channel_mask_t index_mask =
+ audio_channel_mask_for_index_assignment_from_count(channel_count);
+ if (mask != index_mask && num_masks < max_masks) { // ensure index mask added.
+ supported_channel_masks[num_masks++] = index_mask;
+ }
}
}
- ALOGV("%s: %s supported ch %d supported_channel_masks[0] %08x num_masks %d", __func__,
- is_playback ? "P" : "C", channels, supported_channel_masks[0], num_masks);
+ for (size_t i = 0; i < num_masks; ++i) {
+ ALOGV("%s: %s supported ch %d supported_channel_masks[%zu] %08x num_masks %d", __func__,
+ is_playback ? "P" : "C", channels, i, supported_channel_masks[i], num_masks);
+ }
return num_masks;
}
@@ -4992,6 +5004,10 @@
if (alloc_haptic_buffer) {
adev->haptic_buffer = (uint8_t *)calloc(1, total_haptic_buffer_size);
+ if(adev->haptic_buffer == NULL) {
+ ALOGE("%s: failed to allocate mem for dev->haptic_buffer", __func__);
+ return -ENOMEM;
+ }
adev->haptic_buffer_size = total_haptic_buffer_size;
}
@@ -6146,6 +6162,8 @@
adev->adm_on_routing_change(adev->adm_data,
in->capture_handle);
ret = select_devices(adev, in->usecase);
+ if (in->usecase == USECASE_AUDIO_RECORD_LOW_LATENCY)
+ adev->adm_routing_changed = true;
}
}
}
@@ -6279,6 +6297,12 @@
goto exit;
}
+ if (in->usecase == USECASE_AUDIO_RECORD_LOW_LATENCY &&
+ !in->standby && adev->adm_routing_changed) {
+ ret = -ENOSYS;
+ goto exit;
+ }
+
if (in->standby) {
pthread_mutex_lock(&adev->lock);
if (in->usecase == USECASE_COMPRESS_VOIP_CALL)
@@ -6301,7 +6325,9 @@
ns = pcm_bytes_to_frames(in->pcm, bytes)*1000000000LL/
in->config.rate;
- request_in_focus(in, ns);
+ ret = request_in_focus(in, ns);
+ if (ret != 0)
+ goto exit;
bool use_mmap = is_mmap_usecase(in->usecase) || in->realtime;
if (audio_extn_cin_attached_usecase(in->usecase)) {
@@ -6370,6 +6396,8 @@
memset(buffer, 0, bytes);
}
in_standby(&in->stream.common);
+ if (in->usecase == USECASE_AUDIO_RECORD_LOW_LATENCY)
+ adev->adm_routing_changed = false;
ALOGV("%s: read failed status %d- sleeping for buffer duration", __func__, ret);
usleep((uint64_t)bytes * 1000000 / audio_stream_in_frame_size(stream) /
in_get_sample_rate(&in->stream.common));
@@ -8027,7 +8055,9 @@
if (adev->mode != mode) {
ALOGD("%s: mode %d\n", __func__, mode);
adev->mode = mode;
- if ((mode == AUDIO_MODE_NORMAL) && voice_is_in_call(adev)) {
+ if (voice_is_in_call(adev) &&
+ (mode == AUDIO_MODE_NORMAL ||
+ (mode == AUDIO_MODE_IN_COMMUNICATION && !voice_is_call_state_active(adev)))) {
list_for_each(node, &adev->usecase_list) {
usecase = node_to_item(node, struct audio_usecase, list);
if (usecase->type == VOICE_CALL)
@@ -9138,6 +9168,7 @@
adev->dsp_bit_width_enforce_mode = 0;
adev->enable_hfp = false;
adev->use_old_pspd_mix_ctrl = false;
+ adev->adm_routing_changed = false;
/* Loads platform specific libraries dynamically */
adev->platform = platform_init(adev);
@@ -9249,6 +9280,8 @@
dlsym(adev->adm_lib, "adm_is_noirq_avail");
adev->adm_on_routing_change = (adm_on_routing_change_t)
dlsym(adev->adm_lib, "adm_on_routing_change");
+ adev->adm_request_focus_v2_1 = (adm_request_focus_v2_1_t)
+ dlsym(adev->adm_lib, "adm_request_focus_v2_1");
}
}
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index 0b904bd..9a93ed7 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -531,6 +531,7 @@
typedef void (*adm_request_focus_v2_t)(void *, audio_io_handle_t, long);
typedef bool (*adm_is_noirq_avail_t)(void *, int, int, int);
typedef void (*adm_on_routing_change_t)(void *, audio_io_handle_t);
+typedef int (*adm_request_focus_v2_1_t)(void *, audio_io_handle_t, long);
struct audio_device {
struct audio_hw_device device;
@@ -600,6 +601,7 @@
adm_request_focus_v2_t adm_request_focus_v2;
adm_is_noirq_avail_t adm_is_noirq_avail;
adm_on_routing_change_t adm_on_routing_change;
+ adm_request_focus_v2_1_t adm_request_focus_v2_1;
void (*offload_effects_get_parameters)(struct str_parms *,
struct str_parms *);
@@ -640,6 +642,7 @@
struct listnode active_outputs_list;
bool use_old_pspd_mix_ctrl;
int camera_orientation; /* CAMERA_BACK_LANDSCAPE ... CAMERA_FRONT_PORTRAIT */
+ bool adm_routing_changed;
};
int select_devices(struct audio_device *adev,
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index ace49a0..80a52c7 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -3054,6 +3054,10 @@
{
int device_id = -1;
+ if ((usecase >= AUDIO_USECASE_MAX) || (usecase <= USECASE_INVALID)) {
+ ALOGE("%s: invalid usecase case idx %d", __func__, usecase);
+ return device_id;
+ }
if (device_type == PCM_PLAYBACK)
device_id = pcm_device_table[usecase][0];
else
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index 416c70b..e16d20a 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -423,7 +423,12 @@
int platform_get_pcm_device_id(audio_usecase_t usecase, int device_type)
{
- int device_id;
+ int device_id = -1;
+
+ if ((usecase >= AUDIO_USECASE_MAX) || (usecase <= USECASE_INVALID)) {
+ ALOGE("%s: invalid usecase case idx %d", __func__, usecase);
+ return device_id;
+ }
if (device_type == PCM_PLAYBACK)
device_id = pcm_device_table[usecase][0];
else
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 16d0178..7fd2019 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -3965,7 +3965,12 @@
int platform_get_pcm_device_id(audio_usecase_t usecase, int device_type)
{
- int device_id;
+ int device_id = -1;
+
+ if ((usecase >= AUDIO_USECASE_MAX) || (usecase <= USECASE_INVALID)) {
+ ALOGE("%s: invalid usecase case idx %d", __func__, usecase);
+ return device_id;
+ }
if (device_type == PCM_PLAYBACK)
device_id = pcm_device_table[usecase][0];
else
@@ -3994,7 +3999,7 @@
int platform_get_delay(void *platform, int pcm_device_id)
{
int ctl_len = 0;
- struct audio_device *adev = ((struct platform_data *)platform)->adev;
+ struct audio_device *adev = NULL;
struct mixer_ctl *ctl = NULL;
const char *mixer_ctl_name = "ADSP Path Latency";
const char *deviceNo = "NN";
@@ -4010,6 +4015,8 @@
return -EINVAL;
}
+ adev = ((struct platform_data *)platform)->adev;
+
// Mixer control format: "ADSP Path Latency NN"
ctl_len = strlen(mixer_ctl_name) + 1 + strlen(deviceNo) + 1;
diff --git a/post_proc/effect_api.c b/post_proc/effect_api.c
index cff4be3..4101647 100644
--- a/post_proc/effect_api.c
+++ b/post_proc/effect_api.c
@@ -264,7 +264,10 @@
{
long param_values[128] = {0};
long *p_param_values = param_values;
- int i, *cfg = NULL;
+ int i;
+ int32_t *p_coeffs = NULL;
+ uint32_t lpf_len = 0, hpf_len = 0, bpf_len = 0;
+ uint32_t bsf_len = 0, tsf_len = 0, total_coeffs_len = 0;
ALOGV("%s: enabled=%d", __func__, pbe->enable_flag);
*p_param_values++ = PBE_MODULE;
@@ -283,9 +286,42 @@
*p_param_values++ = CONFIG_SET;
*p_param_values++ = 0; /* start offset if param size if greater than 128 */
*p_param_values++ = pbe->cfg_len;
- cfg = (int *)&pbe->config;
- for (i = 0; i < (int)pbe->cfg_len ; i+= sizeof(*p_param_values))
- *p_param_values++ = *cfg++;
+ *p_param_values++ = pbe->config.real_bass_mix;
+ *p_param_values++ = pbe->config.bass_color_control;
+ *p_param_values++ = pbe->config.main_chain_delay;
+ *p_param_values++ = pbe->config.xover_filter_order;
+ *p_param_values++ = pbe->config.bandpass_filter_order;
+ *p_param_values++ = pbe->config.drc_delay;
+ *p_param_values++ = pbe->config.rms_tav;
+ *p_param_values++ = pbe->config.exp_threshold;
+ *p_param_values++ = pbe->config.exp_slope;
+ *p_param_values++ = pbe->config.comp_threshold;
+ *p_param_values++ = pbe->config.comp_slope;
+ *p_param_values++ = pbe->config.makeup_gain;
+ *p_param_values++ = pbe->config.comp_attack;
+ *p_param_values++ = pbe->config.comp_release;
+ *p_param_values++ = pbe->config.exp_attack;
+ *p_param_values++ = pbe->config.exp_release;
+ *p_param_values++ = pbe->config.limiter_bass_threshold;
+ *p_param_values++ = pbe->config.limiter_high_threshold;
+ *p_param_values++ = pbe->config.limiter_bass_makeup_gain;
+ *p_param_values++ = pbe->config.limiter_high_makeup_gain;
+ *p_param_values++ = pbe->config.limiter_bass_gc;
+ *p_param_values++ = pbe->config.limiter_high_gc;
+ *p_param_values++ = pbe->config.limiter_delay;
+ *p_param_values++ = pbe->config.reserved;
+
+ p_coeffs = &pbe->config.p1LowPassCoeffs[0];
+ lpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
+ hpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
+ bpf_len = pbe->config.bandpass_filter_order * 5;
+ bsf_len = 5;
+ tsf_len = 5;
+ total_coeffs_len = lpf_len + hpf_len + bpf_len + bsf_len + tsf_len;
+
+ for (i = 0; i < total_coeffs_len; i++) {
+ *p_param_values++ = *p_coeffs++;
+ }
param_values[2] += 1;
}
@@ -533,7 +569,7 @@
for (i=0; i<eq->config.num_bands; i++) {
*p_param_values++ = eq->per_band_cfg[i].band_idx;
*p_param_values++ = eq->per_band_cfg[i].filter_type;
- *p_param_values++ = eq->per_band_cfg[i].freq_millihertz;
+ *p_param_values++ = eq->per_band_cfg[i].freq_millihertz;
*p_param_values++ = eq->per_band_cfg[i].gain_millibels;
*p_param_values++ = eq->per_band_cfg[i].quality_factor;
}
diff --git a/qahw/inc/qahw_defs.h b/qahw/inc/qahw_defs.h
index 755553b..e8a7ca7 100644
--- a/qahw/inc/qahw_defs.h
+++ b/qahw/inc/qahw_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2011 The Android Open Source Project *
@@ -332,6 +332,12 @@
int64_t adjust_time;
};
+struct qahw_out_presentation_position_param {
+ struct timespec timestamp;
+ uint64_t frames;
+ int32_t clock_id;
+};
+
#define QAHW_MAX_ADSP_STREAM_CMD_PAYLOAD_LEN 512
typedef enum {
@@ -396,6 +402,7 @@
struct qahw_device_cfg_param device_cfg_params;
struct qahw_mix_matrix_params mix_matrix_params;
struct qahw_license_params license_params;
+ struct qahw_out_presentation_position_param pos_param;
} qahw_param_payload;
typedef enum {
@@ -415,6 +422,7 @@
QAHW_PARAM_OUT_MIX_MATRIX_PARAMS,
QAHW_PARAM_CH_MIX_MATRIX_PARAMS,
QAHW_PARAM_LICENSE_PARAMS,
+ QAHW_PARAM_OUT_PRESENTATION_POSITION,
} qahw_param_id;
typedef union {
diff --git a/qahw_api/inc/qahw_defs.h b/qahw_api/inc/qahw_defs.h
index 7c01c57..7bd5118 100644
--- a/qahw_api/inc/qahw_defs.h
+++ b/qahw_api/inc/qahw_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2011 The Android Open Source Project *
@@ -313,6 +313,12 @@
int64_t adjust_time;
};
+struct qahw_out_presentation_position_param {
+ struct timespec timestamp;
+ uint64_t frames;
+ int32_t clock_id;
+};
+
#define QAHW_MAX_ADSP_STREAM_CMD_PAYLOAD_LEN 512
typedef enum {
@@ -378,6 +384,7 @@
struct qahw_device_cfg_param device_cfg_params;
struct qahw_mix_matrix_params mix_matrix_params;
struct qahw_license_params license_params;
+ struct qahw_out_presentation_position_param pos_param;
} qahw_param_payload;
typedef enum {
@@ -397,6 +404,7 @@
QAHW_PARAM_OUT_MIX_MATRIX_PARAMS,
QAHW_PARAM_CH_MIX_MATRIX_PARAMS,
QAHW_PARAM_LICENSE_PARAMS,
+ QAHW_PARAM_OUT_PRESENTATION_POSITION,
} qahw_param_id;
diff --git a/qahw_api/test/qahw_multi_record_test.c b/qahw_api/test/qahw_multi_record_test.c
index c345509..eccfe76 100644
--- a/qahw_api/test/qahw_multi_record_test.c
+++ b/qahw_api/test/qahw_multi_record_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2015 The Android Open Source Project *
@@ -77,6 +77,7 @@
char kvpairs[256];
bool timestamp_mode;
char timestamp_file_in[256];
+ bool bt_wbs;
};
struct timed_params {
@@ -260,7 +261,7 @@
double time_elapsed = 0;
ssize_t bytes_read = -1;
char param[100] = "audio_stream_profile=";
- char file_name[256] = "/data/rec";
+ char file_name[256] = "/data/audio/rec";
int data_sz = 0, name_len = strlen(file_name);
qahw_in_buffer_t in_buf;
static int64_t timestamp = 1;
@@ -347,6 +348,12 @@
strlcat(param, params->profile, sizeof(param));
qahw_in_set_parameters(in_handle, param);
+ if (audio_is_bluetooth_sco_device(params->input_device)) {
+ char param1[50];
+ snprintf(param1, sizeof(param1), "bt_wbs=%s", ((params->bt_wbs == 1) ? "on" : "off"));
+ qahw_set_parameters(qahw_mod_handle, param1);
+ }
+
/* Caution: Below ADL log shouldnt be altered without notifying automation APT since it used for
* automation testing
*/
@@ -548,6 +555,11 @@
scanf(" %d", &thread_param->input_device);
thread_param->input_device |= AUDIO_DEVICE_BIT_IN;
+ if (thread_param->input_device == AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET) {
+ printf(" \n Enable wbs for BT sco?? (1 - Enable 0 - Disable) ::::: ");
+ scanf("%d", &thread_param->bt_wbs);
+ }
+
printf(" \n Enter the format (1 ->16 bit pcm recording, 6 -> 24 bit packed pcm recording) ::::: ");
scanf(" %d", &thread_param->config.format);
@@ -587,6 +599,7 @@
thread_param->record_length = 8 /*sec*/;
thread_param->record_delay = 0 /*sec*/;
thread_param->timestamp_mode = false;
+ thread_param->bt_wbs = false;
thread_param->handle = 0x99A - rec_session;
}
@@ -613,6 +626,7 @@
printf(" All other flags passed would be ignore if this flag is used\n\n");
printf(" -S --source-tracking - Use this flag to show capture source tracking params for recordings\n\n");
printf(" -k --kvpairs - kvpairs to be set globally\n");
+ printf(" -z --bt-wbs - set bt_wbs param\n");
printf(" -h --help - Show this help\n\n");
printf(" \n Examples \n");
printf(" hal_rec_test -> start a recording stream with default configurations\n\n");
@@ -670,6 +684,7 @@
{"source-tracking", no_argument, 0, 'S'},
{"kvpairs", required_argument, 0, 'k'},
{"help", no_argument, 0, 'h'},
+ {"bt-wbs", no_argument, 0, 'z'},
{0, 0, 0, 0}
};
@@ -677,7 +692,7 @@
int option_index = 0;
while ((opt = getopt_long(argc,
argv,
- "-d:f:F:r:c:s:p:t:D:l:m:k:KiSh",
+ "-d:f:F:r:c:s:p:t:D:l:m:k:KiShz",
long_options,
&option_index)) != -1) {
switch (opt) {
@@ -727,6 +742,9 @@
case 'k':
snprintf(params[0].kvpairs, sizeof(params[0].kvpairs), "%s", optarg);
break;
+ case 'z':
+ params[0].bt_wbs = true;
+ break;
case 'h':
usage();
return 0;
diff --git a/qahw_api/test/qahw_playback_test.c b/qahw_api/test/qahw_playback_test.c
index 803242e..9f1489c 100644
--- a/qahw_api/test/qahw_playback_test.c
+++ b/qahw_api/test/qahw_playback_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2015 The Android Open Source Project *
@@ -648,6 +648,14 @@
fprintf(log_file, "stream %d: open output stream is success, out_handle %p\n", params->stream_index, params->out_handle);
+ if (audio_is_bluetooth_sco_device(params->output_device)) {
+ char param1[50];
+ int ret = -1;
+ snprintf(param1, sizeof(param1), "bt_wbs=%s", ((params->bt_wbs == 1) ? "on" : "off"));
+ ret = qahw_set_parameters(params->qahw_out_hal_handle, param1);
+ fprintf(log_file, " param %s set to hal with return value %d\n", param1, ret);
+ }
+
if (kpi_mode == true) {
measure_kpi_values(params->out_handle, params->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD);
rc = qahw_close_output_stream(params->out_handle);
@@ -1573,6 +1581,7 @@
printf(" -A --bt-addr <bt device addr> - Required to set bt device adress for aptx decoder\n\n");
printf(" -q --drift query - Required for querying avtime vs hdmi drift\n");
printf(" -Q --drift query and correction - Enable Drift query and correction\n");
+ printf(" -z --bt-wbs - Set bt_wbs param\n\n");
printf(" -P - Argument to do multi-stream playback, currently 2 streams are supported to run concurrently\n");
printf(" Put -P and mention required attributes for the next stream\n");
printf(" 0:bassboost 1:virtualizer 2:equalizer 3:visualizer(NA) 4:reverb 5:audiosphere others:null");
@@ -2103,6 +2112,7 @@
{"device-config", required_argument, 0, 'C'},
{"play-list", required_argument, 0, 'g'},
{"help", no_argument, 0, 'h'},
+ {"bt-wbs", no_argument, 0, 'z'},
{0, 0, 0, 0}
};
@@ -2125,7 +2135,7 @@
while ((opt = getopt_long(argc,
argv,
- "-f:r:c:b:d:s:v:V:l:t:a:w:k:PD:KF:Ee:A:u:m:S:C:p::x:y:qQh:i:h:g:O:",
+ "-f:r:c:b:d:s:v:V:l:t:a:w:k:PD:KF:Ee:A:u:m:S:C:p::x:y:qQzh:i:h:g:O:",
long_options,
&option_index)) != -1) {
@@ -2158,6 +2168,9 @@
case 'V':
enable_dump = atof(optarg);
break;
+ case 'z':
+ stream_param[i].bt_wbs = true;
+ break;
case 'l':
log_filename = optarg;
if (strcasecmp(log_filename, "stdout") &&
@@ -2498,10 +2511,19 @@
}
}
- if (stream->output_device != AUDIO_DEVICE_NONE)
- if ((stream->qahw_out_hal_handle = load_hal(stream->output_device)) <= 0)
+ if (stream->output_device != AUDIO_DEVICE_NONE) {
+ if ((stream->qahw_out_hal_handle = load_hal(stream->output_device)) <= 0)
goto exit;
+ /* Turn BT_SCO on if bt_sco recording */
+ if(audio_is_bluetooth_sco_device(stream->output_device)) {
+ int ret = -1;
+ const char * bt_sco_on = "BT_SCO=on";
+ ret = qahw_set_parameters(stream->qahw_out_hal_handle, bt_sco_on);
+ fprintf(log_file, " param %s set to hal with return value %d\n", bt_sco_on, ret);
+ }
+ }
+
if (stream->input_device != AUDIO_DEVICE_NONE)
if ((stream->qahw_in_hal_handle = load_hal(stream->input_device))== 0)
goto exit;
diff --git a/qahw_api/test/qahw_playback_test.h b/qahw_api/test/qahw_playback_test.h
index 0ac51df..6f33338 100644
--- a/qahw_api/test/qahw_playback_test.h
+++ b/qahw_api/test/qahw_playback_test.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017,2019, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2015 The Android Open Source Project *
@@ -145,6 +145,7 @@
pthread_mutex_t input_buffer_available_lock;
uint32_t input_buffer_available_size;
char *set_params;
+ bool bt_wbs;
}stream_config;
qahw_module_handle_t * load_hal(audio_devices_t dev);