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] [thread-next>] [day] [month] [year] [list]
Message-ID: <27f903d9-a74e-182e-b715-4124cf666f45@axentia.se>
Date:   Tue, 21 Sep 2021 10:10:49 +0200
From:   Peter Rosin <peda@...ntia.se>
To:     Péter Ujfalusi <peter.ujfalusi@...il.com>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Kirill Marinushkin <kmarinushkin@...dec.com>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] ASoC: pcm512x: Mend accesses to the I2S_1 and I2S_2
 registers

>> Can you try the attached patch w/o without the defaults for i2s_1/2?
>> Not even compile tested...
> 
> [added a couple of underscores]
> 
> I get this early during boot/probe
> [    1.506291] pcm512x 0-004c: pcm512x_set_fmt: failed to read I2S_1: -16
> [    1.512905] pcm512x 0-004c: pcm512x_set_fmt: failed to read PLL_EN: -16
> [    1.519517] pcm512x 0-004c: Failed to set data format: -16
> [    1.525045] pcm512x 0-004c: Failed to set data offset: -16
> 
> and then this later, triggered from userspace when an app opens
> the device
> [   14.620344] pcm512x 0-004c: pcm512x_hw_params: I2S_1: 0x2
> 
> So, reading *can* work.

I added some traces and verified that accesses to I2S_1/2 fail (as do
PLL_EN accesses) when the chip is in Powerdown mode (pcm512x_suspend
has set the RQPD bit in the POWER register), which it is when
pcm512x_set_fmt runs. During pcm512x_hw_params the chip is in Standby
mode instead (pcm512x_resume has cleared the RQPD bit, but the RQST
bit is set).

So, my patch seems wrong, and the I2S_1/2 accesses instead need to
move to some point where the chip is not in Powerdown mode.

Or, is the problem that pcm512x_set_fmt is called while the codec is
suspended and the chip thus is in Powerdown mode? Because, that
seems problematic to me?

Cheers,
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ