Commit cc8e9105 authored by Tina Wuest's avatar Tina Wuest Committed by Takashi Iwai
Browse files

ALSA: usb-audio: Allow Focusrite devices to use low samplerates



Commit 05f254a6 ("ALSA: usb-audio:
Improve filtering of sample rates on Focusrite devices") changed the
check for max_rate in a way which was overly restrictive, forcing
devices to use very high samplerates if they support them, despite
support existing for lower rates as well.

This maintains the intended outcome (ensuring samplerates selected are
supported) while allowing devices with higher maximum samplerates to be
opened at all supported samplerates.

This patch was tested with a Clarett+ 8Pre USB

Fixes: 05f254a6 ("ALSA: usb-audio: Improve filtering of sample rates on Focusrite devices")
Signed-off-by: default avatarTina Wuest <tina@wuest.me>
Link: https://patch.msgid.link/20250901092024.140993-1-tina@wuest.me


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d5f8458e
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -327,12 +327,16 @@ static bool focusrite_valid_sample_rate(struct snd_usb_audio *chip,
		max_rate = combine_quad(&fmt[6]);

		switch (max_rate) {
		case 192000:
			if (rate == 176400 || rate == 192000)
				return true;
			fallthrough;
		case 96000:
			if (rate == 88200 || rate == 96000)
				return true;
			fallthrough;
		case 48000:
			return (rate == 44100 || rate == 48000);
		case 96000:
			return (rate == 88200 || rate == 96000);
		case 192000:
			return (rate == 176400 || rate == 192000);
		default:
			usb_audio_info(chip,
				"%u:%d : unexpected max rate: %u\n",