【Qualcomm音频】如何配置高通设备充当蓝牙耳机的角色呢?

其实这个概念就是常规意义上的蓝牙从模式设置。

一般来说,蓝牙从模式与音频相关最直接的就是HFP和A2DP,但是要知道蓝牙协议不止这两个,还包括蓝牙电话薄等功能。

这里只贴上如何蓝牙hfp和a2dp协议的从模式代码配置。

From 2ae2de6b2eb6df55a1804f0183ad917bddd0e884 Mon Sep 17 00:00:00 2001
From: kuangjincheng <[email protected]>
Date: Thu, 17 Oct 2019 10:17:35 +0800
Subject: [PATCH] [HXB_SLB788_DiNa_Meig][CaseID]2879[Description]config bt slave mode[Solution]fix it

Change-Id: I07a9d490aa4ead0d93b648de2a10d04b321ff1b1
Reviewed-on: http://192.168.0.240/c/37996
Reviewed-by: 匡进城 <[email protected]>
---

diff --git a/hardware/qcom/audio/configs/msm8953/msm8953.mk b/hardware/qcom/audio/configs/msm8953/msm8953.mk
index f933951..fbdaa99 100755
--- a/hardware/qcom/audio/configs/msm8953/msm8953.mk
+++ b/hardware/qcom/audio/configs/msm8953/msm8953.mk
@@ -117,6 +117,11 @@
 persist.audio.fluence.audiorec=false\
 persist.audio.fluence.speaker=false
 
+## config bt as slave mode
+PRODUCT_PROPERTY_OVERRIDES += \
+persist.service.bt.a2dp.sink=true\
+persist.service.bt.hfp.client=true
+
 #disable tunnel encoding
 PRODUCT_PROPERTY_OVERRIDES += \
 tunnel.audio.encode=false
diff --git a/packages/apps/Bluetooth/res/values/config.xml b/packages/apps/Bluetooth/res/values/config.xml
old mode 100644
new mode 100755
index 90e513d..06c9c36
--- a/packages/apps/Bluetooth/res/values/config.xml
+++ b/packages/apps/Bluetooth/res/values/config.xml
@@ -14,10 +14,10 @@
 -->
 <resources>
     <bool name="profile_supported_a2dp">true</bool>
-    <bool name="profile_supported_a2dp_sink">false</bool>
+    <bool name="profile_supported_a2dp_sink">true</bool>
     <bool name="profile_supported_hdp">true</bool>
     <bool name="profile_supported_hs_hfp">true</bool>
-    <bool name="profile_supported_hfpclient">false</bool>
+    <bool name="profile_supported_hfpclient">true</bool>
     <bool name="profile_supported_hid">true</bool>
     <bool name="profile_supported_opp">true</bool>
     <bool name="profile_supported_pan">true</bool>
@@ -26,7 +26,7 @@
     <bool name="pbap_include_photos_in_vcard">true</bool>
     <bool name="pbap_use_profile_for_owner_vcard">true</bool>
     <bool name="profile_supported_map">true</bool>
-    <bool name="profile_supported_avrcp_controller">false</bool>
+    <bool name="profile_supported_avrcp_controller">true</bool>
     <bool name="profile_supported_sap">false</bool>
     <bool name="profile_supported_pbapclient">false</bool>
 
@@ -65,7 +65,7 @@
     <integer name="a2dp_sink_duck_percent">25</integer>
 
     <!-- For enabling the hfp client connection service -->
-    <bool name="hfp_client_connection_service_enabled">false</bool>
+    <bool name="hfp_client_connection_service_enabled">true</bool>
 
     <!-- For disabling non AOSP bluetooth features -->
     <bool name="disable_non_aosp_bt_features">false</bool>
发布了52 篇原创文章 · 获赞 41 · 访问量 6106

猜你喜欢

转载自blog.csdn.net/crow_ch/article/details/103884029