]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: Improve Focusrite sample rate filtering
authorGeoffrey D. Bennett <g@b4.vu>
Fri, 20 Feb 2026 16:03:45 +0000 (02:33 +1030)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Feb 2026 08:57:09 +0000 (09:57 +0100)
commit24d2d3c5f94007a5a0554065ab7349bb69e28bcb
tree74a5ca5559c9c4982b2c4353704c6c93039fc12a
parent9fb16a5c5ff93058851099a2b80a899b0c53fe3f
ALSA: usb-audio: Improve Focusrite sample rate filtering

Replace the bLength == 10 max_rate check in
focusrite_valid_sample_rate() with filtering that also examines the
bmControls VAL_ALT_SETTINGS bit.

When VAL_ALT_SETTINGS is readable, the device uses strict
per-altsetting rate filtering (only the highest rate pair for that
altsetting is valid). When it is not readable, all rates up to
max_rate are valid.

For devices without the bLength == 10 Format Type descriptor extension
but with VAL_ALT_SETTINGS readable and multiple altsettings (only seen
in Scarlett 18i8 3rd Gen playback), fall back to the Focusrite
convention: alt 1 = 48kHz, alt 2 = 96kHz, alt 3 = 192kHz.

This produces correct rate tables for all tested Focusrite devices
(all Scarlett 2nd, 3rd, and 4th Gen, Clarett+, and Vocaster) using
only USB descriptors, allowing QUIRK_FLAG_VALIDATE_RATES to be removed
for Focusrite in the next commit.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/7e18c1f393a6ecb6fc75dd867a2c4dbe135e3e22.1771594828.git.g@b4.vu
sound/usb/format.c