From: Olivier Moysan Date: Mon, 6 May 2019 12:54:11 +0000 (+0200) Subject: ASoC: stm32: i2s: update pcm hardware constraints X-Git-Tag: v5.15~6087^2~8^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fc19fffaaf87335aafaeb059a561ef91aa6031c;p=platform%2Fkernel%2Flinux-starfive.git ASoC: stm32: i2s: update pcm hardware constraints - Set period minimum size. Ensure at least 5ms period up to 48kHz/16 bits to prevent underrun/overrun. - Remove MDMA constraints on period maximum size and set period maximum to half the buffer maximum size. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown --- diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index 97d5e99..8ee697f 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -731,7 +731,8 @@ static const struct snd_soc_dai_ops stm32_i2s_pcm_dai_ops = { static const struct snd_pcm_hardware stm32_i2s_pcm_hw = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP, .buffer_bytes_max = 8 * PAGE_SIZE, - .period_bytes_max = 2048, + .period_bytes_min = 1024, + .period_bytes_max = 4 * PAGE_SIZE, .periods_min = 2, .periods_max = 8, };