This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564CSTBTBLESW: AVRCP volume synchronization with Android phones

Part Number: CC2564CSTBTBLESW
Other Parts Discussed in Thread: CC2564C,

We're using a CC2564C chip with CC2564CSTBTBLESW 4.2.1.0 for A2DP audio sink and source application. I've implemented AVRCP volume synchronization the following way:

  1. The sink is taking AVRCP target role with SDP_AVRCP_SUPPORTED_FEATURES_TARGET_CATEGORY_1, the AVRCP version is set to 1.4 (it also takes controller role to fetch track data from source)
  2. The sink is responding with AVRCP_EVENT_VOLUME_CHANGED event capability support to amtGetCapabilities command
  3. The sink is responding with local volume data when amtRegisterNotification AVRCP_EVENT_VOLUME_CHANGED command is received
  4. The sink has 0x110B, 0x110E and 0x110C service UUIDs in its extended inquiry info (also 0x110F for AVRCP controller role)
  5. The sink has 0x240414 device class

The result is that iOS phones register to volume event notifications, and send setAbsoluteVolume commands as expected. The same cannot be said for Android phones, they don't even send a GetCapabilities command to find out the AVRCP event support. The same Android phones can synchronize their volume to other Bluetooth speakers, so it's not that the support is missing on the phone side. Any ideas about what's missing?

  • Can, you take BT snoop logs on the Android phone when connected to your device Vs with other Bluetooth speaker to compare?

    Thanks

  • We've got you the btsnoop results from a Google Pixel 2 XL (Android 11). This one is from our device with CC2564C:

    btsnoop_hci-PROJECT-volume-sync-fail.log

    And this is a reference audio sink with working volume synchronization:

    btsnoop_hci-REFERENCE-volume-OK.log

  • As, you noted the Pixel 2 does not seem to request for AVRCP capabilities from the peer. On the other hand it seems, your sink devise is asking for Phone's capabilites. Did, you try not requesting capabilities from the sink? May, it would trigger the phone to ask for it?

    Thanks

  • I tested without requesting capabilities, it doesn't make a difference.

  • Is it specific to Pixel2 or with other Android phones as well? I will check, if we can reproduce it here.

    Thanks

  • It's a common problem with the Android phones that we have tried so far.

  • I see. Let me try to reproduce on our setup..

    Thanks

  • Any update on this? This should be easily reproducible.

  • Did, you make changes to the Demo sample code in BluetopiaSDK? If so, can you send the code changes done to the box folder shared with you.

    Thanks

  • I've put our source implementation on the box folder for you. The relevant parts are in AudioRole and AudioSink files.

  • Reviewing the HCI/AVRCP trace logs, it seems the Sink unit (TG) is not sending the 'EVENT_VOLUME_CHANGED' event Id in response to 'AVRCP_GetCapabilties'.

    The below is for : REFERECNE-Volume-Ok.log

    But, iPhone anyways seems to send changed notification commands for Volume.

    In addition, reviewing the SDP descriptors, i wonder if you need to change the ServiceClass Id to 'A/V Remote Control Target'. I wonder, Android devices may not be issuing the GetCapabilties as it is seeing the peer as controller?

    Thanks

  • We haven't used the SDP API so far, and there's no example in the CC2564CSTBTBLESW either. We do set the extended inquiry infoas I mentioned, to indicate both controller and target role (for fetching track data, and for volume synchronization). Could you provide me with a sample code on how to modify the SDP descriptors? I assume that AUD_Initialize() call sets some SDP records by itself, so we'd need to call this afterwards, right?

  • Yes, that is correct AUD_Initialize(), configures the SDP descriptors. I thought, you were also setting them manually using the SDP apis (as described in BluetopiaCoreAPI.pdf). It is strange that only with Android phones the service descriptor does not show, "A/V Remote Control Target". I wonder, if the extended inquiry info is affecting the SDP descriptors. Let me check..

    Thanks

  • I've compared the SDP descriptors produced by the AUD_Initialize() call with another A2DP sink that has working volume synchronization with Android, but to me it didn't reveal anything that's obviously missing from our setup. For reference, this is the SDP descriptor of our implementation:

    SDP_Service_Search_Attribute_Request(Advanced Audio) Success.
    SDP Service Search Attribute Response Received (Size = 0x0010)
    Service Record: 1:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010000
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110B
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0019
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0019
                 Type: Unsigned Int = 0x0102
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110D
                 Type: Unsigned Int = 0x0102
        Attribute ID 0x0100
           Type: Text String = A2DP Sink

    SDP_Service_Search_Attribute_Request(A/V Remote Control) Success.
    SDP Service Search Attribute Response Received (Size = 0x0010)
    Service Record: 1:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010001
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110E
              Type: UUID_16 = 0x110F
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0017
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0017
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0006
           Type: Data Element Sequence
              Type: Unsigned Int = 0x656E
              Type: Unsigned Int = 0x006A
              Type: Unsigned Int = 0x0100
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110E
                 Type: Unsigned Int = 0x0104
        Attribute ID 0x0100
           Type: Text String = A2DP Sink
        Attribute ID 0x0102
           Type: Text String = Stonestreet One
        Attribute ID 0x0311
           Type: Unsigned Int = 0x0001
    Service Record: 2:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010002
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110C
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0017
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0017
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0006
           Type: Data Element Sequence
              Type: Unsigned Int = 0x656E
              Type: Unsigned Int = 0x006A
              Type: Unsigned Int = 0x0100
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110E
                 Type: Unsigned Int = 0x0104
        Attribute ID 0x0100
           Type: Text String = A2DP Sink
        Attribute ID 0x0102
           Type: Text String = Stonestreet One
        Attribute ID 0x0311
           Type: Unsigned Int = 0x0001


    And this is the readout from the concurrent device:

    SDP_Service_Search_Attribute_Request(Advanced Audio) Success.
    SDP Service Search Attribute Response Received (Size = 0x0010)
    Service Record: 1:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010005
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110B
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0019
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0019
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0005
           Type: Data Element Sequence
              Type: UUID_16 = 0x1002
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110D
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0100
           Type: Text String = Audio Sink
        Attribute ID 0x0311
           Type: Unsigned Int = 0x000F

    SDP_Service_Search_Attribute_Request(A/V Remote Control) Success.
    SDP Service Search Attribute Response Received (Size = 0x0010)
    Service Record: 1:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010003
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110E
              Type: UUID_16 = 0x110F
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0017
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0017
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0005
           Type: Data Element Sequence
              Type: UUID_16 = 0x1002
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110E
                 Type: Unsigned Int = 0x0106
        Attribute ID 0x000D
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: Data Element Sequence
                    Type: UUID_16 = 0x0100
                    Type: Unsigned Int = 0x001B
                 Type: Data Element Sequence
                    Type: UUID_16 = 0x0017
                    Type: Unsigned Int = 0x0103
        Attribute ID 0x0100
           Type: Text String = AVRCP CT
        Attribute ID 0x0311
           Type: Unsigned Int = 0x000F
    Service Record: 2:
        Attribute ID 0x0000
           Type: Unsigned Int = 0x00010004
        Attribute ID 0x0001
           Type: Data Element Sequence
              Type: UUID_16 = 0x110C
        Attribute ID 0x0004
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0100
                 Type: Unsigned Int = 0x0017
              Type: Data Element Sequence
                 Type: UUID_16 = 0x0017
                 Type: Unsigned Int = 0x0103
        Attribute ID 0x0005
           Type: Data Element Sequence
              Type: UUID_16 = 0x1002
        Attribute ID 0x0009
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: UUID_16 = 0x110E
                 Type: Unsigned Int = 0x0105
        Attribute ID 0x000D
           Type: Data Element Sequence
              Type: Data Element Sequence
                 Type: Data Element Sequence
                    Type: UUID_16 = 0x0100
                    Type: Unsigned Int = 0x001B
                 Type: Data Element Sequence
                    Type: UUID_16 = 0x0017
                    Type: Unsigned Int = 0x0103
        Attribute ID 0x0100
           Type: Text String = AVRCP TG
        Attribute ID 0x0311
           Type: Unsigned Int = 0x005F


    For the record, I've tried to use the same SupportedFeaturesFlags as this other device, but it didn't yield any improvement.

  • Let me review the SDP descriptors and get back.

    Thanks

  • Hi!

    I have good news on this topic! I've rechecked the AVRCP spec, and found that AbsoluteVolume is specified as mandatory for Category 2, so I modified the configuration to TargetRoleInfo.SupportedFeaturesFlags = ControllerRoleInfo.SupportedFeaturesFlags = 0x002 | 0x001; (which translates to Cat1 + Cat2). This resulted in the Android phone finally registering for volume notifications, and sending SetAbsoluteVolume commands.