diff options
author | Shine Liu <shinel@foxmail.com> | 2009-08-20 11:02:23 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-20 14:42:40 -0400 |
commit | f61c890ec631884c5b7cd8723cd8ae1917dca544 (patch) | |
tree | 3dcb9b8fe6eb00eeaaa4edf2c54278128e351be4 /sound/soc/s3c24xx/s3c24xx-pcm.c | |
parent | f8bae4caaaf56c391f3e2380dd7105e765414178 (diff) |
ASoC: S3C24XX : Align the peroid size to the buffer size
> Then it's a driver bug. If unaligned period size is allowed, it means
> that the irq is really generated in that period, not at the buffer
> boundary. Otherwise, it must have a proper hw-constraint to align the
> period size to the buffer size.
This patch will fix the bug metioned in the above mail. Force the peroid
size to be aligned with the buffer size.
Based and tested on linux-2.6.31-rc6.
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx/s3c24xx-pcm.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx-pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index eecfa5eba06b..8a931964ce46 100644 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c | |||
@@ -318,6 +318,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream) | |||
318 | 318 | ||
319 | pr_debug("Entered %s\n", __func__); | 319 | pr_debug("Entered %s\n", __func__); |
320 | 320 | ||
321 | snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); | ||
321 | snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); | 322 | snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); |
322 | 323 | ||
323 | prtd = kzalloc(sizeof(struct s3c24xx_runtime_data), GFP_KERNEL); | 324 | prtd = kzalloc(sizeof(struct s3c24xx_runtime_data), GFP_KERNEL); |