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 <sugar.zhang@rock-chips.com>
Change-Id: Iac49752b7919bc74ddcc89b53d34a6a5a96ea134
This commit is contained in:
Sugar Zhang
2024-12-23 09:58:42 +08:00
committed by Tao Huang
parent 1b3b835a3d
commit f136098337

View File

@@ -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 |