diff mbox series

[11/11] ASoC: jz4740-i2s: Support continuous sample rate

Message ID 20220706211330.120198-12-aidanmacdonald.0x0@gmail.com (mailing list archive)
State Superseded
Headers show
Series ASoC: cleanups and improvements for jz4740-i2s | expand

Commit Message

Aidan MacDonald July 6, 2022, 9:13 p.m. UTC
The I2S controller on JZ47xx SoCs doesn't impose restrictions on
sample rate and the driver doesn't make any assumptions about it,
so the DAI should advertise a continuous sample rate range.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 sound/soc/jz4740/jz4740-i2s.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Paul Cercueil July 7, 2022, 9:53 a.m. UTC | #1
Le mer., juil. 6 2022 at 22:13:30 +0100, Aidan MacDonald 
<aidanmacdonald.0x0@gmail.com> a écrit :
> The I2S controller on JZ47xx SoCs doesn't impose restrictions on
> sample rate and the driver doesn't make any assumptions about it,
> so the DAI should advertise a continuous sample rate range.
> 
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
>  sound/soc/jz4740/jz4740-i2s.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/jz4740/jz4740-i2s.c 
> b/sound/soc/jz4740/jz4740-i2s.c
> index ee99c5e781ec..053697c7f19e 100644
> --- a/sound/soc/jz4740/jz4740-i2s.c
> +++ b/sound/soc/jz4740/jz4740-i2s.c
> @@ -378,13 +378,13 @@ static struct snd_soc_dai_driver jz4740_i2s_dai 
> = {
>  	.playback = {
>  		.channels_min = 1,
>  		.channels_max = 2,
> -		.rates = SNDRV_PCM_RATE_8000_48000,
> +		.rates = SNDRV_PCM_RATE_CONTINUOUS,
>  		.formats = JZ4740_I2S_FMTS,
>  	},
>  	.capture = {
>  		.channels_min = 2,
>  		.channels_max = 2,
> -		.rates = SNDRV_PCM_RATE_8000_48000,
> +		.rates = SNDRV_PCM_RATE_CONTINUOUS,
>  		.formats = JZ4740_I2S_FMTS,
>  	},
>  	.symmetric_rate = 1,
> @@ -415,13 +415,13 @@ static struct snd_soc_dai_driver jz4770_i2s_dai 
> = {
>  	.playback = {
>  		.channels_min = 1,
>  		.channels_max = 2,
> -		.rates = SNDRV_PCM_RATE_8000_48000,
> +		.rates = SNDRV_PCM_RATE_CONTINUOUS,
>  		.formats = JZ4740_I2S_FMTS,
>  	},
>  	.capture = {
>  		.channels_min = 2,
>  		.channels_max = 2,
> -		.rates = SNDRV_PCM_RATE_8000_48000,
> +		.rates = SNDRV_PCM_RATE_CONTINUOUS,
>  		.formats = JZ4740_I2S_FMTS,
>  	},
>  	.ops = &jz4740_i2s_dai_ops,
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index ee99c5e781ec..053697c7f19e 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -378,13 +378,13 @@  static struct snd_soc_dai_driver jz4740_i2s_dai = {
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 2,
-		.rates = SNDRV_PCM_RATE_8000_48000,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
 		.formats = JZ4740_I2S_FMTS,
 	},
 	.capture = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates = SNDRV_PCM_RATE_8000_48000,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
 		.formats = JZ4740_I2S_FMTS,
 	},
 	.symmetric_rate = 1,
@@ -415,13 +415,13 @@  static struct snd_soc_dai_driver jz4770_i2s_dai = {
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 2,
-		.rates = SNDRV_PCM_RATE_8000_48000,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
 		.formats = JZ4740_I2S_FMTS,
 	},
 	.capture = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates = SNDRV_PCM_RATE_8000_48000,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
 		.formats = JZ4740_I2S_FMTS,
 	},
 	.ops = &jz4740_i2s_dai_ops,