* [PATCH v3 0/2] Introduce Poly/Plantronics mute event support
@ 2025-01-13 23:51 Terry Junge
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Terry Junge @ 2025-01-13 23:51 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Hi Jiri and Takashi,
If at all possible, it would be preferred if this patch set could be
sent upstream and to stable together.
This patch set was tested by Wade and myself with multiple
Poly/Plantronics product family headsets.
Thanks,
Terry
Link v1: https://lore.kernel.org/linux-input/87zfl333uy.wl-tiwai@suse.de/T/#t
Link v2: https://lore.kernel.org/linux-input/4a25e5d0-5e09-4246-8d70-8083d3189d53@cosmicgizmosystems.com/T/#t
Terry Junge (2):
HID: hid-plantronics: Add mic mute mapping and generalize quirks
ALSA: usb-audio: Add quirk for Plantronics headsets to fix control
names
drivers/hid/hid-plantronics.c | 144 ++++++++++++++++------------------
sound/usb/mixer_quirks.c | 51 ++++++++++++
2 files changed, 118 insertions(+), 77 deletions(-)
base-commit: 09a0fa92e5b45e99cf435b2fbf5ebcf889cf8780
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks
2025-01-13 23:51 [PATCH v3 0/2] Introduce Poly/Plantronics mute event support Terry Junge
@ 2025-01-13 23:51 ` Terry Junge
2025-01-14 6:44 ` Wang, Wade
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2 siblings, 1 reply; 15+ messages in thread
From: Terry Junge @ 2025-01-13 23:51 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Add mapping for headset mute key events.
Remove PLT_QUIRK_DOUBLE_VOLUME_KEYS quirk and made it generic.
The quirk logic did not keep track of the actual previous key
so any key event occurring in less than or equal to 5ms was ignored.
Remove PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS quirk.
It had the same logic issue as the double key quirk and was actually
masking the as designed behavior of most of the headsets.
It's occurrence should be minimized with the ALSA control naming
quirk that is part of the patch set.
Signed-off-by: Terry Junge <linuxhid@cosmicgizmosystems.com>
Cc: stable@vger.kernel.org
---
V1 -> V2: Optimize out 2 macros - no functional changes
V2 -> V3: No change
drivers/hid/hid-plantronics.c | 144 ++++++++++++++++------------------
1 file changed, 67 insertions(+), 77 deletions(-)
diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
index 25cfd964dc25..acb9eb18f7cc 100644
--- a/drivers/hid/hid-plantronics.c
+++ b/drivers/hid/hid-plantronics.c
@@ -6,9 +6,6 @@
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
*/
-/*
- */
-
#include "hid-ids.h"
#include <linux/hid.h>
@@ -23,30 +20,28 @@
#define PLT_VOL_UP 0x00b1
#define PLT_VOL_DOWN 0x00b2
+#define PLT_MIC_MUTE 0x00b5
#define PLT1_VOL_UP (PLT_HID_1_0_PAGE | PLT_VOL_UP)
#define PLT1_VOL_DOWN (PLT_HID_1_0_PAGE | PLT_VOL_DOWN)
+#define PLT1_MIC_MUTE (PLT_HID_1_0_PAGE | PLT_MIC_MUTE)
#define PLT2_VOL_UP (PLT_HID_2_0_PAGE | PLT_VOL_UP)
#define PLT2_VOL_DOWN (PLT_HID_2_0_PAGE | PLT_VOL_DOWN)
+#define PLT2_MIC_MUTE (PLT_HID_2_0_PAGE | PLT_MIC_MUTE)
+#define HID_TELEPHONY_MUTE (HID_UP_TELEPHONY | 0x2f)
+#define HID_CONSUMER_MUTE (HID_UP_CONSUMER | 0xe2)
#define PLT_DA60 0xda60
#define PLT_BT300_MIN 0x0413
#define PLT_BT300_MAX 0x0418
-
-#define PLT_ALLOW_CONSUMER (field->application == HID_CP_CONSUMERCONTROL && \
- (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
-
-#define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
-#define PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS BIT(1)
-
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
-#define PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT 220 /* ms */
struct plt_drv_data {
unsigned long device_type;
- unsigned long last_volume_key_ts;
- u32 quirks;
+ unsigned long last_key_ts;
+ unsigned long double_key_to;
+ __u16 last_key;
};
static int plantronics_input_mapping(struct hid_device *hdev,
@@ -58,34 +53,43 @@ static int plantronics_input_mapping(struct hid_device *hdev,
unsigned short mapped_key;
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
unsigned long plt_type = drv_data->device_type;
+ int allow_mute = usage->hid == HID_TELEPHONY_MUTE;
+ int allow_consumer = field->application == HID_CP_CONSUMERCONTROL &&
+ (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER &&
+ usage->hid != HID_CONSUMER_MUTE;
/* special case for PTT products */
if (field->application == HID_GD_JOYSTICK)
goto defaulted;
- /* handle volume up/down mapping */
/* non-standard types or multi-HID interfaces - plt_type is PID */
if (!(plt_type & HID_USAGE_PAGE)) {
switch (plt_type) {
case PLT_DA60:
- if (PLT_ALLOW_CONSUMER)
+ if (allow_consumer)
goto defaulted;
- goto ignored;
+ if (usage->hid == HID_CONSUMER_MUTE) {
+ mapped_key = KEY_MICMUTE;
+ goto mapped;
+ }
+ break;
default:
- if (PLT_ALLOW_CONSUMER)
+ if (allow_consumer || allow_mute)
goto defaulted;
}
+ goto ignored;
}
- /* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
- /* 'basic telephony compliant' - allow default consumer page map */
- else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
- (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
- if (PLT_ALLOW_CONSUMER)
- goto defaulted;
- }
- /* not 'basic telephony' - apply legacy mapping */
- /* only map if the field is in the device's primary vendor page */
- else if (!((field->application ^ plt_type) & HID_USAGE_PAGE)) {
+
+ /* handle standard consumer control mapping */
+ /* and standard telephony mic mute mapping */
+ if (allow_consumer || allow_mute)
+ goto defaulted;
+
+ /* handle vendor unique types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
+ /* if not 'basic telephony compliant' - map vendor unique controls */
+ if (!((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
+ (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) &&
+ !((field->application ^ plt_type) & HID_USAGE_PAGE))
switch (usage->hid) {
case PLT1_VOL_UP:
case PLT2_VOL_UP:
@@ -95,8 +99,11 @@ static int plantronics_input_mapping(struct hid_device *hdev,
case PLT2_VOL_DOWN:
mapped_key = KEY_VOLUMEDOWN;
goto mapped;
+ case PLT1_MIC_MUTE:
+ case PLT2_MIC_MUTE:
+ mapped_key = KEY_MICMUTE;
+ goto mapped;
}
- }
/*
* Future mapping of call control or other usages,
@@ -105,6 +112,8 @@ static int plantronics_input_mapping(struct hid_device *hdev,
*/
ignored:
+ hid_dbg(hdev, "usage: %08x (appl: %08x) - ignored\n",
+ usage->hid, field->application);
return -1;
defaulted:
@@ -123,38 +132,26 @@ static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
+ unsigned long prev_tsto, cur_ts;
+ __u16 prev_key, cur_key;
- if (drv_data->quirks & PLT_QUIRK_DOUBLE_VOLUME_KEYS) {
- unsigned long prev_ts, cur_ts;
+ /* Usages are filtered in plantronics_usages. */
- /* Usages are filtered in plantronics_usages. */
+ /* HZ too low for ms resolution - double key detection disabled */
+ /* or it is a key release - handle key presses only. */
+ if (!drv_data->double_key_to || !value)
+ return 0;
- if (!value) /* Handle key presses only. */
- return 0;
+ prev_tsto = drv_data->last_key_ts + drv_data->double_key_to;
+ cur_ts = drv_data->last_key_ts = jiffies;
+ prev_key = drv_data->last_key;
+ cur_key = drv_data->last_key = usage->code;
- prev_ts = drv_data->last_volume_key_ts;
- cur_ts = jiffies;
- if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_DOUBLE_KEY_TIMEOUT)
- return 1; /* Ignore the repeated key. */
-
- drv_data->last_volume_key_ts = cur_ts;
+ /* If the same key occurs in <= double_key_to -- ignore it */
+ if (prev_key == cur_key && time_before_eq(cur_ts, prev_tsto)) {
+ hid_dbg(hdev, "double key %d ignored\n", cur_key);
+ return 1; /* Ignore the repeated key. */
}
- if (drv_data->quirks & PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS) {
- unsigned long prev_ts, cur_ts;
-
- /* Usages are filtered in plantronics_usages. */
-
- if (!value) /* Handle key presses only. */
- return 0;
-
- prev_ts = drv_data->last_volume_key_ts;
- cur_ts = jiffies;
- if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT)
- return 1; /* Ignore the followed opposite volume key. */
-
- drv_data->last_volume_key_ts = cur_ts;
- }
-
return 0;
}
@@ -196,12 +193,16 @@ static int plantronics_probe(struct hid_device *hdev,
ret = hid_parse(hdev);
if (ret) {
hid_err(hdev, "parse failed\n");
- goto err;
+ return ret;
}
drv_data->device_type = plantronics_device_type(hdev);
- drv_data->quirks = id->driver_data;
- drv_data->last_volume_key_ts = jiffies - msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
+ drv_data->double_key_to = msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
+ drv_data->last_key_ts = jiffies - drv_data->double_key_to;
+
+ /* if HZ does not allow ms resolution - disable double key detection */
+ if (drv_data->double_key_to < PLT_DOUBLE_KEY_TIMEOUT)
+ drv_data->double_key_to = 0;
hid_set_drvdata(hdev, drv_data);
@@ -210,29 +211,10 @@ static int plantronics_probe(struct hid_device *hdev,
if (ret)
hid_err(hdev, "hw start failed\n");
-err:
return ret;
}
static const struct hid_device_id plantronics_devices[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES),
- .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES),
- .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
{ }
};
@@ -241,6 +223,14 @@ MODULE_DEVICE_TABLE(hid, plantronics_devices);
static const struct hid_usage_id plantronics_usages[] = {
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
+ { HID_TELEPHONY_MUTE, EV_KEY, HID_ANY_ID },
+ { HID_CONSUMER_MUTE, EV_KEY, HID_ANY_ID },
+ { PLT2_VOL_UP, EV_KEY, HID_ANY_ID },
+ { PLT2_VOL_DOWN, EV_KEY, HID_ANY_ID },
+ { PLT2_MIC_MUTE, EV_KEY, HID_ANY_ID },
+ { PLT1_VOL_UP, EV_KEY, HID_ANY_ID },
+ { PLT1_VOL_DOWN, EV_KEY, HID_ANY_ID },
+ { PLT1_MIC_MUTE, EV_KEY, HID_ANY_ID },
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-13 23:51 [PATCH v3 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
@ 2025-01-13 23:51 ` Terry Junge
2025-01-14 6:51 ` Wang, Wade
2025-01-14 12:38 ` Takashi Iwai
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2 siblings, 2 replies; 15+ messages in thread
From: Terry Junge @ 2025-01-13 23:51 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Many Poly/Plantronics headset families name the feature, input,
and/or output units in a such a way to produce control names
that are not recognized by user space. As such, the volume and
mute events do not get routed to the headset's audio controls.
As an example from a product family:
The microphone mute control is named
Headset Microphone Capture Switch
and the headset volume control is named
Headset Earphone Playback Volume
The quirk fixes these to become
Headset Capture Switch
Headset Playback Volume
Signed-off-by: Terry Junge <linuxhid@cosmicgizmosystems.com>
Cc: stable@vger.kernel.org
---
V1 -> V2: Add comments, usb_audio_dbg() calls, fix leading space case
V2 -> V3: Recode as per Takashi's suggestions, equivalent functionality
sound/usb/mixer_quirks.c | 51 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 23fcd680167d..58cb676873a6 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -4216,6 +4216,52 @@ static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer,
}
}
+
+/*
+ * Some Plantronics headsets have control names that don't meet ALSA naming
+ * standards. This function fixes nonstandard source names. By the time
+ * this function is called the control name should look like one of these:
+ * "source names Playback Volume"
+ * "source names Playback Switch"
+ * "source names Capture Volume"
+ * "source names Capture Switch"
+ * If any of the trigger words are found in the name then the name will
+ * be changed to:
+ * "Headset Playback Volume"
+ * "Headset Playback Switch"
+ * "Headset Capture Volume"
+ * "Headset Capture Switch"
+ * depending on the current suffix.
+ */
+static void snd_fix_plt_name(struct snd_usb_audio *chip,
+ typeof_member(struct snd_ctl_elem_id, name) * name)
+{
+ /* no variant of "Sidetone" should be added to this list */
+ static const char * const trigger[] = {
+ "Earphone", "Microphone", "Receive", "Transmit"
+ };
+ static const char * const suffix[] = {
+ " Playback Volume", " Playback Switch",
+ " Capture Volume", " Capture Switch"
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(trigger); i++)
+ if (strstr(*name, trigger[i]))
+ goto triggered;
+ usb_audio_dbg(chip, "no change in %s\n", *name);
+ return;
+
+triggered:
+ for (i = 0; i < ARRAY_SIZE(suffix); i++)
+ if (strstr(*name, suffix[i])) {
+ usb_audio_dbg(chip, "fixing kctl name %s\n", *name);
+ snprintf(*name, sizeof(*name), "Headset%s", suffix[i]);
+ return;
+ }
+ usb_audio_dbg(chip, "something wrong in kctl name %s\n", *name);
+}
+
void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
struct usb_mixer_elem_info *cval, int unitid,
struct snd_kcontrol *kctl)
@@ -4233,5 +4279,10 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
cval->min_mute = 1;
break;
}
+
+ /* ALSA-ify some Plantronics headset control names */
+ if (USB_ID_VENDOR(mixer->chip->usb_id) == 0x047f &&
+ (cval->control == UAC_FU_MUTE || cval->control == UAC_FU_VOLUME))
+ snd_fix_plt_name(mixer->chip, &kctl->id.name);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* RE: [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
@ 2025-01-14 6:44 ` Wang, Wade
0 siblings, 0 replies; 15+ messages in thread
From: Wang, Wade @ 2025-01-14 6:44 UTC (permalink / raw)
To: Terry Junge, Jiri Kosina, Takashi Iwai, Benjamin Tissoires,
Jaroslav Kysela
Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
@ 2025-01-14 6:51 ` Wang, Wade
2025-01-14 12:38 ` Takashi Iwai
1 sibling, 0 replies; 15+ messages in thread
From: Wang, Wade @ 2025-01-14 6:51 UTC (permalink / raw)
To: Terry Junge, Jiri Kosina, Takashi Iwai, Benjamin Tissoires,
Jaroslav Kysela
Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-14 6:51 ` Wang, Wade
@ 2025-01-14 12:38 ` Takashi Iwai
2025-01-14 22:14 ` Terry Junge
1 sibling, 1 reply; 15+ messages in thread
From: Takashi Iwai @ 2025-01-14 12:38 UTC (permalink / raw)
To: Terry Junge
Cc: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela, linux-input, linux-sound, linux-kernel
On Tue, 14 Jan 2025 00:51:59 +0100,
Terry Junge wrote:
>
> +/*
> + * Some Plantronics headsets have control names that don't meet ALSA naming
> + * standards. This function fixes nonstandard source names. By the time
> + * this function is called the control name should look like one of these:
> + * "source names Playback Volume"
> + * "source names Playback Switch"
> + * "source names Capture Volume"
> + * "source names Capture Switch"
> + * If any of the trigger words are found in the name then the name will
> + * be changed to:
> + * "Headset Playback Volume"
> + * "Headset Playback Switch"
> + * "Headset Capture Volume"
> + * "Headset Capture Switch"
> + * depending on the current suffix.
> + */
> +static void snd_fix_plt_name(struct snd_usb_audio *chip,
> + typeof_member(struct snd_ctl_elem_id, name) * name)
I personally find this style of argument is difficult to use.
That said, IMO, it's better to stick with the argument
struct snd_ctl_elem_id *id
and access via id->name as in your earlier patch; it's more idiomatic,
and easier to read.
thanks,
Takashi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-14 12:38 ` Takashi Iwai
@ 2025-01-14 22:14 ` Terry Junge
2025-01-15 7:42 ` Takashi Iwai
0 siblings, 1 reply; 15+ messages in thread
From: Terry Junge @ 2025-01-14 22:14 UTC (permalink / raw)
To: Takashi Iwai
Cc: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela, linux-input, linux-sound, linux-kernel
On 1/14/25 4:38 AM, Takashi Iwai wrote:
> On Tue, 14 Jan 2025 00:51:59 +0100,
> Terry Junge wrote:
>>
>> +/*
>> + * Some Plantronics headsets have control names that don't meet ALSA naming
>> + * standards. This function fixes nonstandard source names. By the time
>> + * this function is called the control name should look like one of these:
>> + * "source names Playback Volume"
>> + * "source names Playback Switch"
>> + * "source names Capture Volume"
>> + * "source names Capture Switch"
>> + * If any of the trigger words are found in the name then the name will
>> + * be changed to:
>> + * "Headset Playback Volume"
>> + * "Headset Playback Switch"
>> + * "Headset Capture Volume"
>> + * "Headset Capture Switch"
>> + * depending on the current suffix.
>> + */
>> +static void snd_fix_plt_name(struct snd_usb_audio *chip,
>> + typeof_member(struct snd_ctl_elem_id, name) * name)
>
> I personally find this style of argument is difficult to use.
> That said, IMO, it's better to stick with the argument
> struct snd_ctl_elem_id *id
> and access via id->name as in your earlier patch; it's more idiomatic,
> and easier to read.
>
So, is the coding of the rest of the function body acceptable if I just pass a
struct snd_ctl_elem_id *id
instead of an
unsigned char[44] *name
?
If not, what else do I need to address in V4 so it will be accepted?
thanks,
Terry
>
> thanks,
>
> Takashi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-14 22:14 ` Terry Junge
@ 2025-01-15 7:42 ` Takashi Iwai
0 siblings, 0 replies; 15+ messages in thread
From: Takashi Iwai @ 2025-01-15 7:42 UTC (permalink / raw)
To: Terry Junge
Cc: Takashi Iwai, Jiri Kosina, Takashi Iwai, Wade Wang,
Benjamin Tissoires, Jaroslav Kysela, linux-input, linux-sound,
linux-kernel
On Tue, 14 Jan 2025 23:14:13 +0100,
Terry Junge wrote:
>
> On 1/14/25 4:38 AM, Takashi Iwai wrote:
> > On Tue, 14 Jan 2025 00:51:59 +0100,
> > Terry Junge wrote:
> >>
> >> +/*
> >> + * Some Plantronics headsets have control names that don't meet ALSA naming
> >> + * standards. This function fixes nonstandard source names. By the time
> >> + * this function is called the control name should look like one of these:
> >> + * "source names Playback Volume"
> >> + * "source names Playback Switch"
> >> + * "source names Capture Volume"
> >> + * "source names Capture Switch"
> >> + * If any of the trigger words are found in the name then the name will
> >> + * be changed to:
> >> + * "Headset Playback Volume"
> >> + * "Headset Playback Switch"
> >> + * "Headset Capture Volume"
> >> + * "Headset Capture Switch"
> >> + * depending on the current suffix.
> >> + */
> >> +static void snd_fix_plt_name(struct snd_usb_audio *chip,
> >> + typeof_member(struct snd_ctl_elem_id, name) * name)
> >
> > I personally find this style of argument is difficult to use.
> > That said, IMO, it's better to stick with the argument
> > struct snd_ctl_elem_id *id
> > and access via id->name as in your earlier patch; it's more idiomatic,
> > and easier to read.
> >
> So, is the coding of the rest of the function body acceptable if I just pass a
> struct snd_ctl_elem_id *id
> instead of an
> unsigned char[44] *name
> ?
Likely yes.
thanks,
Takashi
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v4 0/2] Introduce Poly/Plantronics mute event support
2025-01-13 23:51 [PATCH v3 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
@ 2025-01-18 0:58 ` Terry Junge
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
` (2 more replies)
2 siblings, 3 replies; 15+ messages in thread
From: Terry Junge @ 2025-01-18 0:58 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Hi Jiri and Takashi,
If at all possible, it would be preferred if this patch set could be
sent upstream and to stable together.
This patch set was tested by Wade and myself with multiple
Poly/Plantronics product family headsets.
Thanks,
Terry
Link v1: https://lore.kernel.org/linux-input/87zfl333uy.wl-tiwai@suse.de/T/#t
Link v2: https://lore.kernel.org/linux-input/4a25e5d0-5e09-4246-8d70-8083d3189d53@cosmicgizmosystems.com/T/#t
Terry Junge (2):
HID: hid-plantronics: Add mic mute mapping and generalize quirks
ALSA: usb-audio: Add quirk for Plantronics headsets to fix control
names
drivers/hid/hid-plantronics.c | 144 ++++++++++++++++------------------
sound/usb/mixer_quirks.c | 51 ++++++++++++
2 files changed, 118 insertions(+), 77 deletions(-)
base-commit: 09a0fa92e5b45e99cf435b2fbf5ebcf889cf8780
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
@ 2025-01-18 0:58 ` Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 0:58 ` [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-18 8:13 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Takashi Iwai
2 siblings, 1 reply; 15+ messages in thread
From: Terry Junge @ 2025-01-18 0:58 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Add mapping for headset mute key events.
Remove PLT_QUIRK_DOUBLE_VOLUME_KEYS quirk and made it generic.
The quirk logic did not keep track of the actual previous key
so any key event occurring in less than or equal to 5ms was ignored.
Remove PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS quirk.
It had the same logic issue as the double key quirk and was actually
masking the as designed behavior of most of the headsets.
It's occurrence should be minimized with the ALSA control naming
quirk that is part of the patch set.
Signed-off-by: Terry Junge <linuxhid@cosmicgizmosystems.com>
Cc: stable@vger.kernel.org
---
V1 -> V2: Optimize out 2 macros - no functional changes
V2 -> V3: No change
V3 -> V4: No change
drivers/hid/hid-plantronics.c | 144 ++++++++++++++++------------------
1 file changed, 67 insertions(+), 77 deletions(-)
diff --git a/drivers/hid/hid-plantronics.c b/drivers/hid/hid-plantronics.c
index 25cfd964dc25..acb9eb18f7cc 100644
--- a/drivers/hid/hid-plantronics.c
+++ b/drivers/hid/hid-plantronics.c
@@ -6,9 +6,6 @@
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
*/
-/*
- */
-
#include "hid-ids.h"
#include <linux/hid.h>
@@ -23,30 +20,28 @@
#define PLT_VOL_UP 0x00b1
#define PLT_VOL_DOWN 0x00b2
+#define PLT_MIC_MUTE 0x00b5
#define PLT1_VOL_UP (PLT_HID_1_0_PAGE | PLT_VOL_UP)
#define PLT1_VOL_DOWN (PLT_HID_1_0_PAGE | PLT_VOL_DOWN)
+#define PLT1_MIC_MUTE (PLT_HID_1_0_PAGE | PLT_MIC_MUTE)
#define PLT2_VOL_UP (PLT_HID_2_0_PAGE | PLT_VOL_UP)
#define PLT2_VOL_DOWN (PLT_HID_2_0_PAGE | PLT_VOL_DOWN)
+#define PLT2_MIC_MUTE (PLT_HID_2_0_PAGE | PLT_MIC_MUTE)
+#define HID_TELEPHONY_MUTE (HID_UP_TELEPHONY | 0x2f)
+#define HID_CONSUMER_MUTE (HID_UP_CONSUMER | 0xe2)
#define PLT_DA60 0xda60
#define PLT_BT300_MIN 0x0413
#define PLT_BT300_MAX 0x0418
-
-#define PLT_ALLOW_CONSUMER (field->application == HID_CP_CONSUMERCONTROL && \
- (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
-
-#define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
-#define PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS BIT(1)
-
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
-#define PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT 220 /* ms */
struct plt_drv_data {
unsigned long device_type;
- unsigned long last_volume_key_ts;
- u32 quirks;
+ unsigned long last_key_ts;
+ unsigned long double_key_to;
+ __u16 last_key;
};
static int plantronics_input_mapping(struct hid_device *hdev,
@@ -58,34 +53,43 @@ static int plantronics_input_mapping(struct hid_device *hdev,
unsigned short mapped_key;
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
unsigned long plt_type = drv_data->device_type;
+ int allow_mute = usage->hid == HID_TELEPHONY_MUTE;
+ int allow_consumer = field->application == HID_CP_CONSUMERCONTROL &&
+ (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER &&
+ usage->hid != HID_CONSUMER_MUTE;
/* special case for PTT products */
if (field->application == HID_GD_JOYSTICK)
goto defaulted;
- /* handle volume up/down mapping */
/* non-standard types or multi-HID interfaces - plt_type is PID */
if (!(plt_type & HID_USAGE_PAGE)) {
switch (plt_type) {
case PLT_DA60:
- if (PLT_ALLOW_CONSUMER)
+ if (allow_consumer)
goto defaulted;
- goto ignored;
+ if (usage->hid == HID_CONSUMER_MUTE) {
+ mapped_key = KEY_MICMUTE;
+ goto mapped;
+ }
+ break;
default:
- if (PLT_ALLOW_CONSUMER)
+ if (allow_consumer || allow_mute)
goto defaulted;
}
+ goto ignored;
}
- /* handle standard types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
- /* 'basic telephony compliant' - allow default consumer page map */
- else if ((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
- (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) {
- if (PLT_ALLOW_CONSUMER)
- goto defaulted;
- }
- /* not 'basic telephony' - apply legacy mapping */
- /* only map if the field is in the device's primary vendor page */
- else if (!((field->application ^ plt_type) & HID_USAGE_PAGE)) {
+
+ /* handle standard consumer control mapping */
+ /* and standard telephony mic mute mapping */
+ if (allow_consumer || allow_mute)
+ goto defaulted;
+
+ /* handle vendor unique types - plt_type is 0xffa0uuuu or 0xffa2uuuu */
+ /* if not 'basic telephony compliant' - map vendor unique controls */
+ if (!((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
+ (plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) &&
+ !((field->application ^ plt_type) & HID_USAGE_PAGE))
switch (usage->hid) {
case PLT1_VOL_UP:
case PLT2_VOL_UP:
@@ -95,8 +99,11 @@ static int plantronics_input_mapping(struct hid_device *hdev,
case PLT2_VOL_DOWN:
mapped_key = KEY_VOLUMEDOWN;
goto mapped;
+ case PLT1_MIC_MUTE:
+ case PLT2_MIC_MUTE:
+ mapped_key = KEY_MICMUTE;
+ goto mapped;
}
- }
/*
* Future mapping of call control or other usages,
@@ -105,6 +112,8 @@ static int plantronics_input_mapping(struct hid_device *hdev,
*/
ignored:
+ hid_dbg(hdev, "usage: %08x (appl: %08x) - ignored\n",
+ usage->hid, field->application);
return -1;
defaulted:
@@ -123,38 +132,26 @@ static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
+ unsigned long prev_tsto, cur_ts;
+ __u16 prev_key, cur_key;
- if (drv_data->quirks & PLT_QUIRK_DOUBLE_VOLUME_KEYS) {
- unsigned long prev_ts, cur_ts;
+ /* Usages are filtered in plantronics_usages. */
- /* Usages are filtered in plantronics_usages. */
+ /* HZ too low for ms resolution - double key detection disabled */
+ /* or it is a key release - handle key presses only. */
+ if (!drv_data->double_key_to || !value)
+ return 0;
- if (!value) /* Handle key presses only. */
- return 0;
+ prev_tsto = drv_data->last_key_ts + drv_data->double_key_to;
+ cur_ts = drv_data->last_key_ts = jiffies;
+ prev_key = drv_data->last_key;
+ cur_key = drv_data->last_key = usage->code;
- prev_ts = drv_data->last_volume_key_ts;
- cur_ts = jiffies;
- if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_DOUBLE_KEY_TIMEOUT)
- return 1; /* Ignore the repeated key. */
-
- drv_data->last_volume_key_ts = cur_ts;
+ /* If the same key occurs in <= double_key_to -- ignore it */
+ if (prev_key == cur_key && time_before_eq(cur_ts, prev_tsto)) {
+ hid_dbg(hdev, "double key %d ignored\n", cur_key);
+ return 1; /* Ignore the repeated key. */
}
- if (drv_data->quirks & PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS) {
- unsigned long prev_ts, cur_ts;
-
- /* Usages are filtered in plantronics_usages. */
-
- if (!value) /* Handle key presses only. */
- return 0;
-
- prev_ts = drv_data->last_volume_key_ts;
- cur_ts = jiffies;
- if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_FOLLOWED_OPPOSITE_KEY_TIMEOUT)
- return 1; /* Ignore the followed opposite volume key. */
-
- drv_data->last_volume_key_ts = cur_ts;
- }
-
return 0;
}
@@ -196,12 +193,16 @@ static int plantronics_probe(struct hid_device *hdev,
ret = hid_parse(hdev);
if (ret) {
hid_err(hdev, "parse failed\n");
- goto err;
+ return ret;
}
drv_data->device_type = plantronics_device_type(hdev);
- drv_data->quirks = id->driver_data;
- drv_data->last_volume_key_ts = jiffies - msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
+ drv_data->double_key_to = msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
+ drv_data->last_key_ts = jiffies - drv_data->double_key_to;
+
+ /* if HZ does not allow ms resolution - disable double key detection */
+ if (drv_data->double_key_to < PLT_DOUBLE_KEY_TIMEOUT)
+ drv_data->double_key_to = 0;
hid_set_drvdata(hdev, drv_data);
@@ -210,29 +211,10 @@ static int plantronics_probe(struct hid_device *hdev,
if (ret)
hid_err(hdev, "hw start failed\n");
-err:
return ret;
}
static const struct hid_device_id plantronics_devices[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
- .driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3325_SERIES),
- .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
- { HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
- USB_DEVICE_ID_PLANTRONICS_ENCOREPRO_500_SERIES),
- .driver_data = PLT_QUIRK_FOLLOWED_OPPOSITE_VOLUME_KEYS },
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
{ }
};
@@ -241,6 +223,14 @@ MODULE_DEVICE_TABLE(hid, plantronics_devices);
static const struct hid_usage_id plantronics_usages[] = {
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
+ { HID_TELEPHONY_MUTE, EV_KEY, HID_ANY_ID },
+ { HID_CONSUMER_MUTE, EV_KEY, HID_ANY_ID },
+ { PLT2_VOL_UP, EV_KEY, HID_ANY_ID },
+ { PLT2_VOL_DOWN, EV_KEY, HID_ANY_ID },
+ { PLT2_MIC_MUTE, EV_KEY, HID_ANY_ID },
+ { PLT1_VOL_UP, EV_KEY, HID_ANY_ID },
+ { PLT1_VOL_DOWN, EV_KEY, HID_ANY_ID },
+ { PLT1_MIC_MUTE, EV_KEY, HID_ANY_ID },
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
@ 2025-01-18 0:58 ` Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 8:13 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Takashi Iwai
2 siblings, 1 reply; 15+ messages in thread
From: Terry Junge @ 2025-01-18 0:58 UTC (permalink / raw)
To: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela
Cc: Terry Junge, linux-input, linux-sound, linux-kernel
Many Poly/Plantronics headset families name the feature, input,
and/or output units in a such a way to produce control names
that are not recognized by user space. As such, the volume and
mute events do not get routed to the headset's audio controls.
As an example from a product family:
The microphone mute control is named
Headset Microphone Capture Switch
and the headset volume control is named
Headset Earphone Playback Volume
The quirk fixes these to become
Headset Capture Switch
Headset Playback Volume
Signed-off-by: Terry Junge <linuxhid@cosmicgizmosystems.com>
Cc: stable@vger.kernel.org
---
V1 -> V2: Add comments, usb_audio_dbg() calls, fix leading space case
V2 -> V3: Recode as per Takashi's suggestions, equivalent functionality
V3 -> V4: Change passed parameter to struct snd_ctl_elem_id *id
sound/usb/mixer_quirks.c | 51 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 23fcd680167d..9b0bf626cd02 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -4216,6 +4216,52 @@ static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer,
}
}
+/*
+ * Some Plantronics headsets have control names that don't meet ALSA naming
+ * standards. This function fixes nonstandard source names. By the time
+ * this function is called the control name should look like one of these:
+ * "source names Playback Volume"
+ * "source names Playback Switch"
+ * "source names Capture Volume"
+ * "source names Capture Switch"
+ * If any of the trigger words are found in the name then the name will
+ * be changed to:
+ * "Headset Playback Volume"
+ * "Headset Playback Switch"
+ * "Headset Capture Volume"
+ * "Headset Capture Switch"
+ * depending on the current suffix.
+ */
+static void snd_fix_plt_name(struct snd_usb_audio *chip,
+ struct snd_ctl_elem_id *id)
+{
+ /* no variant of "Sidetone" should be added to this list */
+ static const char * const trigger[] = {
+ "Earphone", "Microphone", "Receive", "Transmit"
+ };
+ static const char * const suffix[] = {
+ " Playback Volume", " Playback Switch",
+ " Capture Volume", " Capture Switch"
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(trigger); i++)
+ if (strstr(id->name, trigger[i]))
+ goto triggered;
+ usb_audio_dbg(chip, "no change in %s\n", id->name);
+ return;
+
+triggered:
+ for (i = 0; i < ARRAY_SIZE(suffix); i++)
+ if (strstr(id->name, suffix[i])) {
+ usb_audio_dbg(chip, "fixing kctl name %s\n", id->name);
+ snprintf(id->name, sizeof(id->name), "Headset%s",
+ suffix[i]);
+ return;
+ }
+ usb_audio_dbg(chip, "something wrong in kctl name %s\n", id->name);
+}
+
void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
struct usb_mixer_elem_info *cval, int unitid,
struct snd_kcontrol *kctl)
@@ -4233,5 +4279,10 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
cval->min_mute = 1;
break;
}
+
+ /* ALSA-ify some Plantronics headset control names */
+ if (USB_ID_VENDOR(mixer->chip->usb_id) == 0x047f &&
+ (cval->control == UAC_FU_MUTE || cval->control == UAC_FU_VOLUME))
+ snd_fix_plt_name(mixer->chip, &kctl->id);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v4 0/2] Introduce Poly/Plantronics mute event support
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-18 0:58 ` [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
@ 2025-01-18 8:13 ` Takashi Iwai
2025-02-03 10:09 ` Jiri Kosina
2 siblings, 1 reply; 15+ messages in thread
From: Takashi Iwai @ 2025-01-18 8:13 UTC (permalink / raw)
To: Terry Junge
Cc: Jiri Kosina, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela, linux-input, linux-sound, linux-kernel
On Sat, 18 Jan 2025 01:58:37 +0100,
Terry Junge wrote:
>
> Hi Jiri and Takashi,
>
> If at all possible, it would be preferred if this patch set could be
> sent upstream and to stable together.
Note that, for picking up to stable, it's never guaranteed to take two
at the same time unless you explicitly request to the stable
maintainers.
In anyway, I don't mind to put the USB-audio change via HID tree.
In that case, feel free to take my ack:
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Or, if the HID patch can be taken via sound git tree, just let me
know.
thanks,
Takashi
> This patch set was tested by Wade and myself with multiple
> Poly/Plantronics product family headsets.
>
> Thanks,
> Terry
>
> Link v1: https://lore.kernel.org/linux-input/87zfl333uy.wl-tiwai@suse.de/T/#t
> Link v2: https://lore.kernel.org/linux-input/4a25e5d0-5e09-4246-8d70-8083d3189d53@cosmicgizmosystems.com/T/#t
>
> Terry Junge (2):
> HID: hid-plantronics: Add mic mute mapping and generalize quirks
> ALSA: usb-audio: Add quirk for Plantronics headsets to fix control
> names
>
> drivers/hid/hid-plantronics.c | 144 ++++++++++++++++------------------
> sound/usb/mixer_quirks.c | 51 ++++++++++++
> 2 files changed, 118 insertions(+), 77 deletions(-)
>
>
> base-commit: 09a0fa92e5b45e99cf435b2fbf5ebcf889cf8780
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
@ 2025-01-20 2:19 ` Wang, Wade
0 siblings, 0 replies; 15+ messages in thread
From: Wang, Wade @ 2025-01-20 2:19 UTC (permalink / raw)
To: Terry Junge, Jiri Kosina, Takashi Iwai, Benjamin Tissoires,
Jaroslav Kysela
Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
2025-01-18 0:58 ` [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
@ 2025-01-20 2:19 ` Wang, Wade
0 siblings, 0 replies; 15+ messages in thread
From: Wang, Wade @ 2025-01-20 2:19 UTC (permalink / raw)
To: Terry Junge, Jiri Kosina, Takashi Iwai, Benjamin Tissoires,
Jaroslav Kysela
Cc: linux-input@vger.kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Signed-off-by: Wade Wang <wade.wang@hp.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v4 0/2] Introduce Poly/Plantronics mute event support
2025-01-18 8:13 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Takashi Iwai
@ 2025-02-03 10:09 ` Jiri Kosina
0 siblings, 0 replies; 15+ messages in thread
From: Jiri Kosina @ 2025-02-03 10:09 UTC (permalink / raw)
To: Takashi Iwai
Cc: Terry Junge, Takashi Iwai, Wade Wang, Benjamin Tissoires,
Jaroslav Kysela, linux-input, linux-sound, linux-kernel
On Sat, 18 Jan 2025, Takashi Iwai wrote:
> On Sat, 18 Jan 2025 01:58:37 +0100,
> Terry Junge wrote:
> >
> > Hi Jiri and Takashi,
> >
> > If at all possible, it would be preferred if this patch set could be
> > sent upstream and to stable together.
>
> Note that, for picking up to stable, it's never guaranteed to take two
> at the same time unless you explicitly request to the stable
> maintainers.
>
> In anyway, I don't mind to put the USB-audio change via HID tree.
> In that case, feel free to take my ack:
>
> Reviewed-by: Takashi Iwai <tiwai@suse.de>
Thanks, I have now queued both patches in hid.git#for-6.15/plantronics
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-02-03 10:09 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 23:51 [PATCH v3 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-13 23:51 ` [PATCH v3 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-14 6:44 ` Wang, Wade
2025-01-13 23:51 ` [PATCH v3 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-14 6:51 ` Wang, Wade
2025-01-14 12:38 ` Takashi Iwai
2025-01-14 22:14 ` Terry Junge
2025-01-15 7:42 ` Takashi Iwai
2025-01-18 0:58 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Terry Junge
2025-01-18 0:58 ` [PATCH v4 1/2] HID: hid-plantronics: Add mic mute mapping and generalize quirks Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 0:58 ` [PATCH v4 2/2] ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names Terry Junge
2025-01-20 2:19 ` Wang, Wade
2025-01-18 8:13 ` [PATCH v4 0/2] Introduce Poly/Plantronics mute event support Takashi Iwai
2025-02-03 10:09 ` Jiri Kosina
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).