Diff between da8b6211d88c139e5cdace8ed926a88053fce24e and e1942bc1bef0575da5787127854fa7e56acef0a7

Changed Files

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

Full Patch

diff --git a/audio/avrcp.c b/audio/avrcp.c
index 131490f..a040099 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -177,6 +177,8 @@ static uint32_t company_ids[] = {
 	IEEEID_BTSIG,
 };
 
+static void register_volume_notification(struct avrcp_player *player);
+
 static sdp_record_t *avrcp_ct_record(void)
 {
 	sdp_list_t *svclass_id, *pfseq, *apseq, *root;
@@ -1148,13 +1150,18 @@ static gboolean avrcp_handle_volume_changed(struct avctp *session,
 	struct avrcp_header *pdu = (void *) operands;
 	uint8_t volume;
 
-	if (code == AVC_CTYPE_REJECTED || code == AVC_CTYPE_NOT_IMPLEMENTED)
+	if (code != AVC_CTYPE_INTERIM && code != AVC_CTYPE_CHANGED)
 		return FALSE;
 
 	volume = pdu->params[1] & 0x7F;
 
 	player->cb->set_volume(volume, player->dev, player->user_data);
 
+	if (code == AVC_CTYPE_CHANGED) {
+		register_volume_notification(player);
+		return FALSE;
+	}
+
 	return TRUE;
 }