[alsa-devel] [PATCH 1/3] ASoC: simple-card: set cpu dai clk in hw_params

Mark Brown broonie at kernel.org
Tue May 29 13:32:43 CEST 2018


On Tue, May 29, 2018 at 01:17:45PM +0200, Daniel Mack wrote:
> On Tuesday, May 29, 2018 01:16 PM, Mark Brown wrote:
> > On Mon, May 28, 2018 at 09:35:01PM +0200, Daniel Mack wrote:

> > > +		if (dai_props->cpu_dai.clk)
> > > +			clk_set_rate(dai_props->cpu_dai.clk, mclk);

> > We're ignoring the return value here.

> On purpose actually. Not all clocks might be settable, and in that case,
> this is a no-op. You think we should bail or warn?

If we need to set the rate and fail to set it then clearly we shouldn't
just carry on ignoring the error.  You might want some more involved
logic there around checking if it's actually a rate change before you
error out, and possibly some logic to carry on with whatever the rate is
and a reduced set of resulting sample rates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180529/487beb48/attachment.sig>


More information about the Alsa-devel mailing list