• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisionae0148c1f94858856e557293785993dc3ea4a285 (tree)
Zeit2017-04-20 09:01:23
AutorTsuyoshi Kamata <tsuyoshi.x.kamata@sony...>
CommiterPavlin Radoslavov

Log Message

AVRC: Configure absolute volume to false if remove device not support it

Some AVRCP(ver>1.4) devices don't support absolute volume, when connected
to such device, volume control doesn't work properly on phone.

This patch fix the problem as bellow:

- check category of remote device
when add absolute volume feature flag.
- remove absolute volume feature flag
if remote device responses REJECT or NOT_IMPLEMENT.

Bug: 33441894
Test: manual
Change-Id: Icfd6f61699490efd937fa6d2383f333eb0f0144a
(cherry picked from commit a4fcd238aedee87384fa164e9465302aa4b69035)

Ändern Zusammenfassung

Diff

--- a/bta/av/bta_av_act.cc
+++ b/bta/av/bta_av_act.cc
@@ -1632,11 +1632,12 @@ tBTA_AV_FEAT bta_av_check_peer_features(uint16_t service_uuid) {
16321632 peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA);
16331633
16341634 if (peer_rc_version >= AVRC_REV_1_4) {
1635- peer_features |= (BTA_AV_FEAT_ADV_CTRL);
16361635 /* get supported categories */
16371636 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES);
16381637 if (p_attr != NULL) {
16391638 categories = p_attr->attr_value.v.u16;
1639+ if (categories & AVRC_SUPF_CT_CAT2)
1640+ peer_features |= (BTA_AV_FEAT_ADV_CTRL);
16401641 if (categories & AVRC_SUPF_CT_BROWSE)
16411642 peer_features |= (BTA_AV_FEAT_BROWSE);
16421643 }
--- a/btif/src/btif_rc.cc
+++ b/btif/src/btif_rc.cc
@@ -2747,6 +2747,16 @@ static void handle_rc_metamsg_rsp(tBTA_AV_META_MSG* pmeta_msg,
27472747 __func__, pmeta_msg->code, pmeta_msg->label);
27482748 return;
27492749 }
2750+
2751+ if (AVRC_PDU_REGISTER_NOTIFICATION == avrc_response.rsp.pdu &&
2752+ AVRC_EVT_VOLUME_CHANGE == avrc_response.reg_notif.event_id &&
2753+ (AVRC_RSP_REJ == pmeta_msg->code ||
2754+ AVRC_RSP_NOT_IMPL == pmeta_msg->code)) {
2755+ BTIF_TRACE_DEBUG("%s remove AbsoluteVolume feature flag.", __func__);
2756+ p_dev->rc_features &= ~BTA_AV_FEAT_ADV_CTRL;
2757+ handle_rc_features(p_dev);
2758+ return;
2759+ }
27502760 } else {
27512761 BTIF_TRACE_DEBUG(
27522762 "%s: Received vendor dependent in adv ctrl rsp. code: %d len: %d. Not "