From f13609833752c581c46ef77f9442d24eec354847 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Mon, 23 Dec 2024 09:58:42 +0800 Subject: [PATCH] ASoC: dummy-codec: Use SNDRV_PCM_RATE_CONTINUOUS Use SNDRV_PCM_RATE_CONTINUOUS to support continuous range sample rate, which can support any rate in range. e.g. 48048, 31000, 768000 SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a specific interval. Sample rates are only restricted by the capabilities of the clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of SNDRV_PCM_RATE_8000_384000. Signed-off-by: Sugar Zhang Change-Id: Iac49752b7919bc74ddcc89b53d34a6a5a96ea134 --- sound/soc/codecs/dummy-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/dummy-codec.c b/sound/soc/codecs/dummy-codec.c index 2cb3ae65d4f7..57b9e9937399 100644 --- a/sound/soc/codecs/dummy-codec.c +++ b/sound/soc/codecs/dummy-codec.c @@ -50,7 +50,7 @@ struct snd_soc_dai_driver dummy_dai = { .stream_name = "Dummy Playback", .channels_min = 1, .channels_max = 384, - .rates = SNDRV_PCM_RATE_8000_384000, + .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | @@ -61,7 +61,7 @@ struct snd_soc_dai_driver dummy_dai = { .stream_name = "Dummy Capture", .channels_min = 1, .channels_max = 384, - .rates = SNDRV_PCM_RATE_8000_384000, + .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |