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: <7d58d52d-2087-45af-b29e-2515b63ead13@gmail.com>
Date:   Tue, 19 Sep 2023 21:25:42 +0300
From:   Péter Ujfalusi <peter.ujfalusi@...il.com>
To:     Andreas Kemnade <andreas@...nade.info>, bcousson@...libre.com,
        tony@...mide.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
        tiwai@...e.com, jarkko.nikula@...mer.com,
        dmitry.torokhov@...il.com, linux-omap@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        alsa-devel@...a-project.org
Subject: Re: [PATCH 1/3] ASoC: ti: omap-mcbsp: Ignore errors for getting
 fck_src



On 7/5/23 22:03, Andreas Kemnade wrote:
> Commit 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp")
> dropped prcm_fck for omap4,

it also dropped the pad_fck for that matter.

> so the clk_src might not be >available making the
> clk_get(src) fail.

Wow, so OMAP4 audio is pretty broken if would ever need to select FCLK?
By default we don't on OMAP4, but this is astonishing.

> In such cases, rely on the devicetree to assign
> the correct parent.

You cannot rely on DT to dynamically select the FCLK parent for
different use cases.
The dai_set_dai_sysclk() cannot select between internal or external
source of the reference clock and DT cannot handle this.
If one sampling frequency is available with pad_fck while other is only
possible with internal clock then this is no longer possible.

> Signed-off-by: Andreas Kemnade <andreas@...nade.info>
> ---
>  sound/soc/ti/omap-mcbsp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
> index 21fa7b9787997..f9fe96b61852b 100644
> --- a/sound/soc/ti/omap-mcbsp.c
> +++ b/sound/soc/ti/omap-mcbsp.c
> @@ -70,8 +70,8 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
>  
>  	fck_src = clk_get(mcbsp->dev, src);
>  	if (IS_ERR(fck_src)) {
> -		dev_err(mcbsp->dev, "CLKS: could not clk_get() %s\n", src);
> -		return -EINVAL;
> +		dev_info(mcbsp->dev, "CLKS: could not clk_get() %s\n", src);
> +		return 0;

I would rather have some clock alias for OMAP4/5 to provide the clocks
that we need for the fclk.
If we did not got the clock we needed to select we cannot say that all
is good, carry on.
Normally the machine driver does this and it thinks that we switched
clocks while we did not and the clocking is all wrong now.

>  	}
>  
>  	pm_runtime_put_sync(mcbsp->dev);

-- 
Péter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ