Re: [PATCH 1/2] ASoC: fsl: fsl_ssi: add ac97 fixed mode support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Maciej,

I remember that the AC'97 mode in SSI was riddled with bugs to a level of
being barely usable.

True.

After exhausting work we managed to get it stable enough to be ready for "production". One of improvements was the use of AC'97 fixed mode instead of variable mode. Other improvements to fsl_ssi by us might follow in the future, but at the moment I don't think those are ready for "mainline".

Not only the channel slots would enable on their own, but the CODEC
registers got randomly trashed from time to time (I think a register
would get zeroed spontaneously).

Yes, we also encountered those issues. For this we use special thread in a loop to check the state of AC'97 registers. We store known good values and check for discrepancies while audio is running. Once discrepancy is found, we immediately recover the register value with the previous good value. Downside of this approach is that audio might be down for a period of thread loop and that's why we keep it tight at 1 Hz.

BR,
Primoz


On 5. 10. 20 15:51, Maciej S. Szmigiero wrote:
On 05.10.2020 14:59, Primoz Fiser wrote:
Hi Mark,

On 5. 10. 20 13:49, Mark Brown wrote:
On Mon, Oct 05, 2020 at 01:16:43PM +0200, Primoz Fiser wrote:

bits. But in summary, when SSI operates in AC'97 variable mode of
operation, CODECs can sometimes send SLOTREQ bits for non-existent audio
slots which then "stick" in SSI and completely break audio output.

If this is something that happens based on the CODEC shouldn't we be
doing this by quirking based on the CODEC the system has rather than
requiring people set a separate DT property?


To be totally honest, we are not 100% sure if this is only CODEC's fault or something else might be causing these issues.

For example, it could be some EMI/noise that causes SLOTREQ bits to flip spuriously. Or it could even be the buggy SSI itself (taking into account all the issues with channel slipping, slot filtering, AC'97 reg reading/writing, etc)?

We are just referencing commit 01ca485171e3 ("ASoC: fsl_ssi: only enable proper channel slots in AC'97 mode"), as we saw that UDOO board had the same problems. I added commit author to CC.

We were able to overcome those by programming SSI in AC'97 fixed mode which driver up to now completely ignored (it was using only AC'97 variable mode).

Additionally, we are using WM9712 codec and UDOO board is using VT1613, right? So these issues might not be CODEC related at all.

I remember that the AC'97 mode in SSI was riddled with bugs to a level of
being barely usable.

Not only the channel slots would enable on their own, but the CODEC
registers got randomly trashed from time to time (I think a register
would get zeroed spontaneously).

This happened even if an external CODEC, different than the boards
VT1613, was connected.
So these were definitely SSI problems, not CODEC ones.

That's why probably pretty much every board other than UDOO uses SSI
in the I²S mode.

Maciej




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux