On 09/12/2024 9:52 am, Charles Keepax wrote:
On Mon, Dec 09, 2024 at 07:38:52AM +0000, Kuninori Morimoto wrote:
Hi Mark
snd_soc_dai_set_tristate() has added in v2.6.27 (2008/Oct) by this commit
8c6529dbf881303920a415c2d14a500218661949 ("ALSA: asoc: core - add Digital Audio Interface (DAI) control functions.")
But it has never been used during this 16 years. Let's remove it.
We have definitely used it in out of tree code for some phones in our times. Whilst I don't feel super strongly, I would say it seems like fairly reasonable functionality and it does no harm, so I would vote to keep it.
Thanks, Charles
Yes, I'd forgotten that this function even existed. Now I've been reminded of it, it's a useful function because our I2S/TDM DAIs have configurable tri-stating. If we remove the function the alternative of using a pinmux driver is a lot of overhead.
But the kerneldoc description is not very good:
"Tristates the DAI so that others can use it."
That makes it sound like it disables the DAI. Should it say "Set the DAI TX pin to be hi-impedance in TDM slots where it is not transmitting"?