diff mbox series

ASoC: pcm3168a: Fix serial mode dependent format support

Message ID 20191015085240.21887-1-peter.ujfalusi@ti.com (mailing list archive)
State New, archived
Headers show
Series ASoC: pcm3168a: Fix serial mode dependent format support | expand

Commit Message

Peter Ujfalusi Oct. 15, 2019, 8:52 a.m. UTC
fmt 0 is perfectly valid (PCM3168A_FMT_I2S). Remove the return in case
fmt == 0.

Fixes: ("ASoC: pcm3168a: Use fixup instead of constraint for channels and formats")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/codecs/pcm3168a.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Peter Ujfalusi Oct. 15, 2019, 8:58 a.m. UTC | #1
On 15/10/2019 11.52, Peter Ujfalusi wrote:
> fmt 0 is perfectly valid (PCM3168A_FMT_I2S). Remove the return in case
> fmt == 0.
> 
> Fixes: ("ASoC: pcm3168a: Use fixup instead of constraint for channels and formats")
> Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  sound/soc/codecs/pcm3168a.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
> index 708dac27feff..df8395b361d4 100644
> --- a/sound/soc/codecs/pcm3168a.c
> +++ b/sound/soc/codecs/pcm3168a.c
> @@ -322,8 +322,6 @@ static void pcm3168a_update_fixup_pcm_stream(struct snd_soc_dai *dai)
>  	u64 formats = SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE;
>  	unsigned int channel_max = dai->id == PCM3168A_DAI_DAC ? 8 : 6;
>  
> -	if (!pcm3168a->io_params[dai->id].fmt)
> -		return;
>  

I should be removing one blank line as well. Just a sec, I'll send v2.

>  	if (pcm3168a->io_params[dai->id].fmt == PCM3168A_FMT_RIGHT_J) {
>  		/* S16_LE is only supported in RIGHT_J mode */
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
diff mbox series

Patch

diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 708dac27feff..df8395b361d4 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -322,8 +322,6 @@  static void pcm3168a_update_fixup_pcm_stream(struct snd_soc_dai *dai)
 	u64 formats = SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE;
 	unsigned int channel_max = dai->id == PCM3168A_DAI_DAC ? 8 : 6;
 
-	if (!pcm3168a->io_params[dai->id].fmt)
-		return;
 
 	if (pcm3168a->io_params[dai->id].fmt == PCM3168A_FMT_RIGHT_J) {
 		/* S16_LE is only supported in RIGHT_J mode */