[alsa-devel] [PATCH 08/10 v3] ASoC: rsnd: don't call clk_prepare_enable/unprepare() from inside spin lock

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Mar 23 09:07:07 CET 2015


Hi Mark

> > +static int rsnd_ssi_clk(struct rsnd_mod *mod, int enable)
> > +{
> > +	struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
> > +	struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
> > +	struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
> > +
> > +	rsnd_mod_clk(mod, enable);
> > +
> > +	if (rsnd_rdai_is_clk_master(rdai)) {
> > +		if (rsnd_ssi_clk_from_parent(ssi))
> > +			rsnd_mod_clk(&ssi->parent->mod, enable);
> > +	}
> 
> This would be clearer with a single if statement with an &&, however it
> seems like something that the clock API should be doing itself - it's
> already got support for handling enabling of parents.  If we need to
> manually handle dependencies (which is what this looks like) that seems
> like a problem.

Hmm... indeed.
Thank you for your feedback, I will reconsider about this


More information about the Alsa-devel mailing list