Thread (7 messages) read the whole thread 7 messages, 3 authors, 2013-01-25
STALE4935d

[PATCH BlueZ 2/2] avctp: Receive and silent ignore Vol Up/Down operations

From: João Paulo Rechi Vita <hidden>
Date: 2013-01-22 18:18:23
Subsystem: the rest · Maintainer: Linus Torvalds

The AVRCP spec mandates to support 'volume up' and 'volume down'
operations when claiming support for Category 2 TG.
---
 profiles/audio/avctp.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index f7e607e..4ab6d6d 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -214,6 +214,8 @@ static struct {
 	uint8_t avc;
 	uint16_t uinput;
 } key_map[] = {
+	{ "VOLUME UP",		AVC_VOLUME_UP,		KEY_VOLUMEUP},
+	{ "VOLUME DOWN",	AVC_VOLUME_DOWN,	KEY_VOLUMEDOWN},
 	{ "PLAY",		AVC_PLAY,		KEY_PLAYCD },
 	{ "STOP",		AVC_STOP,		KEY_STOPCD },
 	{ "PAUSE",		AVC_PAUSE,		KEY_PAUSECD },
@@ -968,6 +970,9 @@ static void init_uinput(struct avctp *session)
 
 	dev = manager_get_audio_device(session->device, FALSE);
 
+	session->key_quirks[AVC_VOLUME_UP] |= QUIRK_IGNORE;
+	session->key_quirks[AVC_VOLUME_DOWN] |= QUIRK_IGNORE;
+
 	device_get_name(dev->btd_dev, name, sizeof(name));
 	if (g_str_equal(name, "Nokia CK-20W")) {
 		session->key_quirks[AVC_FORWARD] |= QUIRK_NO_RELEASE;
-- 
1.7.11.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help