usbb2k-api-dev
[Top][All Lists]
Advanced

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

[Usbb2k-api-dev] Fwd: [RFC PATCH 2/2] USB: input: yealink.c: add mapping


From: Daniele Forsi
Subject: [Usbb2k-api-dev] Fwd: [RFC PATCH 2/2] USB: input: yealink.c: add mapping for "RING" and "MUTE" keys
Date: Mon, 22 Dec 2014 18:12:33 +0100

---------- Forwarded message ----------
From: Daniele Forsi <address@hidden>
Date: 2014-12-22 15:41 GMT+01:00
Subject: [RFC PATCH 2/2] USB: input: yealink.c: add mapping for "RING"
and "MUTE" keys
To: Henk Vergonet <address@hidden>, Dmitry Torokhov
<address@hidden>
Cc: address@hidden, address@hidden,
address@hidden, Daniele Forsi <address@hidden>


According to the user manual of the "VOIP-3 SKY" USB phone, the RING
key is used to select different ring tones and the MUTE key is used
to mute the microphone.

Signed-off-by: Daniele Forsi <address@hidden>
---
 drivers/input/misc/yealink.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index e9403da..0b86c49 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -189,7 +189,9 @@ static int setChar(struct yealink_dev *yld, int el, int chr)
  * USB-P1K button layout:
  *
  *             up
+ *            ring
  *       IN           OUT
+ *            mute
  *            down
  *
  *     pickup   C    hangup
@@ -207,7 +209,9 @@ static int map_p1k_to_key(int scancode)
        switch(scancode) {              /* phone key:   */
        case 0x23: return KEY_LEFT;     /*   IN         */
        case 0x33: return KEY_UP;       /*   up         */
+       case 0x44: return KEY_SOUND;    /*   ring       */
        case 0x04: return KEY_RIGHT;    /*   OUT        */
+       case 0x41: return KEY_MICMUTE;  /*   mute       */
        case 0x24: return KEY_DOWN;     /*   down       */
        case 0x03: return KEY_ENTER;    /*   pickup     */
        case 0x14: return KEY_BACKSPACE; /*  C          */
--
2.1.3



-- 
Daniele Forsi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]