ALSA: usb-audio: Add quirk for Logitech PRO X 2 LIGHTSPEED
PATCH v3 1/1 ALSA: usb-audio: Add quirk for Logitech PRO X 2 LIGHTSPEED
The UAC mixer of Logitech PRO X 2 LIGHTSPEED works fine except that its volume GET_CUR method returns sticky values.
Since commit 86aa1ea1f15c
("ALSA: usb-audio: Do not expose sticky mixers"), the sticky check considers the mixer to be sticky and unnecessarily disables the mixer.
Add QUIRK_FLAG_MIXER_GET_CUR_BROKEN for Logitech PRO X 2 LIGHTSPEED (046d:0af7) to address this.
Compiled and tested on 7.2-rc5
---
Output with quirk enabled:
usb 3-2.1: New USB device found, idVendor=046d, idProduct=0af7, bcdDevice= 1.00
usb 3-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-2.1: Product: PRO X 2 LIGHTSPEED
usb 3-2.1: Manufacturer: Logitech
usb 3-2.1: SerialNumber: 0000000000000000
input: Logitech PRO X 2 LIGHTSPEED Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:07:00.4/usb3/3-2/3-2.1/3-2.1:1.3/0003:046D:0AF7.0003/input/input6
input: Logitech PRO X 2 LIGHTSPEED as /devices/pci0000:00/0000:00:08.1/0000:07:00.4/usb3/3-2/3-2.1/3-2.1:1.3/0003:046D:0AF7.0003/input/input7
input: Logitech PRO X 2 LIGHTSPEED as /devices/pci0000:00/0000:00:08.1/0000:07:00.4/usb3/3-2/3-2.1/3-2.1:1.3/0003:046D:0AF7.0003/input/input8 usb 3-2.1: 2:0: broken mixer GET_CUR (-18944/0/256 => -2662)
usb 3-2.1: 6:0: broken mixer GET_CUR (-18944/0/256 => 0)
Changes in v2:
- Commmit message missed the version I compiled and tested it on.
- I forgot to add v2 to the patch.
--- .clippy.toml | 21 --------------------- sound/usb/quirks.c | 2 ++ 2 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 .clippy.toml
.clippy.toml deleted +0 -21
@@ -1,21 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 - -msrv = "1.85.0" - -check-private-items = true - -disallowed-macros = [ - # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate - # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303. - { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true }, -] - -[[disallowed-methods]] -path = "core::ffi::CStr::as_ptr" -replacement = "kernel::prelude::CStrExt::as_char_ptr" -reason = "kernel's `char` is always unsigned, use `as_char_ptr` instead" - -[[disallowed-methods]] -path = "core::ffi::CStr::from_ptr" -replacement = "kernel::prelude::CStrExt::from_char_ptr" -reason = "kernel's `char` is always unsigned, use `from_char_ptr` instead"
sound/usb/quirks.c +2 -0
@@ -2251,6 +2251,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {DEVICE_FLG (0x046d ,0x0a8f ,/* Logitech H390 headset */ QUIRK_FLAG_CTL_MSG_DELAY_1M |QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE ), +DEVICE_FLG (0x046d ,0x0af7 ,/* Logitech PRO X 2 LIGHTSPEED */ +QUIRK_FLAG_MIXER_GET_CUR_BROKEN ),DEVICE_FLG (0x0499 ,0x1506 ,/* Yamaha THR5 */ QUIRK_FLAG_GENERIC_IMPLICIT_FB ), DEVICE_FLG(0x0499, 0x1509, /* Steinberg UR22 */
base-commit: f5098b6bae761e346ebcd9da7f95622c04733cff
Signature · 1 line
2.55.0