All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: Skip probe-time interface setup for MSI MAG X570S ALC4080
@ 2026-10-26 14:09 Zak Brighton Knight
  2026-10-27  7:29 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Zak Brighton Knight @ 2026-10-26 14:09 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, linux-sound, Zak Brighton Knight

The Realtek ALC4080 USB audio on the MSI MAG X570S Tomahawk Max WiFi
(USB ID 0db0:a073, the same ID as the MAG X570S Torpedo Max mixer map)
has six streaming interfaces with 68 altsettings in total. For each of
them, __snd_usb_parse_audio_interface() switches the interface to alt 0,
initialises pitch and the sample rate and switches back, which costs
about 64 ms per altsetting here, mostly spent inside usb_set_interface().
Probing the card therefore takes about 6.4 seconds, on every boot.

That setup is redundant with snd_usb_endpoint_prepare() at stream-open
time, so set QUIRK_FLAG_SKIP_IFACE_SETUP for this device.

Tested on 7.2.11 with the equivalent quirk_flags=0db0:a073:skip_iface_setup
module option, re-probing the device via its sysfs "authorized"
attribute: probe time went from 6.45 s to 0.57 s, all 68 altsettings
are still listed in /proc/asound/cardX/stream*, and playback and
capture work.

Assisted-by: LLM
Signed-off-by: Zak Brighton Knight <zakbrightonknight@gmail.com>
---
 sound/usb/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index b6be3a80d..4ec1f2a0b 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2661,6 +2661,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 		   QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE),
 	DEVICE_FLG(0x0d8c, 0x0102, /* C-Media CM6206 */
 		   QUIRK_FLAG_GET_SAMPLE_RATE),
+	DEVICE_FLG(0x0db0, 0xa073, /* MSI MAG X570S Tomahawk/Torpedo Max (ALC4080) */
+		   QUIRK_FLAG_SKIP_IFACE_SETUP),
 	DEVICE_FLG(0x0e0b, 0xfa01, /* Feaulle Rainbow */
 		   QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE),
 	DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
-- 
2.56.0


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

end of thread, other threads:[~2026-10-27  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 14:09 [PATCH] ALSA: usb-audio: Skip probe-time interface setup for MSI MAG X570S ALC4080 Zak Brighton Knight
2026-10-27  7:29 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.