[PATCH 2/2] ALSA: usb-audio: fix the format bits of the Steinberg UR22C

From: Xinyu Wei

Date: Sun Nov 08 2026 - 08:04:33 EST


In configuration 2 of the Steinberg UR22C (0499:172f), the capture
AS_GENERAL descriptor reports bmFormats = 0xffffffff, causing the driver
to advertise U8, S32_LE, FLOAT_LE, MU_LAW, A_LAW and SPECIAL even though
the hardware only supports 32-bit PCM (S32_LE).

Because playback is implicit-feedback synced to the capture endpoint
(0x81 on interface 2), hw_rule_format() restricts playback to the active
capture stream's format. If capture is opened first with a non-S32_LE
format such as FLOAT_LE, the intersection with playback's S32_LE-only
format mask is empty and playback fails to open with -EINVAL.

Clamp bmFormats to UAC2 PCM (1) in parse_audio_format_i_type() when
chip->usb_id is 0499:172f and format == 0xffffffff, matching the
existing DS4201 workaround below it.

Signed-off-by: Xinyu Wei <xinyuwei1024@xxxxxxxxx>
---
sound/usb/format.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/sound/usb/format.c b/sound/usb/format.c
index 4830f9f93..7ca2b5d5c 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -57,6 +57,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
sample_width = fmt->bBitResolution;
sample_bytes = fmt->bSubslotSize;

+ /* Steinberg UR22C workaround: config 2 capture sets 0xffffffff */
+ if (chip->usb_id == USB_ID(0x0499, 0x172f) &&
+ format == 0xffffffff)
+ format = 1;
+
if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) {
pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL;
/* flag potentially raw DSD capable altsettings */
--
2.56.0