[alsa-devel] [PATCH 3/6] ALSA: usb: ADC3. Do not set sample rate for BADD configuration.

Jorge Sanjuan jorge.sanjuan at codethink.co.uk
Wed Nov 29 11:55:29 CET 2017


BADD configuration is fixed to 48KHz for all AudioStreaming
interfaces.

Signed-off-by: Jorge Sanjuan <jorge.sanjuan at codethink.co.uk>
---
 sound/usb/clock.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 04361d79b163..c7f4ca4cdcd4 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -605,7 +605,11 @@ int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface,
 
 	case UAC_VERSION_2:
 	case UAC_VERSION_3:
-		return set_sample_rate_v2v3(chip, iface, alts, fmt, rate);
+		if (chip->badd_profile > UAC3_FUNCTION_SUBCLASS_FULL_ADC_3_0)
+			return 0;
+		else
+			return set_sample_rate_v2v3(chip, iface,
+						    alts, fmt, rate);
 	}
 }
 
-- 
2.11.0



More information about the Alsa-devel mailing list