diff options
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 12 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 2 |
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index c698d3c9690f..52c6657d61cf 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -152,9 +152,6 @@ static void em28xx_audio_isocirq(struct urb *urb) | |||
152 | } | 152 | } |
153 | urb->status = 0; | 153 | urb->status = 0; |
154 | 154 | ||
155 | if (dev->adev.shutdown) | ||
156 | return; | ||
157 | |||
158 | status = usb_submit_urb(urb, GFP_ATOMIC); | 155 | status = usb_submit_urb(urb, GFP_ATOMIC); |
159 | if (status < 0) { | 156 | if (status < 0) { |
160 | em28xx_errdev("resubmit of audio urb failed (error=%i)\n", | 157 | em28xx_errdev("resubmit of audio urb failed (error=%i)\n", |
@@ -340,13 +337,6 @@ static int snd_em28xx_pcm_close(struct snd_pcm_substream *substream) | |||
340 | em28xx_audio_analog_set(dev); | 337 | em28xx_audio_analog_set(dev); |
341 | mutex_unlock(&dev->lock); | 338 | mutex_unlock(&dev->lock); |
342 | 339 | ||
343 | if (dev->adev.users == 0 && dev->adev.shutdown == 1) { | ||
344 | dprintk("audio users: %d\n", dev->adev.users); | ||
345 | dprintk("disabling audio stream!\n"); | ||
346 | dev->adev.shutdown = 0; | ||
347 | dprintk("released lock\n"); | ||
348 | em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); | ||
349 | } | ||
350 | return 0; | 340 | return 0; |
351 | } | 341 | } |
352 | 342 | ||
@@ -399,7 +389,7 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, | |||
399 | em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 1); | 389 | em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 1); |
400 | return 0; | 390 | return 0; |
401 | case SNDRV_PCM_TRIGGER_STOP: | 391 | case SNDRV_PCM_TRIGGER_STOP: |
402 | dev->adev.shutdown = 1; | 392 | em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); |
403 | return 0; | 393 | return 0; |
404 | default: | 394 | default: |
405 | return -EINVAL; | 395 | return -EINVAL; |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 3d94afb55b56..11f0db650261 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -423,7 +423,7 @@ struct em28xx_audio { | |||
423 | unsigned int hwptr_done_capture; | 423 | unsigned int hwptr_done_capture; |
424 | struct snd_card *sndcard; | 424 | struct snd_card *sndcard; |
425 | 425 | ||
426 | int users, shutdown; | 426 | int users; |
427 | enum em28xx_stream_state capture_stream; | 427 | enum em28xx_stream_state capture_stream; |
428 | spinlock_t slock; | 428 | spinlock_t slock; |
429 | }; | 429 | }; |