aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/caiaq/caiaq-audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/caiaq/caiaq-audio.c')
-rw-r--r--sound/usb/caiaq/caiaq-audio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/usb/caiaq/caiaq-audio.c b/sound/usb/caiaq/caiaq-audio.c
index 577b1129de0..08d51e0c9fe 100644
--- a/sound/usb/caiaq/caiaq-audio.c
+++ b/sound/usb/caiaq/caiaq-audio.c
@@ -377,6 +377,9 @@ static void read_in_urb_mode2(struct snd_usb_caiaqdev *dev,
for (stream = 0; stream < dev->n_streams; stream++, i++) {
sub = dev->sub_capture[stream];
+ if (dev->input_panic)
+ usb_buf[i] = 0;
+
if (sub) {
struct snd_pcm_runtime *rt = sub->runtime;
char *audio_buf = rt->dma_area;
@@ -398,6 +401,9 @@ static void read_in_urb(struct snd_usb_caiaqdev *dev,
if (!dev->streaming)
return;
+ if (iso->actual_length < dev->bpp)
+ return;
+
switch (dev->spec.data_alignment) {
case 0:
read_in_urb_mode0(dev, urb, iso);