Diff between 81620276aa90f9d9e379453ff7ccb87db0a17b76 and 27efc30f049972595f517a4072159df7c9bceee9

Changed Files

File Additions Deletions Status
profiles/audio/avrcp.c +4 -1 modified

Full Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index ad7742d..9baf0d3 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3205,6 +3205,7 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn,
 		case AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED:
 		case AVRCP_EVENT_UIDS_CHANGED:
 		case AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED:
+		case AVRCP_EVENT_VOLUME_CHANGED:
 			avrcp_register_notification(session, event);
 			break;
 		}
@@ -3336,7 +3337,9 @@ static void target_init(struct avrcp *session)
 	if (target->version < 0x0104)
 		return;
 
-	avrcp_register_notification(session, AVRCP_EVENT_VOLUME_CHANGED);
+	/* Only check capabilities if controller is not supported */
+	if (session->controller == NULL)
+		avrcp_get_capabilities(session);
 
 	/* Auto-connect browsing channel only if initiator */
 	if (old_state == BTD_SERVICE_STATE_CONNECTING &&