HID: hid-plantronics: Add mic mute mapping and generalize quirks
authorTerry Junge <linuxhid@cosmicgizmosystems.com>
Sat, 18 Jan 2025 00:58:38 +0000 (16:58 -0800)
committerJiri Kosina <jkosina@suse.com>
Mon, 3 Feb 2025 10:09:05 +0000 (11:09 +0100)
commit9821709af892be9fbf4ee9a50b2f3e0604295ce0
tree47167f40fac2c2c32b08a2c45e67d811effdb202
parent27c02784773a69fd896e42f3cec73be8c5c83c1f
HID: hid-plantronics: Add mic mute mapping and generalize quirks

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
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-plantronics.c