summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index b9c5cf7dc84..4878f306778 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -222,7 +222,8 @@ static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id)
if (report & SAA7134_IRQ_REPORT_DONE_RA3) {
handled = 1;
- saa_writel(SAA7134_IRQ_REPORT,report);
+ saa_writel(SAA7134_IRQ_REPORT,
+ SAA7134_IRQ_REPORT_DONE_RA3);
saa7134_irq_alsa_done(dev, status);
} else {
goto out;
@@ -457,7 +458,7 @@ static struct snd_pcm_hardware snd_card_saa7134_capture =
.buffer_bytes_max = (256*1024),
.period_bytes_min = 64,
.period_bytes_max = (256*1024),
- .periods_min = 2,
+ .periods_min = 4,
.periods_max = 1024,
};
@@ -491,7 +492,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
snd_assert(period_size >= 0x100 && period_size <= 0x10000,
return -EINVAL);
- snd_assert(periods >= 2, return -EINVAL);
+ snd_assert(periods >= 4, return -EINVAL);
snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL);
dev = saa7134->dev;
@@ -647,7 +648,14 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
saa7134_tvaudio_setmute(dev);
}
- if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+ err = snd_pcm_hw_constraint_integer(runtime,
+ SNDRV_PCM_HW_PARAM_PERIODS);
+ if (err < 0)
+ return err;
+
+ err = snd_pcm_hw_constraint_step(runtime, 0,
+ SNDRV_PCM_HW_PARAM_PERIODS, 2);
+ if (err < 0)
return err;
return 0;