From: Xinyu Wei <xinyuwei1024@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>
Cc: Xinyu Wei <xinyuwei1024@gmail.com>
Subject: [PATCH 2/2] ALSA: usb-audio: fix the format bits of the Steinberg UR22C
Date: Sun, 8 Nov 2026 21:03:03 +0800 [thread overview]
Message-ID: <20261108130303.387288-3-xinyuwei1024@gmail.com> (raw)
In-Reply-To: <20261108130303.387288-1-xinyuwei1024@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2026-11-08 13:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 13:03 [PATCH 0/2] ALSA: usb-audio: second configuration of the Steinberg UR22C Xinyu Wei
2026-11-08 13:03 ` [PATCH 1/2] ALSA: usb-audio: name the interfaces " Xinyu Wei
2026-11-08 13:03 ` Xinyu Wei [this message]
2026-11-09 14:08 ` [PATCH 0/2] ALSA: usb-audio: second configuration " Takashi Iwai
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=20261108130303.387288-3-xinyuwei1024@gmail.com \
--to=xinyuwei1024@gmail.com \
--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 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.