[alsa-devel] [PATCH 1/3] ASoC: simple-card: set cpu dai clk in hw_params
Daniel Mack
daniel at zonque.org
Tue May 29 22:31:01 CEST 2018
On Tuesday, May 29, 2018 01:32 PM, Mark Brown wrote:
> 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.
>
Fair enough. I'll add that error checking at least, that makes sense.
Thanks for the feedback!
Daniel
More information about the Alsa-devel
mailing list