OSDN Git Service

Utilize setting for AVRCP Target
authorJoseph Pirozzo <pirozzoj@google.com>
Wed, 14 Mar 2018 23:41:49 +0000 (16:41 -0700)
committerAjay Panicker <apanicke@google.com>
Fri, 16 Mar 2018 07:16:55 +0000 (07:16 +0000)
There is a setting that controls which AVRCP Target
version is enabled, use the same setting for both
source and sink devices.

Bug: 62397951
Test: Observe SDP record on sink device.
Change-Id: I65b307d011048ec88b3af8c542ce70601294cca8

bta/av/bta_av_main.cc

index a5d377c..16a4492 100644 (file)
@@ -468,26 +468,21 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
                         BTA_ID_AV);
 #endif
 
-        /* For the Audio Sink role we support additional TG 1.3 to support
+        /* For the Audio Sink role we support additional TG to support
          * absolute volume.
          */
         uint16_t profile_version = AVRC_REV_1_0;
 
-        if (profile_initialized == UUID_SERVCLASS_AUDIO_SOURCE) {
-          if (!strncmp(AVRCP_1_6_STRING, avrcp_version,
-                       sizeof(AVRCP_1_6_STRING))) {
-            profile_version = AVRC_REV_1_6;
-          } else if (!strncmp(AVRCP_1_5_STRING, avrcp_version,
-                              sizeof(AVRCP_1_5_STRING))) {
-            profile_version = AVRC_REV_1_5;
-          } else if (!strncmp(AVRCP_1_3_STRING, avrcp_version,
-                              sizeof(AVRCP_1_3_STRING))) {
-            profile_version = AVRC_REV_1_3;
-          } else {
-            profile_version = AVRC_REV_1_4;
-          }
-        } else if (profile_initialized == UUID_SERVCLASS_AUDIO_SINK) {
-          // Initialize AVRCP1.4 to provide Absolute Volume control.
+        if (!strncmp(AVRCP_1_6_STRING, avrcp_version,
+                     sizeof(AVRCP_1_6_STRING))) {
+          profile_version = AVRC_REV_1_6;
+        } else if (!strncmp(AVRCP_1_5_STRING, avrcp_version,
+                            sizeof(AVRCP_1_5_STRING))) {
+          profile_version = AVRC_REV_1_5;
+        } else if (!strncmp(AVRCP_1_3_STRING, avrcp_version,
+                            sizeof(AVRCP_1_3_STRING))) {
+          profile_version = AVRC_REV_1_3;
+        } else {
           profile_version = AVRC_REV_1_4;
         }