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: <CAA+D8AMfBL9qQR028iQGMSiMVB__NAiyE_DQ1qiJG=xABZhWdA@mail.gmail.com>
Date: Thu, 11 Dec 2025 17:57:53 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Chancel Liu <chancel.liu@....com>
Cc: Xiubo.Lee@...il.com, festevam@...il.com, nicoleotsuka@...il.com, 
	lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz, tiwai@...e.com, 
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, 
	linux-sound@...r.kernel.org, imx@...ts.linux.dev
Subject: Re: [PATCH] ASoC: fsl_sai: Constrain sample rates from audio PLLs
 only in master mode

On Wed, Dec 10, 2025 at 2:21 PM Chancel Liu <chancel.liu@....com> wrote:
>
> If SAI works in master mode it will generate clocks for external codec
> from audio PLLs. Thus sample rates should be constrained according to
> audio PLL clocks. While SAI works in slave mode which means clocks are
> generated externally then constraints are independent of audio PLLs.
>
> Fixes: 4edc98598be4 ("ASoC: fsl_sai: Add sample rate constraint")
> Signed-off-by: Chancel Liu <chancel.liu@....com>
> ---
>  sound/soc/fsl/fsl_sai.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 72bfc91e21b9..86730c214914 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -917,8 +917,14 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,
>                                            tx ? sai->dma_params_tx.maxburst :
>                                            sai->dma_params_rx.maxburst);
>
> -       ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
> -                                        SNDRV_PCM_HW_PARAM_RATE, &sai->constraint_rates);
> +       if (sai->is_consumer_mode[tx])

The sai->is_consumer_mode[tx] can be changed after startup(),
then there may be an issue for the constraint.

It looks like there is no perfect solution here.

Best regards
Shengjiu Wang

> +               ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
> +                                                SNDRV_PCM_HW_PARAM_RATE,
> +                                                &fsl_sai_rate_constraints);
> +       else
> +               ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
> +                                                SNDRV_PCM_HW_PARAM_RATE,
> +                                                &sai->constraint_rates);
>
>         return ret;
>  }
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ