diff options
author | Maarten Zanders <maarten.zanders@mind.be> | 2022-10-28 17:26:24 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-11-25 19:31:54 +0000 |
commit | cd887a7ba74c8378ae8b52afa04adb0d49cdf13d (patch) | |
tree | 6d63ec74253e4311ea97c6cddf55aa4b174b2ea4 /sound/soc/codecs/adau1372.c | |
parent | dffa0df699d7c20f447e6bd797666366c6bae4b3 (diff) | |
download | lwn-cd887a7ba74c8378ae8b52afa04adb0d49cdf13d.tar.gz lwn-cd887a7ba74c8378ae8b52afa04adb0d49cdf13d.zip |
ASoC: adau1372: add support for S24_LE mode
The ADAU1372 contains 24bit ADCs and DACs. Allow the driver to use
its native mode which uses the same settings as the current 32 bit
mode.
Signed-off-by: Maarten Zanders <maarten.zanders@mind.be>
Link: https://lore.kernel.org/r/20221028152626.109603-3-maarten.zanders@mind.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau1372.c')
-rw-r--r-- | sound/soc/codecs/adau1372.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c index a42fae183cac..c5e0f10e6982 100644 --- a/sound/soc/codecs/adau1372.c +++ b/sound/soc/codecs/adau1372.c @@ -662,6 +662,7 @@ static int adau1372_hw_params(struct snd_pcm_substream *substream, case 16: sai1 = ADAU1372_SAI1_BCLKRATE; break; + case 24: case 32: sai1 = 0; break; @@ -699,6 +700,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, case 16: sai1 = ADAU1372_SAI1_BCLK_TDMC; break; + case 24: case 32: sai1 = 0; break; @@ -869,7 +871,9 @@ static const struct snd_soc_dai_ops adau1372_dai_ops = { .startup = adau1372_startup, }; -#define ADAU1372_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE) +#define ADAU1372_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S24_LE | \ + SNDRV_PCM_FMTBIT_S32_LE) static struct snd_soc_dai_driver adau1372_dai_driver = { .name = "adau1372", |