RE: [PATCh v3 11/14] ASoC: rsnd: src: Add SRC reset and clock support for RZ/G3E
From: John Madieu
Date: Fri Apr 03 2026 - 17:13:25 EST
Hi Mark,
Thanks for your review.
> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>
> Sent: Thursday, April 2, 2026 8:05 PM
> To: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> Subject: Re: [PATCh v3 11/14] ASoC: rsnd: src: Add SRC reset and clock
> support for RZ/G3E
>
> On Thu, Apr 02, 2026 at 06:24:33PM +0200, John Madieu wrote:
>
> > @@ -526,6 +527,12 @@ static int rsnd_src_init(struct rsnd_mod *mod,
> > if (ret < 0)
> > return ret;
> >
> > + ret = clk_prepare_enable(priv->clk_scu_supply);
> > + if (ret) {
> > + dev_err(dev, "Cannot enable scu_supply_clk\n");
> > + return ret;
> > + }
> > +
> > rsnd_src_activation(mod);
> >
> > rsnd_src_init_convert_rate(io, mod);
>
> Shouldn't this have some handling like the adg does for splitting prepare
> and enable for the same reasons?
Looking at the call chain, rsnd_src_init/quit are called from the PCM
open/close path, which is a non-atomic context, unlike the ADG case where
rsnd_adg_ssi_clk_try_start() is called from the trigger path (atomic).
So I thought prepare_enable/disable_unprepare were safe here.
I'll add a comment in the code to document this. If you'd prefer the split
anyway, for consistency, I'm happy to do so. Please let me know.
Regards,
John