From ba91d0ad7379fc7b064af911229e50ffa1a16169 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 28 May 2020 10:18:17 -0700 Subject: [PATCH] avrcp: Don't attempt to load settings if on volume changed is supported If only volume changed is supported that means the player cannot really indicate track/metadata changes so don't attempt to read them. --- profiles/audio/avrcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 75811bf98..8b3debe46 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3814,6 +3814,10 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn, uint8_t code, if (!session->controller || !session->controller->player) return FALSE; + /* Skip if player status/metadata if only volume changes is supported */ + if (events == (1 << AVRCP_EVENT_VOLUME_CHANGED)) + return FALSE; + if ((session->controller->features & AVRCP_FEATURE_PLAYER_SETTINGS) && !(events & (1 << AVRCP_EVENT_SETTINGS_CHANGED))) avrcp_list_player_attributes(session); -- 2.47.3