[RFC 15/19] avrcp: answer query for supported events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 audio/control.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index 212e95c..88efdb5 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -745,6 +745,16 @@ static int handle_vendordep_pdu(struct control *control,
 			return AVRCP_HEADER_LENGTH +
 					AVRCP_SPECAVCPDU_HEADER_LENGTH + 1 +
 					3 * G_N_ELEMENTS(company_ids);
+		case CAP_EVENTS_SUPPORTED:
+			avrcp->code = CTYPE_STABLE;
+			/* CpabilityID + CapabilityCount + n_events */
+			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 AVRCP_HEADER_LENGTH +
+				AVRCP_SPECAVCPDU_HEADER_LENGTH + 4;
 		}
 
 		pdu->params[0] = E_INVALID_PARAM;
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux