Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74816
b: refs/heads/master
c: 174eb8e
h: refs/heads/master
v: v3
  • Loading branch information
Heikki Lindholm authored and Mauro Carvalho Chehab committed Dec 11, 2007
1 parent 2eb0e66 commit 59e1404
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78f3b0b672c79df9ffa55399a7d6fc4b173e9b4b
refs/heads/master: 174eb8e8cb1ec97904ddeaae54366a03789162ef
13 changes: 10 additions & 3 deletions trunk/drivers/media/video/saa7134/saa7134-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,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,
};

Expand Down Expand Up @@ -491,7 +491,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;
Expand Down Expand Up @@ -647,7 +647,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;
Expand Down

0 comments on commit 59e1404

Please sign in to comment.