[PATCH AUTOSEL 6.19-5.15] ALSA: usb-audio: Avoid implicit feedback mode on DIYINHK USB Audio 2.0

Sasha Levin
2026-03-05T15:37:17Z

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit c5bf24c8aba1ff711226ee0f039ff01a5754692b ]

Although DIYINHK USB Audio 2.0 (ID 20b1:2009) shows the implicit
feedback source for the capture stream, this would cause several
problems for the playback. Namely, the device can get wMaxPackSize
1024 for 24/32 bit format with 6 channels, and when a high sample rate
like 352.8kHz or 384kHz is played, the packet size overflows the max
limit. Also, the device has another two playback altsets, and those
aren't properly handled with the implicit feedback.

Since the device has been working well even before introducing the
implicit feedback, we can assume that it works fine in the async mode.
This patch adds the explicit skip of the implicit fb detection to make
the playback running in the async mode.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221076
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260225085233.316306-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis

### Problem Description
This commit adds a USB audio device quirk for the DIYINHK USB Audio 2.0
device (VID 0x20b1, PID 0x2009) to skip implicit feedback mode. The
bugzilla report (#221076) documents a **kernel crash/oops** when playing
6-channel audio at high sample rates (352.8kHz/384kHz). The root cause
is that implicit feedback mode leads to packet sizes exceeding the
device's wMaxPacketSize of 1024 bytes, causing buffer overruns, URB
submission failures, and ultimately kernel panics.

### Stable Kernel Criteria Assessment

1. **Fixes a real bug**: YES - kernel crash/hard hang with specific
hardware at high sample rates. The bugzilla report documents kernel
oops with page faults in memset during URB preparation.

2. **Obviously correct and tested**: YES - it's a 2-line quirk flag
addition by the ALSA maintainer (Takashi Iwai). The fix was confirmed
working per the bugzilla discussion.

3. **Small and contained**: YES - adds exactly 2 lines to the quirk
flags table. Zero risk to any other device.

4. **No new features**: Correct - this is a hardware workaround, not a
feature.

5. **Category**: This falls squarely into the **hardware quirk**
exception category, which is explicitly listed as always appropriate
for stable backporting.

### Risk Assessment

- **Risk**: Essentially zero. The change only affects one specific USB
device (0x20b1:0x2009). The `QUIRK_FLAG_SKIP_IMPLICIT_FB` flag is
well-established (since 2022) and simply bypasses implicit feedback
detection. The `QUIRK_FLAG_DSD_RAW` flag enables DSD format support,
also well-established (since 2021).
- **Benefit**: Prevents kernel crashes/hangs for users of this specific
USB audio device at high sample rates.

### Dependencies

The prerequisite infrastructure (`QUIRK_FLAG_SKIP_IMPLICIT_FB`
introduced in commit `0f1f7a6661394` from April 2022, and
`QUIRK_FLAG_DSD_RAW` from `68e851ee4cfd2` in July 2021) should be
present in all currently maintained stable trees (6.1+, 6.6+, etc.). The
patch is a simple table entry addition that should apply cleanly.

### Verification

- **Bugzilla link**
(https://bugzilla.kernel.org/show_bug.cgi?id=221076): Confirmed real
user-reported crash with kernel oops, page fault, and hard hangs at
high sample rates on DIYINHK D2 device.
- **QUIRK_FLAG_SKIP_IMPLICIT_FB** defined in `sound/usb/usbaudio.h` and
used in `sound/usb/implicit.c:390-391` to return early from implicit
feedback setup - verified via agent exploration.
- **QUIRK_FLAG_DSD_RAW** defined in `sound/usb/usbaudio.h` and used in
`sound/usb/quirks.c:2078-2079` - verified via agent exploration.
- **Both flags have existed since 2021-2022** (commits `68e851ee4cfd2`
and `0f1f7a6661394`) - verified via git log, confirming they exist in
stable trees.
- **Author is Takashi Iwai**, the ALSA subsystem maintainer - verified
from commit authorship.
- **The change is a 2-line addition** to an existing quirk flags table
with no logic changes - verified from the diff.

### Conclusion

This is a textbook stable backport candidate: a small, zero-risk
hardware quirk that fixes a real kernel crash reported by users,
authored by the subsystem maintainer, with well-established
infrastructure already present in stable trees.

**YES**

sound/usb/quirks.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 86c329632e396..57c036ee9ba96 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2363,6 +2363,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
DEVICE_FLG(0x2040, 0x7281, /* Hauppauge HVR-950Q-MXL */
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
+ DEVICE_FLG(0x20b1, 0x2009, /* XMOS Ltd DIYINHK USB Audio 2.0 */
+ QUIRK_FLAG_SKIP_IMPLICIT_FB | QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x2040, 0x8200, /* Hauppauge Woodbury */
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
DEVICE_FLG(0x21b4, 0x0081, /* AudioQuest DragonFly */
--
2.51.0