Thread (7 messages) flat view 7 messages, 3 authors, 2022-09-06

Re: [PATCH] ASoC: fsl_asrc: Add initialization finishing check in runtime resume

From: Shengjiu Wang <shengjiu.wang@gmail.com>
Date: 2022-09-06 21:58:31
Also in: alsa-devel

On Tue, Sep 6, 2022 at 7:42 PM Nicolin Chen [off-list ref] wrote:
On Tue, Sep 6, 2022 at 3:50 AM Shengjiu Wang [off-list ref]
wrote:
quoted
quoted
quoted
quoted
quoted
+       /* Wait for status of initialization for every enabled
pairs */
quoted
quoted
quoted
quoted
quoted
+       do {
+               udelay(5);
+               regmap_read(asrc->regmap, REG_ASRCFG, &reg);
+               reg = (reg >> ASRCFG_INIRQi_SHIFT(0)) & 0x7;
+       } while ((reg != ((asrctr >> ASRCTR_ASRCEi_SHIFT(0)) &
0x7)) && --retry);
quoted
quoted
quoted
quoted
quoted
+
+       /* FIXME: Doesn't treat initialization timeout as error */
+       if (!retry)
+               dev_warn(dev, "initialization isn't finished\n");
Any reason why not just dev_err?
Just hesitate to use dev_err. if use dev_err, then should return an
error.
quoted
quoted
quoted
May one of the pairs is finished, it still can continue.
Makes sense. In that case, why "FIXME" :)
quoted
Just want to have a record/note here, need to care about this warning.
"FIXME" feels like something is wrong and literally means that it is
waiting for a fix/solution. In your case, it's not waiting for a fix
at all, but just an annotation? So, shouldn't it be just "Note:"?
ok, let me update it.

best regards
wang shengjiu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help