From 81337f95bbbaaed60e626cec2b3f663faa62a1a2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 15 Jan 2013 15:20:02 +0200 Subject: [PATCH] AVRCP: Check version before sending volume changed event/SetAbsoluteVolume Volume change event and SetAbsoluteVolume command are only available starting from 1.4, so we should not attempt to send these commands for versions before that. --- profiles/audio/avrcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 19b672183..2809b7f5b 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -2579,6 +2579,9 @@ int avrcp_set_volume(struct audio_device *dev, uint8_t volume) if (session == NULL) return -ENOTCONN; + if (session->version < 0x0104) + return -ENOTSUP; + memset(buf, 0, sizeof(buf)); set_company_id(pdu->company_id, IEEEID_BTSIG); -- 2.47.3