[PATCH] ASoC: adau7118: Allow dsp_a mode

From: Michael Sikora
Date: Fri Apr 11 2025 - 03:50:33 EST


TDM mode on the adau7118 is dsp_a compatible. Set SPT_SAI_MODE on the
SPT_CTRL1 register to 1 for TDM mode when the DAI is operating in
dsp_a mode.

Signed-off-by: Michael Sikora <michael.sikora@xxxxxxxx>
---
sound/soc/codecs/adau7118.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/sound/soc/codecs/adau7118.c b/sound/soc/codecs/adau7118.c
index abc4764697a5..14259807c872 100644
--- a/sound/soc/codecs/adau7118.c
+++ b/sound/soc/codecs/adau7118.c
@@ -169,6 +169,12 @@ static int adau7118_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
case SND_SOC_DAIFMT_RIGHT_J:
st->right_j = true;
break;
+ case SND_SOC_DAIFMT_DSP_A:
+ ret = snd_soc_component_update_bits(dai->component,
+ ADAU7118_REG_SPT_CTRL1,
+ ADAU7118_DATA_FMT_MASK,
+ ADAU7118_DATA_FMT(1));
+ break;
default:
dev_err(st->dev, "Invalid format %d",
fmt & SND_SOC_DAIFMT_FORMAT_MASK);

---
base-commit: 5751a1448babcf892161b4496d6b3da11a0862ec
change-id: 20250325-adau7118-dsp-a-e26e1dfc2b8f

Best regards,
--
Michael Sikora <michael.sikora@xxxxxxxx>