ASoC: codecs: es8316: Add support for S24_3LE format
authorCezary Rojewski <cezary.rojewski@intel.com>
Thu, 29 Jun 2023 11:24:43 +0000 (13:24 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 9 Jul 2023 21:47:18 +0000 (22:47 +0100)
Codec supports words that are 16/18/20/24/32 bits long. In case of 24,
it should be treated as 24/24 not 24/32 i.e.: 24 valid bit-depth in 24
bit-depth container.

For compatibility reasons, S24_LE is left as is.

Cc: Zhu Ning <zhuning@everest-semi.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20230629112449.1755928-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/es8316.c

index 5d1fd50..7e5eb13 100644 (file)
@@ -494,6 +494,7 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
                bclk_divider /= 20;
                break;
        case SNDRV_PCM_FORMAT_S24_LE:
+       case SNDRV_PCM_FORMAT_S24_3LE:
                wordlen = ES8316_SERDATA2_LEN_24;
                bclk_divider /= 24;
                break;