linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: plantronics: Update to map micmute controls
@ 2024-09-13  5:58 Wade Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Wade Wang @ 2024-09-13  5:58 UTC (permalink / raw)
  To: jikos, bentiss, linux-input, linux-kernel, wade.wang; +Cc: stable

telephony page of Plantronics headset is ignored currently, it caused
micmute button no function, Now follow native HID key mapping for
telephony page map, telephony micmute key is enabled by default

Signed-off-by: Wade Wang <wade.wang@hp.com>
---
 drivers/hid/hid-plantronics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
index 2a19f3646ecb..2d17534fce61 100644
--- a/drivers/hid/hid-plantronics.c
+++ b/drivers/hid/hid-plantronics.c
@@ -77,10 +77,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
 		}
 	}
 	/* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
-	/* 'basic telephony compliant' - allow default consumer page map */
+	/* 'basic telephony compliant' - allow default consumer & telephony page map */
 	else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
 		 (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
-		if (PLT_ALLOW_CONSUMER)
+		if (PLT_ALLOW_CONSUMER || (usage->hid & HID_USAGE_PAGE) == HID_UP_TELEPHONY)
 			goto defaulted;
 	}
 	/* not 'basic telephony' - apply legacy mapping */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] HID: plantronics: Update to map micmute controls
@ 2024-09-13  6:08 Wade Wang
  2024-09-13 14:03 ` Benjamin Tissoires
  0 siblings, 1 reply; 10+ messages in thread
From: Wade Wang @ 2024-09-13  6:08 UTC (permalink / raw)
  To: jikos, bentiss, linux-input, linux-kernel, wade.wang; +Cc: stable

telephony page of Plantronics headset is ignored currently, it caused
micmute button no function, Now follow native HID key mapping for
telephony page map, telephony micmute key is enabled by default

Cc: stable@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
---
 drivers/hid/hid-plantronics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
index 2a19f3646ecb..2d17534fce61 100644
--- a/drivers/hid/hid-plantronics.c
+++ b/drivers/hid/hid-plantronics.c
@@ -77,10 +77,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
 		}
 	}
 	/* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
-	/* 'basic telephony compliant' - allow default consumer page map */
+	/* 'basic telephony compliant' - allow default consumer & telephony page map */
 	else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
 		 (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
-		if (PLT_ALLOW_CONSUMER)
+		if (PLT_ALLOW_CONSUMER || (usage->hid & HID_USAGE_PAGE) == HID_UP_TELEPHONY)
 			goto defaulted;
 	}
 	/* not 'basic telephony' - apply legacy mapping */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-14 13:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13  5:58 [PATCH] HID: plantronics: Update to map micmute controls Wade Wang
  -- strict thread matches above, loose matches on Subject: below --
2024-09-13  6:08 Wade Wang
2024-09-13 14:03 ` Benjamin Tissoires
2024-09-16  8:13   ` Wang, Wade
2024-09-24  9:00     ` Wang, Wade
2024-09-25  3:31       ` Terry Junge
2024-09-26  1:58         ` Wang, Wade
2024-10-11  4:03           ` Wang, Wade
2024-10-14  4:47             ` Terry Junge
2024-10-14 13:07               ` Wang, Wade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).