From e468f8f1e9ac5796274a7ffefd7acf58905ec911 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 11 Aug 2011 12:53:27 -0300 Subject: [PATCH] avrcp: handle query for supported events --- audio/control.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/audio/control.c b/audio/control.c index 603659dab..c5e175aa0 100644 --- a/audio/control.c +++ b/audio/control.c @@ -132,6 +132,7 @@ /* Capabilities for AVRCP_GET_CAPABILITIES pdu */ #define CAP_COMPANY_ID 0x02 +#define CAP_EVENTS_SUPPORTED 0x03 #define QUIRK_NO_RELEASE 1 << 0 @@ -817,6 +818,13 @@ static int avrcp_handle_get_capabilities(struct control *control, pdu->params[1] = G_N_ELEMENTS(company_ids); return 2 + (3 * G_N_ELEMENTS(company_ids)); + case CAP_EVENTS_SUPPORTED: + pdu->params_len = htons(4); + pdu->params[1] = 2; + pdu->params[2] = AVRCP_EVENT_PLAYBACK_STATUS_CHANGED; + pdu->params[3] = AVRCP_EVENT_TRACK_CHANGED; + + return 4; } err: -- 2.47.3