ASoC: meson: axg-fifo: take continuous rates
authorJerome Brunet <jbrunet@baylibre.com>
Fri, 23 Feb 2024 17:51:11 +0000 (18:51 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 26 Feb 2024 14:03:17 +0000 (14:03 +0000)
The rate of the stream does not matter for the fifos of the axg family.
Fifos will just push or pull data to/from the DDR according to consumption
or production of the downstream element, which is the DPCM backend.

Drop the rate list and allow continuous rates. The lower and upper rate are
set according what is known to work with the different backends

This allows the PDM input backend to also use continuous rates.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://msgid.link/r/20240223175116.2005407-6-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/meson/axg-fifo.h
sound/soc/meson/axg-frddr.c
sound/soc/meson/axg-toddr.c

index df528e8..a14c31e 100644 (file)
@@ -21,8 +21,6 @@ struct snd_soc_dai_driver;
 struct snd_soc_pcm_runtime;
 
 #define AXG_FIFO_CH_MAX                        128
-#define AXG_FIFO_RATES                 (SNDRV_PCM_RATE_5512 |          \
-                                        SNDRV_PCM_RATE_8000_384000)
 #define AXG_FIFO_FORMATS               (SNDRV_PCM_FMTBIT_S8 |          \
                                         SNDRV_PCM_FMTBIT_S16_LE |      \
                                         SNDRV_PCM_FMTBIT_S20_LE |      \
index 8c166a5..98140f4 100644 (file)
@@ -109,7 +109,9 @@ static struct snd_soc_dai_driver axg_frddr_dai_drv = {
                .stream_name    = "Playback",
                .channels_min   = 1,
                .channels_max   = AXG_FIFO_CH_MAX,
-               .rates          = AXG_FIFO_RATES,
+               .rates          = SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min       = 5515,
+               .rate_max       = 384000,
                .formats        = AXG_FIFO_FORMATS,
        },
        .ops            = &axg_frddr_ops,
@@ -184,7 +186,9 @@ static struct snd_soc_dai_driver g12a_frddr_dai_drv = {
                .stream_name    = "Playback",
                .channels_min   = 1,
                .channels_max   = AXG_FIFO_CH_MAX,
-               .rates          = AXG_FIFO_RATES,
+               .rates          = SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min       = 5515,
+               .rate_max       = 384000,
                .formats        = AXG_FIFO_FORMATS,
        },
        .ops            = &g12a_frddr_ops,
index 1a0be17..32ee45c 100644 (file)
@@ -131,7 +131,9 @@ static struct snd_soc_dai_driver axg_toddr_dai_drv = {
                .stream_name    = "Capture",
                .channels_min   = 1,
                .channels_max   = AXG_FIFO_CH_MAX,
-               .rates          = AXG_FIFO_RATES,
+               .rates          = SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min       = 5515,
+               .rate_max       = 384000,
                .formats        = AXG_FIFO_FORMATS,
        },
        .ops            = &axg_toddr_ops,
@@ -226,7 +228,9 @@ static struct snd_soc_dai_driver g12a_toddr_dai_drv = {
                .stream_name    = "Capture",
                .channels_min   = 1,
                .channels_max   = AXG_FIFO_CH_MAX,
-               .rates          = AXG_FIFO_RATES,
+               .rates          = SNDRV_PCM_RATE_CONTINUOUS,
+               .rate_min       = 5515,
+               .rate_max       = 384000,
                .formats        = AXG_FIFO_FORMATS,
        },
        .ops            = &g12a_toddr_ops,