Commit aac0ca6a authored by Rafał Bilski's avatar Rafał Bilski Committed by Mauro Carvalho Chehab

V4L/DVB (5775): Alsa fix for SAA7134 based "KNC One TV-Station DVR" card

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: default avatarRafal Bilski <rafalbilski@interia.pl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 6d7930e0
...@@ -75,7 +75,8 @@ typedef struct snd_card_saa7134 { ...@@ -75,7 +75,8 @@ typedef struct snd_card_saa7134 {
struct saa7134_dev *dev; struct saa7134_dev *dev;
unsigned long iobase; unsigned long iobase;
int irq; s16 irq;
u16 mute_was_on;
spinlock_t lock; spinlock_t lock;
} snd_card_saa7134_t; } snd_card_saa7134_t;
...@@ -589,8 +590,10 @@ static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) ...@@ -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); snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
struct saa7134_dev *dev = saa7134->dev; struct saa7134_dev *dev = saa7134->dev;
if (saa7134->mute_was_on) {
dev->ctl_mute = 1; dev->ctl_mute = 1;
saa7134_tvaudio_setmute(dev); saa7134_tvaudio_setmute(dev);
}
return 0; return 0;
} }
...@@ -637,8 +640,11 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) ...@@ -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->private_free = snd_card_saa7134_runtime_free;
runtime->hw = snd_card_saa7134_capture; runtime->hw = snd_card_saa7134_capture;
if (dev->ctl_mute != 0) {
saa7134->mute_was_on = 1;
dev->ctl_mute = 0; dev->ctl_mute = 0;
saa7134_tvaudio_setmute(dev); saa7134_tvaudio_setmute(dev);
}
if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
return err; return err;
......
...@@ -400,7 +400,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -400,7 +400,7 @@ struct saa7134_board saa7134_boards[] = {
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = LINE2, .amux = TV,
.tv = 1, .tv = 1,
.gpio = 0x20000, .gpio = 0x20000,
},{ },{
......
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