sdm660-common: Enable AOSP bluetooth audio HAL v2

Change-Id: I4d12752ae5fb2829d6612647c8740c84967f5434
This commit is contained in:
dianlujitao 2019-10-12 10:12:37 +08:00 committed by Max Weffers
parent 5ddc52bdb3
commit fa6a145a1b
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE
4 changed files with 12 additions and 56 deletions

View file

@ -297,8 +297,8 @@
</module> </module>
<!-- A2DP Audio HAL --> <!-- A2DP Input Audio HAL -->
<xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/> <xi:include href="/vendor/etc/a2dp_in_audio_policy_configuration.xml"/>
<!-- Usb Audio HAL --> <!-- Usb Audio HAL -->
<xi:include href="/vendor/etc/usb_audio_policy_configuration.xml"/> <xi:include href="/vendor/etc/usb_audio_policy_configuration.xml"/>
@ -306,6 +306,9 @@
<!-- Remote Submix Audio HAL --> <!-- Remote Submix Audio HAL -->
<xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/> <xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="/vendor/etc/bluetooth_audio_policy_configuration.xml"/>
</modules> </modules>
<!-- End of Modules section --> <!-- End of Modules section -->

View file

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- A2dp Audio HAL Audio Policy Configuration file -->
<module name="bluetooth_qti" halVersion="2.0">
<mixPorts>
<mixPort name="a2dp output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="a2dp input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
</devicePorts>
<routes>
<route type="mix" sink="BT A2DP Out"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Headphones"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Speaker"
sources="a2dp output"/>
<route type="mix" sink="a2dp input"
sources="BT A2DP In"/>
</routes>
</module>

View file

@ -106,7 +106,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Bluetooth # Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
vendor.qcom.bluetooth.soc=cherokee \ vendor.qcom.bluetooth.soc=cherokee \
persist.bluetooth.bluetooth_audio_hal.disabled=true \ persist.bluetooth.bluetooth_audio_hal.disabled=false \
ro.vendor.bluetooth.wipower=false \ ro.vendor.bluetooth.wipower=false \
persist.bluetooth.a2dp_offload.disabled=false \ persist.bluetooth.a2dp_offload.disabled=false \
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac \ persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac \

View file

@ -133,11 +133,14 @@ PRODUCT_PACKAGES += \
libvolumelistener \ libvolumelistener \
tinymix.vendor tinymix.vendor
PRODUCT_PACKAGES += \
audio.bluetooth.default \
android.hardware.bluetooth.audio@2.0-impl
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
$(COMMON_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ $(COMMON_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(COMMON_PATH)/audio/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \ $(COMMON_PATH)/audio/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
$(COMMON_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ $(COMMON_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(COMMON_PATH)/audio/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml \
$(COMMON_PATH)/audio/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml \ $(COMMON_PATH)/audio/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml \
$(COMMON_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ $(COMMON_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
$(COMMON_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \ $(COMMON_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
@ -145,7 +148,8 @@ PRODUCT_COPY_FILES += \
$(COMMON_PATH)/audio/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml $(COMMON_PATH)/audio/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
$(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
$(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
$(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/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/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \