Loading system/bta/av/bta_av_act.cc +22 −16 Original line number Diff line number Diff line Loading @@ -1720,26 +1720,32 @@ tBTA_AV_FEAT bta_avk_check_peer_features(uint16_t service_uuid) { if (peer_rc_version >= AVRC_REV_1_3) peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA); /* * Though Absolute Volume came after in 1.4 and above, but there are few * devices * in market which supports absolute Volume and they are still 1.3 * TO avoid IOT issuses with those devices, we check for 1.3 as minimum * version */ if (peer_rc_version >= AVRC_REV_1_3) { /* get supported features */ /* Get supported features */ tSDP_DISC_ATTR* p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); if (p_attr != NULL) { uint16_t categories = p_attr->attr_value.v.u16; if (categories & AVRC_SUPF_CT_CAT2) /* * Though Absolute Volume came after in 1.4 and above, but there are * few devices in market which supports absolute Volume and they are * still 1.3. To avoid IOP issuses with those devices, we check for * 1.3 as minimum version */ if (peer_rc_version >= AVRC_REV_1_3) { if (categories & AVRC_SUPF_TG_CAT2) peer_features |= (BTA_AV_FEAT_ADV_CTRL); if (categories & AVRC_SUPF_CT_APP_SETTINGS) if (categories & AVRC_SUPF_TG_APP_SETTINGS) peer_features |= (BTA_AV_FEAT_APP_SETTING); if (categories & AVRC_SUPF_CT_BROWSE) if (categories & AVRC_SUPF_TG_BROWSE) peer_features |= (BTA_AV_FEAT_BROWSE); } /* AVRCP Cover Artwork over BIP */ if (peer_rc_version >= AVRC_REV_1_6) { if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET && categories & AVRC_SUPF_TG_PLAYER_COVER_ART) peer_features |= (BTA_AV_FEAT_COVER_ARTWORK); } } } /* get next record; if none found, we're done */ Loading system/bta/include/bta_av_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ typedef uint8_t tBTA_AV_STATUS; #define BTA_AV_FEAT_DELAY_RPT 0x0400 /* allow delay reporting */ #define BTA_AV_FEAT_ACP_START \ 0x0800 /* start stream when 2nd SNK was accepted */ #define BTA_AV_FEAT_COVER_ARTWORK 0x1000 /* use cover art feature */ #define BTA_AV_FEAT_APP_SETTING 0x2000 /* Player app setting support */ /* Internal features */ Loading system/btif/src/btif_av.cc +1 −1 Original line number Diff line number Diff line Loading @@ -3103,7 +3103,7 @@ bt_status_t btif_av_sink_execute_service(bool enable) { tBTA_AV_FEAT features = BTA_AV_FEAT_NO_SCO_SSPD | BTA_AV_FEAT_RCCT | BTA_AV_FEAT_METADATA | BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_ADV_CTRL | BTA_AV_FEAT_RCTG | BTA_AV_FEAT_BROWSE; BTA_AV_FEAT_BROWSE | BTA_AV_FEAT_COVER_ARTWORK; BTA_AvEnable(BTA_SEC_AUTHENTICATE, features, bta_av_sink_callback); btif_av_sink.RegisterAllBtaHandles(); return BT_STATUS_SUCCESS; Loading system/btif/src/btif_rc.cc +6 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,11 @@ void handle_rc_ctrl_features(btif_rc_device_cb_t* p_dev) { rc_features |= BTRC_FEAT_BROWSE; } /* Add cover art feature capability */ if (p_dev->rc_features & BTA_AV_FEAT_COVER_ARTWORK) { rc_features |= BTRC_FEAT_COVER_ARTWORK; } BTIF_TRACE_DEBUG("%s: Update rc features to CTRL: %d", __func__, rc_features); do_in_jni_thread(FROM_HERE, base::Bind(bt_rc_ctrl_callbacks->getrcfeatures_cb, p_dev->rc_addr, rc_features)); Loading Loading @@ -1750,6 +1755,7 @@ static bt_status_t init_ctrl(btrc_ctrl_callbacks_t* callbacks) { sizeof(btif_rc_cb.rc_multi_cb[idx])); btif_rc_cb.rc_multi_cb[idx].rc_vol_label = MAX_LABEL; btif_rc_cb.rc_multi_cb[idx].rc_volume = MAX_VOLUME; btif_rc_cb.rc_multi_cb[idx].rc_features_processed = FALSE; } lbl_init(); Loading system/include/hardware/bt_rc.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ typedef enum { BTRC_FEAT_METADATA = 0x01, /* AVRCP 1.3 */ BTRC_FEAT_ABSOLUTE_VOLUME = 0x02, /* Supports TG role and volume sync */ BTRC_FEAT_BROWSE = 0x04, /* AVRCP 1.4 and up, with Browsing support */ BTRC_FEAT_COVER_ARTWORK = 0x8, /* AVRCP 1.6 and up, Cover Art */ } btrc_remote_features_t; typedef enum { Loading Loading
system/bta/av/bta_av_act.cc +22 −16 Original line number Diff line number Diff line Loading @@ -1720,26 +1720,32 @@ tBTA_AV_FEAT bta_avk_check_peer_features(uint16_t service_uuid) { if (peer_rc_version >= AVRC_REV_1_3) peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA); /* * Though Absolute Volume came after in 1.4 and above, but there are few * devices * in market which supports absolute Volume and they are still 1.3 * TO avoid IOT issuses with those devices, we check for 1.3 as minimum * version */ if (peer_rc_version >= AVRC_REV_1_3) { /* get supported features */ /* Get supported features */ tSDP_DISC_ATTR* p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); if (p_attr != NULL) { uint16_t categories = p_attr->attr_value.v.u16; if (categories & AVRC_SUPF_CT_CAT2) /* * Though Absolute Volume came after in 1.4 and above, but there are * few devices in market which supports absolute Volume and they are * still 1.3. To avoid IOP issuses with those devices, we check for * 1.3 as minimum version */ if (peer_rc_version >= AVRC_REV_1_3) { if (categories & AVRC_SUPF_TG_CAT2) peer_features |= (BTA_AV_FEAT_ADV_CTRL); if (categories & AVRC_SUPF_CT_APP_SETTINGS) if (categories & AVRC_SUPF_TG_APP_SETTINGS) peer_features |= (BTA_AV_FEAT_APP_SETTING); if (categories & AVRC_SUPF_CT_BROWSE) if (categories & AVRC_SUPF_TG_BROWSE) peer_features |= (BTA_AV_FEAT_BROWSE); } /* AVRCP Cover Artwork over BIP */ if (peer_rc_version >= AVRC_REV_1_6) { if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET && categories & AVRC_SUPF_TG_PLAYER_COVER_ART) peer_features |= (BTA_AV_FEAT_COVER_ARTWORK); } } } /* get next record; if none found, we're done */ Loading
system/bta/include/bta_av_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ typedef uint8_t tBTA_AV_STATUS; #define BTA_AV_FEAT_DELAY_RPT 0x0400 /* allow delay reporting */ #define BTA_AV_FEAT_ACP_START \ 0x0800 /* start stream when 2nd SNK was accepted */ #define BTA_AV_FEAT_COVER_ARTWORK 0x1000 /* use cover art feature */ #define BTA_AV_FEAT_APP_SETTING 0x2000 /* Player app setting support */ /* Internal features */ Loading
system/btif/src/btif_av.cc +1 −1 Original line number Diff line number Diff line Loading @@ -3103,7 +3103,7 @@ bt_status_t btif_av_sink_execute_service(bool enable) { tBTA_AV_FEAT features = BTA_AV_FEAT_NO_SCO_SSPD | BTA_AV_FEAT_RCCT | BTA_AV_FEAT_METADATA | BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_ADV_CTRL | BTA_AV_FEAT_RCTG | BTA_AV_FEAT_BROWSE; BTA_AV_FEAT_BROWSE | BTA_AV_FEAT_COVER_ARTWORK; BTA_AvEnable(BTA_SEC_AUTHENTICATE, features, bta_av_sink_callback); btif_av_sink.RegisterAllBtaHandles(); return BT_STATUS_SUCCESS; Loading
system/btif/src/btif_rc.cc +6 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,11 @@ void handle_rc_ctrl_features(btif_rc_device_cb_t* p_dev) { rc_features |= BTRC_FEAT_BROWSE; } /* Add cover art feature capability */ if (p_dev->rc_features & BTA_AV_FEAT_COVER_ARTWORK) { rc_features |= BTRC_FEAT_COVER_ARTWORK; } BTIF_TRACE_DEBUG("%s: Update rc features to CTRL: %d", __func__, rc_features); do_in_jni_thread(FROM_HERE, base::Bind(bt_rc_ctrl_callbacks->getrcfeatures_cb, p_dev->rc_addr, rc_features)); Loading Loading @@ -1750,6 +1755,7 @@ static bt_status_t init_ctrl(btrc_ctrl_callbacks_t* callbacks) { sizeof(btif_rc_cb.rc_multi_cb[idx])); btif_rc_cb.rc_multi_cb[idx].rc_vol_label = MAX_LABEL; btif_rc_cb.rc_multi_cb[idx].rc_volume = MAX_VOLUME; btif_rc_cb.rc_multi_cb[idx].rc_features_processed = FALSE; } lbl_init(); Loading
system/include/hardware/bt_rc.h +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ typedef enum { BTRC_FEAT_METADATA = 0x01, /* AVRCP 1.3 */ BTRC_FEAT_ABSOLUTE_VOLUME = 0x02, /* Supports TG role and volume sync */ BTRC_FEAT_BROWSE = 0x04, /* AVRCP 1.4 and up, with Browsing support */ BTRC_FEAT_COVER_ARTWORK = 0x8, /* AVRCP 1.6 and up, Cover Art */ } btrc_remote_features_t; typedef enum { Loading