Commit ba35ca07 authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx-audio: make sure audio is unmuted on open()

In all cases, when the first capture is called, we need to
call the code that unmutes the volume.
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 22a5ea91
...@@ -273,26 +273,28 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) ...@@ -273,26 +273,28 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream)
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
runtime->hw = snd_em28xx_hw_capture; runtime->hw = snd_em28xx_hw_capture;
if ((dev->alt == 0 || dev->is_audio_only) && dev->adev.users == 0) {
if (dev->adev.users == 0) {
if (dev->alt == 0 || dev->is_audio_only) {
if (dev->is_audio_only) if (dev->is_audio_only)
/* vendor audio is on a separate interface */ /* audio is on a separate interface */
dev->alt = 1; dev->alt = 1;
else else
/* vendor audio is on the same interface as video */ /* audio is on the same interface as video */
dev->alt = 7; dev->alt = 7;
/* /*
* FIXME: The intention seems to be to select the alt * FIXME: The intention seems to be to select
* setting with the largest wMaxPacketSize for the video * the alt setting with the largest
* endpoint. * wMaxPacketSize for the video endpoint.
* At least dev->alt should be used instead, but we * At least dev->alt should be used instead, but
* should probably not touch it at all if it is * we should probably not touch it at all if it
* already >0, because wMaxPacketSize of the audio * is already >0, because wMaxPacketSize of the
* endpoints seems to be the same for all. * audio endpoints seems to be the same for all.
*/ */
dprintk("changing alternate number on interface %d to %d\n", dprintk("changing alternate number on interface %d to %d\n",
dev->ifnum, dev->alt); dev->ifnum, dev->alt);
usb_set_interface(dev->udev, dev->ifnum, dev->alt); usb_set_interface(dev->udev, dev->ifnum, dev->alt);
}
/* Sets volume, mute, etc */ /* Sets volume, mute, etc */
dev->mute = 0; dev->mute = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment