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: Nicolin Chen <nicoleotsuka@gmail.com>
Date: 2022-09-05 13:15:54
Also in: alsa-devel, lkml

On Mon, Sep 5, 2022 at 3:47 AM Shengjiu Wang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1295,6 +1301,17 @@ static int fsl_asrc_runtime_resume(struct device *dev)
        regmap_update_bits(asrc->regmap, REG_ASRCTR,
                           ASRCTR_ASRCEi_ALL_MASK, asrctr);

+       /* Wait for status of initialization for every enabled pairs */
+       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);
+
+       /* 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help