lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <VI1PR04MB42226A647AA5A6C2DE8D51D8E3AF9@VI1PR04MB4222.eurprd04.prod.outlook.com>
Date:   Mon, 27 Feb 2023 09:07:06 +0000
From:   Chancel Liu <chancel.liu@....com>
To:     Mark Brown <broonie@...nel.org>
CC:     "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "ckeepax@...nsource.cirrus.com" <ckeepax@...nsource.cirrus.com>,
        "patches@...nsource.cirrus.com" <patches@...nsource.cirrus.com>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: Re: Re: [PATCH 4/4] ASoC: wm8524: Delay some time to follow power
 up sequency

> > > On Wed, Feb 22, 2023 at 07:39:45PM +0800, Chancel Liu wrote:
> > > Doing a 100ms busy wait in atomic context does not seem like a great
> > > idea, never mind a 1.5s one.  This shouldn't be done in trigger, it
> > > needs to be done later - digital_mute() might be a better time to hook
> > > in, though longer delays like this are really quite bad.
>
> > Yes, such long time delay in driver is very bad. But this device requires
> > waiting some time before able to output audio. We have to wait otherwise
> > the beginning data may be lost.
>
> It's not just that it's doing this in the driver, it's doing it in the
> trigger() function which runs in atomic context.  That's unreasonable.
>
> > The power up to audio out timing occurs after MCLK, BCLK and MUTE=1 are
> > ready. I added the delay in trigger() because some CPU DAI drivers enable BCLK in
> > trigger(). You suggested moving the delay to digital_mute(). It seems
> > digital_mute() is called before cpu_dai->trigger. Please correct me if I'm
> > wrong.
> 
> Hrm, right - in any case, it needs to be somewhere that isn't atomic
> context.

OK. I will keep PATCH 1 and PATCH 3. 

For PATCH 2 and PATCH 4, I have to find a better way in which long time delay
can be avoided in atomic context.

Thank you very much for your comments.

Regards, 
Chancel Liu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ