Re: [PATCH 1/1] ASoC: codecs: max98090: Allow dsp_a mode

From: Maxim Kochetkov
Date: Thu Jun 22 2023 - 02:30:25 EST




On 21.06.2023 23:46, Mark Brown wrote:
Ok. How about that:
---
sound/soc/codecs/max98090.c | 52 ++++++++++++++++++++-----------------
sound/soc/codecs/max98090.h | 2 ++
2 files changed, 30 insertions(+), 24 deletions(-)

That looks plausible, yes.

I do note that the driver ignores tdm_width (and the entire TDM
configuration) when configuring BCLK, I guess it only works in clock
consumer mode for TDM? If that's the case there should really be some
validation, and there should probably be a check for slot width being 16
since that looks like the only thing supported. Those were already
broken though.

Yep, tdm_width is not used in the driver and I can drop it. We already have slot_width validation in set_tdm_slot(), so only 16 is allowed. I didn't check/use clock provider mode. But it looks fine for me. set_fmt() just sets frame width here: 32 - by default, 48/64 - 3/4 slots if configured. We also check slots count in set_tdm_slots(). It will work for I2S/TDM.