OSDN Git Service

Changed the default configured sample rate for aptX/aptX-HD to 48.0kHz
authorPavlin Radoslavov <pavlin@google.com>
Wed, 28 Mar 2018 19:30:14 +0000 (12:30 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 28 Mar 2018 21:37:09 +0000 (14:37 -0700)
Previously, the default configured sample rate for aptX and aptX-HD
was 44.1kHz. However, during AVDTP codec setup, the initial codec
setup to 44.1kHz was followed immediately with automatic codec
reconfiguration to 48.0kHz (if supported by the remote device)
so the highest possible sample rate will be used.

Changing the default sample rate to 48.0kHz eliminates the
transient initial codec setup of 44.1kHz, because it is unnecessary
and error-prone.

Bug: 69276823
Test: Manual: connect to aptX / aptX-HD headsets and examine the AVDTP codec
      configuration in the btsnoop logs.
Change-Id: I9e22365e0f07690c87503ea52fd9bb4d1ad4d5ff
(cherry picked from commit 1a8947a6c0473ea62b229ffba6091b61e19fa904)

stack/a2dp/a2dp_vendor_aptx.cc
stack/a2dp/a2dp_vendor_aptx_hd.cc

index 0ddea34..99b5dc2 100644 (file)
@@ -63,7 +63,7 @@ static const tA2DP_APTX_CIE a2dp_aptx_caps = {
 static const tA2DP_APTX_CIE a2dp_aptx_default_config = {
     A2DP_APTX_VENDOR_ID,               /* vendorId */
     A2DP_APTX_CODEC_ID_BLUETOOTH,      /* codecId */
-    A2DP_APTX_SAMPLERATE_44100,        /* sampleRate */
+    A2DP_APTX_SAMPLERATE_48000,        /* sampleRate */
     A2DP_APTX_CHANNELS_STEREO,         /* channelMode */
     A2DP_APTX_FUTURE_1,                /* future1 */
     A2DP_APTX_FUTURE_2,                /* future2 */
index 3315c64..57be7e6 100644 (file)
@@ -68,7 +68,7 @@ static const tA2DP_APTX_HD_CIE a2dp_aptx_hd_caps = {
 static const tA2DP_APTX_HD_CIE a2dp_aptx_hd_default_config = {
     A2DP_APTX_HD_VENDOR_ID,            /* vendorId */
     A2DP_APTX_HD_CODEC_ID_BLUETOOTH,   /* codecId */
-    A2DP_APTX_HD_SAMPLERATE_44100,     /* sampleRate */
+    A2DP_APTX_HD_SAMPLERATE_48000,     /* sampleRate */
     A2DP_APTX_HD_CHANNELS_STEREO,      /* channelMode */
     A2DP_APTX_HD_ACL_SPRINT_RESERVED0, /* acl_sprint_reserved0 */
     A2DP_APTX_HD_ACL_SPRINT_RESERVED1, /* acl_sprint_reserved1 */