In this we can make sure that applications will figure out the correct combination of period size and buffer size.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- sound/soc/omap/omap-abe-mmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/omap/omap-abe-mmap.c b/sound/soc/omap/omap-abe-mmap.c index e5654c9..0aea7ec 100644 --- a/sound/soc/omap/omap-abe-mmap.c +++ b/sound/soc/omap/omap-abe-mmap.c @@ -122,7 +122,7 @@ static int aess_open(struct snd_pcm_substream *substream) break; default: /* - * Period size must be aligned with the Audio Engine + * Period and buffer size must be aligned with the Audio Engine * processing loop which is 250 us long */ ret = snd_pcm_hw_rule_add(substream->runtime, 0, @@ -130,6 +130,11 @@ static int aess_open(struct snd_pcm_substream *substream) omap_abe_hwrule_size_step, NULL, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1); + ret = snd_pcm_hw_rule_add(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, + omap_abe_hwrule_size_step, + NULL, + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1); break; }