Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: meson: axg-fifo: relax period size constraints

Now that the fifo depths and thresholds are properly in the axg-fifo
driver, we can relax the constraints on period. As long as the period is a
multiple of the fifo burst size (8 bytes) things should be OK.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20191218172420.1199117-5-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jerome Brunet and committed by
Mark Brown
42b5ac83 23b89e1d

+4 -6
+4 -4
sound/soc/meson/axg-fifo.c
··· 34 34 .rate_max = 192000, 35 35 .channels_min = 1, 36 36 .channels_max = AXG_FIFO_CH_MAX, 37 - .period_bytes_min = AXG_FIFO_MIN_DEPTH, 37 + .period_bytes_min = AXG_FIFO_BURST, 38 38 .period_bytes_max = UINT_MAX, 39 39 .periods_min = 2, 40 40 .periods_max = UINT_MAX, ··· 227 227 228 228 /* 229 229 * Make sure the buffer and period size are multiple of the FIFO 230 - * minimum depth size 230 + * burst 231 231 */ 232 232 ret = snd_pcm_hw_constraint_step(ss->runtime, 0, 233 233 SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 234 - AXG_FIFO_MIN_DEPTH); 234 + AXG_FIFO_BURST); 235 235 if (ret) 236 236 return ret; 237 237 238 238 ret = snd_pcm_hw_constraint_step(ss->runtime, 0, 239 239 SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 240 - AXG_FIFO_MIN_DEPTH); 240 + AXG_FIFO_BURST); 241 241 if (ret) 242 242 return ret; 243 243
-2
sound/soc/meson/axg-fifo.h
··· 31 31 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) 32 32 33 33 #define AXG_FIFO_BURST 8 34 - #define AXG_FIFO_MIN_CNT 64 35 - #define AXG_FIFO_MIN_DEPTH (AXG_FIFO_BURST * AXG_FIFO_MIN_CNT) 36 34 37 35 #define FIFO_INT_ADDR_FINISH BIT(0) 38 36 #define FIFO_INT_ADDR_INT BIT(1)