ASoC: codecs: es8316: Add support for S24_3LE format

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>
This commit is contained in:
Cezary Rojewski 2023-06-29 13:24:43 +02:00 committed by Mark Brown
parent be7dc10ab0
commit c30d10aeb3
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 0 deletions

View 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;