diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-06-20 05:36:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-06-20 05:36:26 -0300 |
commit | bfa0b519e11de46cb9f89c55924d1c4ecec0b9bb (patch) | |
tree | 802bb2c6acbabd283cc601faa57e2d6675df6ab1 /linux/drivers | |
parent | 4eb13325ec2fde1a2c4516c2fbb4a33f5b9162f2 (diff) | |
download | mediapointer-dvb-s2-bfa0b519e11de46cb9f89c55924d1c4ecec0b9bb.tar.gz mediapointer-dvb-s2-bfa0b519e11de46cb9f89c55924d1c4ecec0b9bb.tar.bz2 |
Alsa fix for SAA7134 based "KNC One TV-Station DVR" card
From: RafaĆ Bilski <rafalbilski@interia.pl>
Sound recording doesn't work for this card because ACNI and ACPF
are not set before snd_card_saa7134_capture_prepare(). As a result
timeout occurs. These registers aren't poked because thread
never gets wake up signal. ACNI initialization is done in the
thread.
Sound is muted when capture stops. Shouldn't be because it may
be used during TV playback.
Signed-off-by: Rafal Bilski <rafalbilski@interia.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 6b8e0e1f0..ec3844e29 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -87,7 +87,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; @@ -661,8 +662,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; } @@ -717,8 +720,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; diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index aa0082d99..12ce44738 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -401,7 +401,7 @@ struct saa7134_board saa7134_boards[] = { .inputs = {{ .name = name_tv, .vmux = 1, - .amux = LINE2, + .amux = TV, .tv = 1, .gpio = 0x20000, },{ |