* Enabling fsl_sai MCLK before codec probe
@ 2022-05-25 20:59 Michael Welling
2022-06-20 19:06 ` Michael Welling
0 siblings, 1 reply; 2+ messages in thread
From: Michael Welling @ 2022-05-25 20:59 UTC (permalink / raw)
To: alsa-devel; +Cc: Nicolin Chen, Liam Girdwood, Timur Tabi, Xiubo Li
So I have a tricky race condition that comes up with hardware that
combines imx8 with a pcm1681 codec. The pcm1681 requires that MCLK be
enabled for 65536 cycles before accessing the I2C management port.
The imx8 sai driver on the other hand does not start the built in MCLK
until a confluence of events that is not triggered until just before
streaming starts which is too late.
Is there a clean way to start the imx8 sai MCLK before the codec probe occurs?
Or have it started and delayed during the codec probe before it tries
to access i2c?
We have a working solution but it is a bit overreaching and adds a
callback function to the snd_soc_dai_ops struct to start the clock,
and adds the code to the fsl_sai.c to toggle the appropriate bits in
the SoC sai driver to make a clock appear and registers to the new
function callback.
Then the simple-card was amended to add the appropriate enabling
through the new callback such that the clock is on long enough before
the codec is probed.
There was some suggestion of caching the i2c registers until the clock
is enabled but this would be difficult given the clock is not started
until streaming starts and we don't want to stream until the codec is
initialized.
I am looking for a solution that is minimal and robust.
Any pointers would be greatly appreciated.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re: Enabling fsl_sai MCLK before codec probe
2022-05-25 20:59 Enabling fsl_sai MCLK before codec probe Michael Welling
@ 2022-06-20 19:06 ` Michael Welling
0 siblings, 0 replies; 2+ messages in thread
From: Michael Welling @ 2022-06-20 19:06 UTC (permalink / raw)
To: alsa-devel
Ping.
Any suggestions here?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-20 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25 20:59 Enabling fsl_sai MCLK before codec probe Michael Welling
2022-06-20 19:06 ` Michael Welling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox