From: Primoz Fiser <firstname.lastname@example.org> To: "Maciej S. Szmigiero" <email@example.com>, Mark Brown <firstname.lastname@example.org> Cc: email@example.com, firstname.lastname@example.org, Timur Tabi <email@example.com>, Xiubo Li <Xiubo.Lee@gmail.com>, Fabio Estevam <firstname.lastname@example.org>, Takashi Iwai <email@example.com>, Liam Girdwood <firstname.lastname@example.org>, Nicolin Chen <email@example.com>, Rob Herring <firstname.lastname@example.org>, Shengjiu Wang <email@example.com> Subject: Re: [PATCH 1/2] ASoC: fsl: fsl_ssi: add ac97 fixed mode support Date: Wed, 7 Oct 2020 09:01:45 +0200 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> 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 >
next prev parent reply other threads:[~2020-10-07 7:01 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-05 11:16 Primoz Fiser 2020-10-05 11:16 ` [PATCH 2/2] ASoC: dt-bindings: fsl: " Primoz Fiser 2020-10-05 11:35 ` Fabio Estevam 2020-10-06 21:52 ` Rob Herring 2020-10-07 6:49 ` Primoz Fiser 2020-10-05 11:34 ` [PATCH 1/2] ASoC: fsl: fsl_ssi: " Fabio Estevam 2020-10-05 11:49 ` Mark Brown 2020-10-05 12:59 ` Primoz Fiser 2020-10-05 13:51 ` Maciej S. Szmigiero 2020-10-07 7:01 ` Primoz Fiser [this message] 2020-10-05 22:03 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --cc=Xiubo.Lee@gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 1/2] ASoC: fsl: fsl_ssi: add ac97 fixed mode support' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).