From 8ecc26a8a911eeab3ae7286c4a97d367b1e97c09 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Tue, 24 Dec 2024 11:41:59 +0800 Subject: [PATCH] ASoC: rockchip: i2s: 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: Ieeea4f9ae414f2fa6475fa5f6559162e15c688c9 --- sound/soc/rockchip/rockchip_i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 452f713ea7ad..c7ec42d74880 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -1054,7 +1054,7 @@ static int rockchip_i2s_init_dai(struct rk_i2s_dev *i2s, struct resource *res, dai->playback.stream_name = "Playback"; dai->playback.channels_min = 2; dai->playback.channels_max = 8; - dai->playback.rates = SNDRV_PCM_RATE_8000_192000; + dai->playback.rates = SNDRV_PCM_RATE_CONTINUOUS; dai->playback.formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | @@ -1076,7 +1076,7 @@ static int rockchip_i2s_init_dai(struct rk_i2s_dev *i2s, struct resource *res, dai->capture.stream_name = "Capture"; dai->capture.channels_min = 2; dai->capture.channels_max = 8; - dai->capture.rates = SNDRV_PCM_RATE_8000_192000; + dai->capture.rates = SNDRV_PCM_RATE_CONTINUOUS; dai->capture.formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |