aboutsummaryrefslogtreecommitdiffstats
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 b9c5cf7dc849..4878f3067787 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)
222 222
223 if (report & SAA7134_IRQ_REPORT_DONE_RA3) { 223 if (report & SAA7134_IRQ_REPORT_DONE_RA3) {
224 handled = 1; 224 handled = 1;
225 saa_writel(SAA7134_IRQ_REPORT,report); 225 saa_writel(SAA7134_IRQ_REPORT,
226 SAA7134_IRQ_REPORT_DONE_RA3);
226 saa7134_irq_alsa_done(dev, status); 227 saa7134_irq_alsa_done(dev, status);
227 } else { 228 } else {
228 goto out; 229 goto out;
@@ -457,7 +458,7 @@ static struct snd_pcm_hardware snd_card_saa7134_capture =
457 .buffer_bytes_max = (256*1024), 458 .buffer_bytes_max = (256*1024),
458 .period_bytes_min = 64, 459 .period_bytes_min = 64,
459 .period_bytes_max = (256*1024), 460 .period_bytes_max = (256*1024),
460 .periods_min = 2, 461 .periods_min = 4,
461 .periods_max = 1024, 462 .periods_max = 1024,
462}; 463};
463 464
@@ -491,7 +492,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
491 492
492 snd_assert(period_size >= 0x100 && period_size <= 0x10000, 493 snd_assert(period_size >= 0x100 && period_size <= 0x10000,
493 return -EINVAL); 494 return -EINVAL);
494 snd_assert(periods >= 2, return -EINVAL); 495 snd_assert(periods >= 4, return -EINVAL);
495 snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL); 496 snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL);
496 497
497 dev = saa7134->dev; 498 dev = saa7134->dev;
@@ -647,7 +648,14 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
647 saa7134_tvaudio_setmute(dev); 648 saa7134_tvaudio_setmute(dev);
648 } 649 }
649 650
650 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 651 err = snd_pcm_hw_constraint_integer(runtime,
652 SNDRV_PCM_HW_PARAM_PERIODS);
653 if (err < 0)
654 return err;
655
656 err = snd_pcm_hw_constraint_step(runtime, 0,
657 SNDRV_PCM_HW_PARAM_PERIODS, 2);
658 if (err < 0)
651 return err; 659 return err;
652 660
653 return 0; 661 return 0;