Merge "configs: Add hearing aid configs"
diff --git a/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml b/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml
new file mode 100644
index 0000000..7707ae1
--- /dev/null
+++ b/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+-->
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Bluetooth Audio HAL Audio Policy Configuration file -->
+<module name="bluetooth_qti" halVersion="2.0">
+ <mixPorts>
+ <!-- Hearing AIDs Audio Ports -->
+ <mixPort name="hearing aid output" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="24000,16000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ </mixPorts>
+ <devicePorts>
+ <!-- Hearing AIDs Audio Ports -->
+ <devicePort tagName="BT Hearing Aid Out" type="AUDIO_DEVICE_OUT_HEARING_AID" role="sink"/>
+ </devicePorts>
+ <routes>
+ <route type="mix" sink="BT Hearing Aid Out"
+ sources="hearing aid output"/>
+ </routes>
+</module>
diff --git a/configs/kona/audio_platform_info.xml b/configs/kona/audio_platform_info.xml
index f602da5..1ed7c04 100644
--- a/configs/kona/audio_platform_info.xml
+++ b/configs/kona/audio_platform_info.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2014, 2016-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2014, 2016-2020, 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 -->
@@ -46,6 +46,7 @@
<device name="SND_DEVICE_IN_USB_HEADSET_HEX_MIC_AEC" acdb_id="162"/>
<device name="SND_DEVICE_IN_UNPROCESSED_USB_HEADSET_HEX_MIC" acdb_id="162"/>
<device name="SND_DEVICE_IN_VOCE_RECOG_USB_HEADSET_HEX_MIC" acdb_id="162"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" acdb_id="11"/>
</acdb_ids>
<module_ids>
@@ -246,6 +247,7 @@
<device name="SND_DEVICE_IN_SPEAKER_QMIC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_THREE_MIC" interface="TX_CDC_DMA_TX_3"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_FLUENCE_PRO" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_AEC" interface="TX_CDC_DMA_TX_3"/>
diff --git a/configs/kona/audio_platform_info_intcodec.xml b/configs/kona/audio_platform_info_intcodec.xml
index a1ac568..5e4e757 100644
--- a/configs/kona/audio_platform_info_intcodec.xml
+++ b/configs/kona/audio_platform_info_intcodec.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2014, 2016-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2014, 2016-2020, 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 -->
@@ -138,6 +138,7 @@
<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="191"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" acdb_id="11"/>
</acdb_ids>
<backend_names>
<device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
@@ -267,6 +268,7 @@
<device name="SND_DEVICE_IN_SPEAKER_QMIC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_THREE_MIC" interface="TX_CDC_DMA_TX_3"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_FLUENCE_PRO" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_AEC" interface="TX_CDC_DMA_TX_3"/>
diff --git a/configs/kona/audio_platform_info_qrd.xml b/configs/kona/audio_platform_info_qrd.xml
index a8f765a..52f9844 100644
--- a/configs/kona/audio_platform_info_qrd.xml
+++ b/configs/kona/audio_platform_info_qrd.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2018-2020, 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 -->
@@ -135,6 +135,7 @@
<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="191"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" acdb_id="11"/>
</acdb_ids>
<module_ids>
<aec>
@@ -280,6 +281,7 @@
<device name="SND_DEVICE_IN_SPEAKER_QMIC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_THREE_MIC" interface="TX_CDC_DMA_TX_3"/>
+ <device name="SND_DEVICE_IN_VOICE_HEARING_AID" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_FLUENCE_PRO" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC" interface="TX_CDC_DMA_TX_3"/>
<device name="SND_DEVICE_IN_HANDSET_TMIC_AEC" interface="TX_CDC_DMA_TX_3"/>
diff --git a/configs/kona/audio_policy_configuration.xml b/configs/kona/audio_policy_configuration.xml
old mode 100755
new mode 100644
index 75b91a0..8675141
--- a/configs/kona/audio_policy_configuration.xml
+++ b/configs/kona/audio_policy_configuration.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (c) 2016-2019, The Linux Foundation. All rights reserved
+<!-- Copyright (c) 2016-2020, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
@@ -434,6 +434,9 @@
<!-- Remote Submix Audio HAL -->
<xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
+ <!-- Bluetooth Audio HAL for hearing aid -->
+ <xi:include href="/vendor/etc/bluetooth_qti_hearing_aid_audio_policy_configuration.xml"/>
+
</modules>
<!-- End of Modules section -->
diff --git a/configs/kona/kona.mk b/configs/kona/kona.mk
index 7b3ea62..189922e 100644
--- a/configs/kona/kona.mk
+++ b/configs/kona/kona.mk
@@ -206,7 +206,8 @@
$(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
- $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml
+ $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml \
+ $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_hearing_aid_audio_policy_configuration.xml
# Reduce client buffer size for fast audio output tracks
PRODUCT_PROPERTY_OVERRIDES += \
diff --git a/configs/kona/mixer_paths.xml b/configs/kona/mixer_paths.xml
index bbbe8e2..c3c5790 100644
--- a/configs/kona/mixer_paths.xml
+++ b/configs/kona/mixer_paths.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2015-2020, 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 -->
@@ -2036,6 +2036,11 @@
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
</path>
+ <path name="voicemmode1-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
+ </path>
+
<path name="voicemmode1-call headphones">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode1" value="1" />
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
@@ -2099,6 +2104,11 @@
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
</path>
+ <path name="voicemmode2-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
+ </path>
+
<path name="voicemmode2-call headphones">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode2" value="1" />
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
@@ -2735,6 +2745,10 @@
<path name="dmic-endfire" />
</path>
+ <path name="hearing-aid-mic">
+ <path name="voice-speaker-mic"/>
+ </path>
+
<path name="handset-stereo-dmic-ef-liquid">
<path name="handset-dmic-endfire" />
</path>
diff --git a/configs/kona/mixer_paths_cdp.xml b/configs/kona/mixer_paths_cdp.xml
index 8df2b66..0d83ccf 100644
--- a/configs/kona/mixer_paths_cdp.xml
+++ b/configs/kona/mixer_paths_cdp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2015-2020, 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 -->
@@ -1907,6 +1907,11 @@
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
</path>
+ <path name="voicemmode1-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
+ </path>
+
<path name="voicemmode1-call headphones">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode1" value="1" />
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
@@ -1960,6 +1965,11 @@
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
</path>
+ <path name="voicemmode2-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
+ </path>
+
<path name="voicemmode2-call headphones">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode2" value="1" />
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
@@ -2597,6 +2607,10 @@
<path name="dmic-endfire" />
</path>
+ <path name="hearing-aid-mic">
+ <path name="voice-speaker-mic"/>
+ </path>
+
<path name="handset-stereo-dmic-ef-liquid">
<path name="handset-dmic-endfire" />
</path>
diff --git a/configs/kona/mixer_paths_qrd.xml b/configs/kona/mixer_paths_qrd.xml
index 229c46d..f97bf9a 100644
--- a/configs/kona/mixer_paths_qrd.xml
+++ b/configs/kona/mixer_paths_qrd.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2015-2020, 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 -->
@@ -1912,6 +1912,11 @@
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
</path>
+ <path name="voicemmode1-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
+ </path>
+
<path name="voicemmode1-call handset">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode1" value="1" />
<ctl name="VoiceMMode1_Tx Mixer TX_CDC_DMA_TX_3_MMode1" value="1" />
@@ -1970,6 +1975,11 @@
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
</path>
+ <path name="voicemmode2-call hearing-aid">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
+ </path>
+
<path name="voicemmode2-call handset">
<ctl name="RX_CDC_DMA_RX_0_Voice Mixer VoiceMMode2" value="1" />
<ctl name="VoiceMMode2_Tx Mixer TX_CDC_DMA_TX_3_MMode2" value="1" />
@@ -2991,6 +3001,10 @@
<path name="dmic-endfire" />
</path>
+ <path name="hearing-aid-mic">
+ <path name="voice-speaker-mic"/>
+ </path>
+
<path name="speaker-dmic-broadside">
<path name="speaker-dmic-endfire" />
</path>