[alsa-devel] Ordering in soc_pcm_hw_params()

jonsmirl at gmail.com jonsmirl at gmail.com
Mon Aug 11 15:35:51 CEST 2014


soc_pcm_hw_params() sets the parameters in this order:
link, codec, cpu, platform

This is tripping me up when switching between the 44100 and 48000
families.  If previous song was 44100 then the codec has sysclk set to
the 44100 family.

Now I play a 48000 family song. codec gets new hardware params and
errors out because sysclk is still in the 44100 family.

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

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list