mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: chris@kode54.net
To: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>
Cc: Christopher Snowhill <chris@kode54.net>,
	Cryolitia PukNgae <cryolitia@uniontech.com>,
	Rong Zhang <i@rong.moe>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] ALSA: usb-audio: quirk_flags parsing fix and Logitech PRO X 2 LIGHTSPEED quirk
Date: Fri, 20 Nov 2026 04:03:46 -0800	[thread overview]
Message-ID: <20261120120356.10909-1-chris@kode54.net> (raw)

Patch 1 fixes parsing of flag names written to the quirk_flags module
parameter with a trailing newline, as echo produces.

Patch 2 adds quirk flags for the Logitech PRO X 2 LIGHTSPEED receiver
(046d:0af7). This is a mitigation, not a fix. After a hotplug the
receiver firmware resets itself on the first stream open, and also on
repeated GET_STATUS requests or on SET_CONFIGURATION shortly after a
port reset. It only behaves once it has gone through such a reset of
its own. The flags avoid the worse failure, where the probe-time
interface setup wedges the receiver for about 77 seconds.

The same receiver hotplugs without trouble on Windows and macOS. A
USBPcap capture of a Windows hotplug, with G HUB installed, shows no
missing request that made a difference when I tried it. Replaying
G HUB's initial HID reports before the audio driver binds did not
help, and neither did a host port reset. These differences were not
isolated:
- Windows never sends GET_STATUS.
- It sets the playback alt setting once, about 0.9 s after
  configuration, and keeps it.
- It only reads the volume controls at probe.
Suggestions on how to narrow this down, or on whether the quirk should
be expressed differently, are welcome. Captures and logs are available.

The device entry repeats CTL_MSG_DELAY_1M from the Logitech vendor
entry, as the other Logitech device entries do, because a device entry
replaces the vendor match. The receiver also worked with only
SKIP_IFACE_SETUP | IFACE_DELAY. The PRO X Wireless (046d:0aba) entry
does not carry the delay; Rong, I'm not sure whether that was intended.

Testing: with both patches applied, sound/usb/ builds without warnings
with W=1 and checkpatch --strict is clean. Patch 2 was runtime-tested on
a 7.3.5 stable kernel. Cold hotplugs on a front-panel (PROM21) port and
a rear (CPU xHCI, behind a hub) port recover within half a second and
then play normally.
Patch 1 was runtime-tested on the same kernel. Flag names written with
a plain echo are applied, and an empty echo is ignored by the parser.
The sysfs readback still shows the newline as written, because the
parameter stores the raw string. That is cosmetic and left unchanged.

Assisted-by: AI

Christopher Snowhill (2):
  ALSA: usb-audio: Ignore trailing whitespace in quirk_flags
  ALSA: usb-audio: Add quirk flags for Logitech PRO X 2 LIGHTSPEED

 sound/usb/quirks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


base-commit: 58161ead29e50d70a317ea26b472e0c7508e69da
-- 
2.56.0


             reply	other threads:[~2026-11-20 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 12:03 chris [this message]
2026-11-20 12:03 ` [PATCH 1/2] ALSA: usb-audio: Ignore trailing whitespace in quirk_flags chris
2026-11-20 12:03 ` [PATCH 2/2] ALSA: usb-audio: Add quirk flags for Logitech PRO X 2 LIGHTSPEED chris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120120356.10909-1-chris@kode54.net \
    --to=chris@kode54.net \
    --cc=cryolitia@uniontech.com \
    --cc=i@rong.moe \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®