Skip to contentSkip to conversation

avrcp: Handle not implemented response to AVRCP_LIST_PLAYER_ATTRIBUTES

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages May 7, 2020 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 avrcp: Handle not implemented response to AVRCP_LIST_PLAYER_ATTRIBUTES

From: Luiz Augusto von Dentz <[email protected]>

If remote device respond with ctype set to not implement don't continue parsing the packet.

---
 profiles/audio/avrcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
profiles/audio/avrcp.c +1 -1
index 6b3f685d2..773ccdb60 100644
@@ -2223,7 +2223,7 @@ static gboolean avrcp_list_player_attributes_rsp(struct avctp *conn,
 	uint8_t len, count = 0;
 	int i;
 
-	if (code == AVC_CTYPE_REJECTED)
+	if (code == AVC_CTYPE_REJECTED || code == AVC_CTYPE_NOT_IMPLEMENTED)
 		return FALSE;
 
 	len = pdu->params[0];
Signature · 1 line
2.25.3
#1 lore raw

I think this patch is correct, but unfortunately, it doesn't solve the problem with the Sennheiser MTW2 reboot.

Quoted 22 lines · Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

If remote device respond with ctype set to not implement don't continue parsing the packet.

---
  profiles/audio/avrcp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
profiles/audio/avrcp.c +1 -1
index 6b3f685d2..773ccdb60 100644
@@ -2223,7 +2223,7 @@ static gboolean avrcp_list_player_attributes_rsp(struct avctp *conn,
  	uint8_t len, count = 0;
  	int i;
 
-	if (code == AVC_CTYPE_REJECTED)
+	if (code == AVC_CTYPE_REJECTED || code == AVC_CTYPE_NOT_IMPLEMENTED)
  		return FALSE;
 
  	len = pdu->params[0];