From: Shine Liu Date: Thu, 20 Aug 2009 15:02:23 +0000 (+0800) Subject: ASoC: S3C24XX : Align the peroid size to the buffer size X-Git-Tag: v2.6.33-rc3~4^2~184 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f61c890ec631884c5b7cd8723cd8ae1917dca544;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index eecfa5e..8a93196 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) pr_debug("Entered %s\n", __func__); + snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); prtd = kzalloc(sizeof(struct s3c24xx_runtime_data), GFP_KERNEL);