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]
Date: Tue, 12 Mar 2024 13:51:02 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Andrejs Cainikovs <andrejs.cainikovs@...adex.com>
CC: Andrejs Cainikovs <andrejs.cainikovs@...il.com>,
        <patches@...nsource.cirrus.com>, <linux-sound@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Liam Girdwood <lgirdwood@...il.com>,
        "Mark
 Brown" <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai
	<tiwai@...e.com>
Subject: Re: [RFC PATCH v1] ASoC: wm8904: enable fll with fixed mclk

On Tue, Mar 12, 2024 at 01:13:40PM +0100, Andrejs Cainikovs wrote:
> On Mon, Mar 11, 2024 at 11:35:53AM +0000, Charles Keepax wrote:
> > On Fri, Mar 08, 2024 at 04:58:31PM +0100, Andrejs Cainikovs wrote:
> > > From: Andrejs Cainikovs <andrejs.cainikovs@...adex.com>
> With or without mclk-fs wm8904_set_sysclk() is called always during probe,
> with following parameters:
> 
> clk_id = 0
> dir = 0
> freq = 25000000
> mclk_freq = 25000000
> 
> When mclk-fs is set, wm8904_set_sysclk() is also called before each
> playback [1]. In case of 44.1kHz:
> 
> clk_id = 0
> dir = 0
> freq = 11289600
> mclk_freq = 11235955
> 
> In both scenarios, clk_id is always WM8904_CLK_AUTO.

Ah, ok I see what I was missing here. simple_card_utils calls
clk_set_rate if you specify mclk_fs. Which you don't want in this
case. My gut reaction is that really the problem here is the machine
driver doesn't support the clocking setup you have.

Having a quick look through the simple card stuff can you remove:

	clocks = <&audio_refclk1>;

>From the machine driver DT stuff, and add mclk-fs. I think that
should cause the simple card to call the codec dai_set_sysclk
but without ever touching the audio_refclk. A small change in
simple_util_parse_clk might also be needed to allow it to return
without finding a clock. Which feels like a much simpler and less
scary change.

My only slight reservation is the automatic clocking thing only
really exists as a hack to support simple card anyway. But overal
I think it might be better to try to move the direction of travel
more to adding support for the clocking systems that exist into
simple-card rather than tweaking the codec driver to work around
it.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ