[3/6] ALSA: usb: ADC3. Do not set sample rate for BADD configuration.
diff mbox

Message ID 20171129105532.15420-4-jorge.sanjuan@codethink.co.uk
State New
Headers show

Commit Message

Jorge Sanjuan Nov. 29, 2017, 10:55 a.m. UTC
BADD configuration is fixed to 48KHz for all AudioStreaming
interfaces.

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

Patch
diff mbox

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);
 	}
 }