ASoC: rockchip: i2s-tdm: 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 <sugar.zhang@rock-chips.com>
Change-Id: I4811ca8ea63ed72da8cd06e9e8bbd5f450683165
This commit is contained in:
Sugar Zhang
2024-12-24 11:42:39 +08:00
committed by Tao Huang
parent 8ecc26a8a9
commit 6c5d0a72ce

View File

@@ -2807,7 +2807,7 @@ static int rockchip_i2s_tdm_init_dai(struct rk_i2s_tdm_dev *i2s_tdm)
dai->playback.stream_name = "Playback";
dai->playback.channels_min = 2;
dai->playback.channels_max = 64;
dai->playback.rates = SNDRV_PCM_RATE_8000_192000;
dai->playback.rates = SNDRV_PCM_RATE_CONTINUOUS;
dai->playback.formats = formats;
}
@@ -2815,7 +2815,7 @@ static int rockchip_i2s_tdm_init_dai(struct rk_i2s_tdm_dev *i2s_tdm)
dai->capture.stream_name = "Capture";
dai->capture.channels_min = 2;
dai->capture.channels_max = 64;
dai->capture.rates = SNDRV_PCM_RATE_8000_192000;
dai->capture.rates = SNDRV_PCM_RATE_CONTINUOUS;
dai->capture.formats = formats;
}