mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 11:55:31 -04:00
[APTX] universal7885: Add APTX support
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
2ba9a6ccbf
commit
1f8d0619cc
10 changed files with 132 additions and 5 deletions
BIN
universal7885-common/aptx/libaptXHD_encoder.so
Normal file
BIN
universal7885-common/aptx/libaptXHD_encoder.so
Normal file
Binary file not shown.
BIN
universal7885-common/aptx/libaptX_encoder.so
Normal file
BIN
universal7885-common/aptx/libaptX_encoder.so
Normal file
Binary file not shown.
|
|
@ -124,10 +124,11 @@
|
|||
</routes>
|
||||
|
||||
</module>
|
||||
|
||||
|
||||
<!-- A2dp Audio HAL -->
|
||||
<xi:include href="a2dp_audio_policy_configuration.xml"/>
|
||||
|
||||
<xi:include href="a2dp_in_audio_policy_configuration.xml"/>
|
||||
<!-- Bluetooth Audio HAL -->
|
||||
<xi:include href="bluetooth_audio_policy_configuration.xml"/>
|
||||
<!-- Usb Audio HAL -->
|
||||
<xi:include href="usb_audio_policy_configuration.xml"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Bluetooth Audio HAL Audio Policy Configuration file -->
|
||||
<module name="bluetooth" halVersion="2.0">
|
||||
<mixPorts>
|
||||
<!-- A2DP Audio Ports -->
|
||||
<mixPort name="a2dp output" role="source"/>
|
||||
<!-- 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>
|
||||
<!-- Le Audio Audio Ports -->
|
||||
<mixPort name="le audio output" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- A2DP Audio Ports -->
|
||||
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000 88200 96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<!-- Hearing AIDs Audio Ports -->
|
||||
<devicePort tagName="BT Hearing Aid Out" type="AUDIO_DEVICE_OUT_HEARING_AID" role="sink"/>
|
||||
<!-- BLE Audio Ports -->
|
||||
<devicePort tagName="BLE Headset Out" type="AUDIO_DEVICE_OUT_BLE_HEADSET" role="sink"/>
|
||||
<devicePort tagName="BLE Speaker Out" type="AUDIO_DEVICE_OUT_BLE_SPEAKER" role="sink"/>
|
||||
</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="BT Hearing Aid Out"
|
||||
sources="hearing aid output"/>
|
||||
<route type="mix" sink="BLE Headset Out"
|
||||
sources="le audio output"/>
|
||||
<route type="mix" sink="BLE Speaker Out"
|
||||
sources="le audio output"/>
|
||||
</routes>
|
||||
</module>
|
||||
|
|
@ -24,3 +24,16 @@ debug.sf.latch_unsignaled=0
|
|||
|
||||
# Wifi direct
|
||||
wifi.direct.interface=p2p0
|
||||
# Audio (APTX)
|
||||
|
||||
# A2DP offload supported
|
||||
ro.bluetooth.a2dp_offload.supported=true
|
||||
|
||||
# A2DP offload disabled (UI toggle property)
|
||||
persist.bluetooth.a2dp_offload.disabled=false
|
||||
|
||||
# A2DP offload DSP supported encoder list
|
||||
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
|
||||
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxhd-aac-ldac
|
||||
persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxhd-aac
|
||||
-ldac
|
||||
|
|
|
|||
|
|
@ -17,6 +17,15 @@
|
|||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.bluetooth.audio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IBluetoothAudioProvidersFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.biometrics.fingerprint</name>
|
||||
<transport>hwbinder</transport>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009-2012 Broadcom Corporation
|
||||
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.
|
||||
-->
|
||||
<resources>
|
||||
<!-- Configuring priorities of A2DP source codecs. Larger value means
|
||||
higher priority. Value -1 means the codec is disabled.
|
||||
Value 0 is reserved and should not be used here. Enabled codecs
|
||||
should have priorities in the interval [1, 999999], and each priority
|
||||
value should be unique. -->
|
||||
<integer name="a2dp_source_codec_priority_sbc">5001</integer>
|
||||
<integer name="a2dp_source_codec_priority_aac">4001</integer>
|
||||
<integer name="a2dp_source_codec_priority_aptx">2001</integer>
|
||||
<integer name="a2dp_source_codec_priority_aptx_hd">1001</integer>
|
||||
<integer name="a2dp_source_codec_priority_ldac">3001</integer>
|
||||
</resources>
|
||||
|
|
@ -138,6 +138,8 @@
|
|||
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@[0-9].[0-9]-service\.samsung u:object_r:hal_fingerprint_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.light@[0-9].[0-9]-service\.eureka u:object_r:hal_light_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@[0-9].[0-9]-service\.samsung u:object_r:hal_thermal_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.configstore@[0-9]\.[0-9]-service u:object_r:hal_vendor_configstore_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.ExynosHWCServiceTW@[0-9]\.[0-9]-service u:object_r:hal_vendor_hwcservice_default_exec:s0
|
||||
|
||||
####################################
|
||||
# Devices
|
||||
|
|
|
|||
|
|
@ -24,10 +24,25 @@ PRODUCT_PACKAGES += \
|
|||
libtinycompress \
|
||||
audio.r_submix.default \
|
||||
audio.usb.default \
|
||||
audio.a2dp.default
|
||||
audio.a2dp.default \
|
||||
libaudioroute \
|
||||
libtinyalsa \
|
||||
libtinycompress \
|
||||
libldacBT_bco
|
||||
|
||||
# Audio (BT)
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.bluetooth.audio@2.1-impl \
|
||||
audio.bluetooth.default
|
||||
|
||||
# Aptx
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
|
||||
$(LOCAL_PATH)/aptx/libaptX_encoder.so:$(TARGET_COPY_OUT_PRODUCT)/lib64/libaptX_encoder.so \
|
||||
$(LOCAL_PATH)/aptx/libaptXHD_encoder.so:$(TARGET_COPY_OUT_PRODUCT)/lib64/libaptXHD_encoder.so
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
|
||||
$(LOCAL_PATH)/configs/audio/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
|
||||
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
|
||||
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
|
||||
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
|
||||
|
|
|
|||
Loading…
Reference in a new issue