From 1eda2f37e7bb73ed1bfebd8029054ed594210de3 Mon Sep 17 00:00:00 2001 From: kuanyuhuang Date: Thu, 27 Oct 2022 09:53:49 +0000 Subject: [PATCH] BT: add sysprop to enable OPUS codec Add new system proprty persist.bluetooth.opus.enabled to indicate devices enable OPUS codec. Bug: 254609888 Test: atest net_test_stack:A2dpCodecConfigTest#init Change-Id: I3741ea42b5513ae1dd0cb7609301953a13861293 --- bluetooth/bt_vendor_overlay.conf | 2 ++ device-cheetah.mk | 4 ++++ device-panther.mk | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/bluetooth/bt_vendor_overlay.conf b/bluetooth/bt_vendor_overlay.conf index 70f14cb..0b1c80f 100644 --- a/bluetooth/bt_vendor_overlay.conf +++ b/bluetooth/bt_vendor_overlay.conf @@ -10,3 +10,5 @@ SarBackOffHighResolution = true BqrEventMaskValueUpdate = 262238 BtA2dpOffloadCap = sbc-aac-aptx-aptxhd-ldac-opus + +BtOpusEnabled = true diff --git a/device-cheetah.mk b/device-cheetah.mk index f62be6d..f1d58ad 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -164,6 +164,10 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES_DEBUG += \ hci_inject +# Bluetooth OPUS codec +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.opus.enabled=true + # Bluetooth Tx power caps PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_cheetah.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \ diff --git a/device-panther.mk b/device-panther.mk index efe59c3..2ca15bc 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -147,6 +147,10 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES_DEBUG += \ hci_inject +# Bluetooth OPUS codec +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.opus.enabled=true + # Bluetooth Tx power caps PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_panther.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \