diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index ffb0f647a86..3c0fc9027ad 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -75,7 +75,8 @@ typedef struct snd_card_saa7134 { struct saa7134_dev *dev; unsigned long iobase; - int irq; + s16 irq; + u16 mute_was_on; spinlock_t lock; } snd_card_saa7134_t; @@ -589,8 +590,10 @@ static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev = saa7134->dev; - dev->ctl_mute = 1; - saa7134_tvaudio_setmute(dev); + if (saa7134->mute_was_on) { + dev->ctl_mute = 1; + saa7134_tvaudio_setmute(dev); + } return 0; } @@ -637,8 +640,11 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) runtime->private_free = snd_card_saa7134_runtime_free; runtime->hw = snd_card_saa7134_capture; - dev->ctl_mute = 0; - saa7134_tvaudio_setmute(dev); + if (dev->ctl_mute != 0) { + saa7134->mute_was_on = 1; + dev->ctl_mute = 0; + saa7134_tvaudio_setmute(dev); + } if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) return err; |