Skip to content

Commit

Permalink
V4L/DVB (4613): Unmute/mute saa7134 when opening/closing the audio ca…
Browse files Browse the repository at this point in the history
…pture device.

This patch should enable unmuting the audio device when opening it (and
posterior muting when closing it), doing away with the need for unmute ioctls
or v4lctl usage.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Ricardo Cerqueira authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent c8cd2ad commit dafcaaf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/video/saa7134/saa7134-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)

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);
return 0;
}

Expand Down Expand Up @@ -631,6 +636,9 @@ 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 ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
return err;

Expand Down

0 comments on commit dafcaaf

Please sign in to comment.