Commit cd887a7b authored by Maarten Zanders's avatar Maarten Zanders Committed by Mark Brown

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: default avatarMaarten Zanders <maarten.zanders@mind.be>
Link: https://lore.kernel.org/r/20221028152626.109603-3-maarten.zanders@mind.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent dffa0df6
...@@ -662,6 +662,7 @@ static int adau1372_hw_params(struct snd_pcm_substream *substream, ...@@ -662,6 +662,7 @@ static int adau1372_hw_params(struct snd_pcm_substream *substream,
case 16: case 16:
sai1 = ADAU1372_SAI1_BCLKRATE; sai1 = ADAU1372_SAI1_BCLKRATE;
break; break;
case 24:
case 32: case 32:
sai1 = 0; sai1 = 0;
break; break;
...@@ -699,6 +700,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, ...@@ -699,6 +700,7 @@ static int adau1372_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
case 16: case 16:
sai1 = ADAU1372_SAI1_BCLK_TDMC; sai1 = ADAU1372_SAI1_BCLK_TDMC;
break; break;
case 24:
case 32: case 32:
sai1 = 0; sai1 = 0;
break; break;
...@@ -869,7 +871,9 @@ static const struct snd_soc_dai_ops adau1372_dai_ops = { ...@@ -869,7 +871,9 @@ static const struct snd_soc_dai_ops adau1372_dai_ops = {
.startup = adau1372_startup, .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 = { static struct snd_soc_dai_driver adau1372_dai_driver = {
.name = "adau1372", .name = "adau1372",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment