[alsa-devel] Ordering in soc_pcm_hw_params()

jonsmirl at gmail.com jonsmirl at gmail.com
Mon Aug 11 18:09:43 CEST 2014


On Mon, Aug 11, 2014 at 11:33 AM, Mark Brown <broonie at kernel.org> wrote:
> On Mon, Aug 11, 2014 at 09:35:51AM -0400, jonsmirl at gmail.com wrote:
>
>> I have code in the cpu set_hw_params which will switch the sysclk, but
>> it never gets to run because the codec set_hw_params() has already
>> errored out.
>
>> Shouldn't this order be:
>> platform, link, cpu, codec
>
> No, the machine driver runs first so it can do any coordination needed
> between the other devices.  Attempting to fiddle about with the ordering
> is never going to be robust, someone else will always want a different
> ordering at some point.

I don't see how to fix this without making a machine driver that
simply tells the cpu-dai to change the MCLK output from 22.5Mhz to
24.5Mhz earlier in the hw_params chain. But that's putting a generic
piece of code into the machine driver.

Shouldn't codec always be the last in the chain? What would be a case
where you don't want it at the end of the chain?



-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list