sm8250-common: switch to qti bt stack

This commit is contained in:
SGCMarkus 2022-02-21 13:59:59 +01:00
parent 7375f455fa
commit 3660a02879
6 changed files with 68 additions and 39 deletions

View File

@ -131,6 +131,11 @@ BOARD_SUPPORTS_SOUND_TRIGGER := true
BOARD_USES_ALSA_AUDIO := true
USE_CUSTOM_AUDIO_POLICY := 1
# Bluetooth
BOARD_HAVE_BLUETOOTH_QCOM := true
TARGET_FWK_SUPPORTS_FULL_VALUEADDS := true
TARGET_USE_QTI_BT_STACK := true
# Camera
TARGET_USES_QTI_CAMERA_DEVICE := true
USE_DEVICE_SPECIFIC_CAMERA := true

View File

@ -141,15 +141,6 @@
</devicePort>
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
</devicePort>
<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">
</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">
</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">
</devicePort>
<devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_HDMI" role="sink">
</devicePort>
<devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
@ -198,12 +189,6 @@
sources="primary output,deep_buffer,voip_rx"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep_buffer,voip_rx"/>
<route type="mix" sink="BT A2DP Out"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Headphones"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="HDMI Out"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
@ -230,27 +215,8 @@
</routes>
</module>
<!-- A2dp Audio HAL -->
<module name="a2dp" halVersion="2.0">
<mixPorts>
<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 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="a2dp input"
sources="BT A2DP In"/>
</routes>
</module>
<!-- A2DP Input Audio HAL -->
<xi:include href="a2dp_in_audio_policy_configuration.xml"/>
<!-- Usb Audio HAL -->
<xi:include href="usb_audio_policy_configuration.xml"/>
@ -258,6 +224,12 @@
<!-- Remote Submix Audio HAL -->
<xi:include href="r_submix_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="bluetooth_qti_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL for hearing aid -->
<xi:include href="bluetooth_qti_hearing_aid_audio_policy_configuration.xml"/>
</modules>
<!-- End of Modules section -->

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<config>
<component-override package="com.android.bluetooth" >
<component class=".avrcpcontroller.AvrcpControllerService" enabled="true" />
<component class=".ba.BATService" enabled="true" />
<component class=".hid.HidDeviceService" enabled="true" />
<component class=".sap.SapService" enabled="true" />
</component-override>
</config>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<config>
<component-override package="com.android.bluetooth" >
<component class=".a2dpsink.A2dpSinkService" enabled="true" />
<component class=".avrcp.AvrcpTargetService" enabled="false" />
</component-override>
</config>

View File

@ -106,10 +106,15 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_ext_spkr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_ext_spkr.conf \
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
$(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
$(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
hardware/qcom-caf/sm8250/audio/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml \
hardware/qcom-caf/sm8250/audio/configs/common/bluetooth_qti_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_hearing_aid_audio_policy_configuration.xml
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
@ -132,6 +137,11 @@ PRODUCT_PACKAGES += \
Snap \
vendor.qti.hardware.camera.postproc@1.0.vendor
# Component overrides
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
$(LOCAL_PATH)/configs/component-overrides_qti.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/component-overrides.xml
# Display
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@3.0-impl-qti-display \

View File

@ -1,6 +1,10 @@
# Audio
audio.offload.min.duration.secs=60
# Bluetooth
persist.vendor.btstack.aac_frm_ctl.enabled=true
ro.bluetooth.library_name=libbluetooth_qti.so
# Charger
ro.charger.enable_suspend=1