summaryrefslogtreecommitdiffstats
path: root/sound/usb/clock.c
diff options
context:
space:
mode:
authorJoe Turner <joe@oampo.co.uk>2015-02-16 21:44:33 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-17 07:20:04 +0100
commitb62b998010028c4dfd7db7c26990efb2a0985a1e (patch)
treea318c5ce9088577e59289479c65cf48cee05218c /sound/usb/clock.c
parentALSA: hda/tegra check correct return value from ioremap_resource (diff)
downloadlinux-b62b998010028c4dfd7db7c26990efb2a0985a1e.tar.xz
linux-b62b998010028c4dfd7db7c26990efb2a0985a1e.zip
ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate. This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound. [minor tidy up by tiwai] Signed-off-by: Joe Turner <joe@oampo.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/clock.c')
-rw-r--r--sound/usb/clock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 03fed6611d9e..2ed260b10f6d 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -303,6 +303,11 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip, int iface,
return err;
}
+ /* Don't check the sample rate for devices which we know don't
+ * support reading */
+ if (snd_usb_get_sample_rate_quirk(chip))
+ return 0;
+
if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC_GET_CUR,
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_IN,
UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,