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

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

 



On Mon, Sep 5, 2022 at 9:15 PM Nicolin Chen <nicoleotsuka@xxxxxxxxx> wrote:

> On Mon, Sep 5, 2022 at 3:47 AM Shengjiu Wang <shengjiu.wang@xxxxxxx>
> wrote:
> > @@ -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?


Just hesitate to use dev_err. if use dev_err, then should return an error.
May one of the pairs is finished, it still can continue.

Best regards
Wang Shengjiu



[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