<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 6, 2023 at 4:47 PM Andreas Henriksson <<a href="mailto:andreas@fatal.se">andreas@fatal.se</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Shengjiu, Fabio,<br>
<br>
On Thu, May 19, 2022 at 10:23:06AM -0300, Fabio Estevam wrote:<br>
> Hi Shengjiu,<br>
> <br>
> On Thu, May 19, 2022 at 9:49 AM Shengjiu Wang <<a href="mailto:shengjiu.wang@nxp.com" target="_blank">shengjiu.wang@nxp.com</a>> wrote:<br>
> <br>
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c<br>
> > index fa950dde5310..dae16a14f177 100644<br>
> > --- a/sound/soc/fsl/fsl_sai.c<br>
> > +++ b/sound/soc/fsl/fsl_sai.c<br>
> > @@ -437,6 +437,12 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)<br>
> >                                    FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,<br>
> >                                    savediv / 2 - 1);<br>
> ><br>
> > +       if (sai->soc_data->max_register >= FSL_SAI_MCTL) {<br>
> <br>
> Isn't it a bit fragile to take this decision based on the number of<br>
> SAI registers in the SoC?<br>
> <br>
> What about adding a specific field in soc_data for such a purpose?<br>
<br>
We've been working on an i.MX8MP where MCLK needs to be input and found<br>
that this enables the MCLK as output despite not having set the<br>
`fsl,sai-mclk-direction-output;` devicetree property in our DT.<br>
Reverting the patch fixes the issues for us.<br>
<br></blockquote><div>Good catch. seems there is an issue here.</div><div><br></div><div>best regards</div><div>wang shengjiu </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have to say that the code comment made me a bit confused, but once<br>
I found the commit message I understood why this code existed.<br>
If this is really i.MX8MM specific maybe mention that in the code<br>
comment and please make the code actually only trigger on i.MX8MM.<br>
It seems to me like these all fulfill the current criteria:<br>
imx7ulp, imx8mq, imx8mm, imx8mp, imx8ulp, imx93<br>
<br>
Should I report this in <a href="http://bugzilla.kernel.org" rel="noreferrer" target="_blank">bugzilla.kernel.org</a> ?<br>
<br>
Regards,<br>
Andreas Henriksson<br>
</blockquote></div></div>