diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 0a173bc..8187ddf 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
struct avrcp_player {
struct avrcp_server *server;
GSList *sessions;
+ uint16_t id;
+ uint16_t uid_counter;
struct avrcp_player_cb *cb;
void *user_data;
uint8_t event;
uint8_t value;
uint8_t count;
+ uint16_t id;
const char *curval, *strval;
int i;
}
break;
+
+ case AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED:
+ id = bt_get_be16(&pdu->params[1]);
+
+ if (player->id == id)
+ break;
+
+ player->id = id;
+ player->uid_counter = bt_get_be16(&pdu->params[3]);
+ break;
}
session->registered_events |= (1 << event);
case AVRCP_EVENT_STATUS_CHANGED:
case AVRCP_EVENT_TRACK_CHANGED:
case AVRCP_EVENT_SETTINGS_CHANGED:
+ case AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED:
avrcp_register_notification(session, event);
break;
}
diff --git a/profiles/audio/avrcp.h b/profiles/audio/avrcp.h
index b2c0d61..3799da1 100644
--- a/profiles/audio/avrcp.h
+++ b/profiles/audio/avrcp.h
#define AVRCP_PLAY_STATUS_ERROR 0xFF
/* Notification events */
-#define AVRCP_EVENT_STATUS_CHANGED 0x01
-#define AVRCP_EVENT_TRACK_CHANGED 0x02
-#define AVRCP_EVENT_TRACK_REACHED_END 0x03
-#define AVRCP_EVENT_TRACK_REACHED_START 0x04
-#define AVRCP_EVENT_SETTINGS_CHANGED 0x08
-#define AVRCP_EVENT_VOLUME_CHANGED 0x0d
-#define AVRCP_EVENT_LAST AVRCP_EVENT_VOLUME_CHANGED
+#define AVRCP_EVENT_STATUS_CHANGED 0x01
+#define AVRCP_EVENT_TRACK_CHANGED 0x02
+#define AVRCP_EVENT_TRACK_REACHED_END 0x03
+#define AVRCP_EVENT_TRACK_REACHED_START 0x04
+#define AVRCP_EVENT_SETTINGS_CHANGED 0x08
+#define AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED 0x0b
+#define AVRCP_EVENT_VOLUME_CHANGED 0x0d
+#define AVRCP_EVENT_LAST AVRCP_EVENT_VOLUME_CHANGED
struct avrcp_player_cb {
GList *(*list_settings) (void *user_data);