[alsa-devel] [PATCH] [v2] ASoC: support all possible sample rates in the WM8776 driver

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Sep 16 18:26:31 CEST 2011

On Fri, Sep 16, 2011 at 10:47:39AM -0500, Timur Tabi wrote:

> Yes, I was concerned about that.  So should I be calling one of the
> snd_pcm_hw_constraint_xxx functions in the codec's .startup function?  That
> would require ASoC to call the machine driver's .startup function *before*
> calling the codec driver's .startup function, since the machine driver's
> .startup function is where I call the codec to tell it what the mclk frequency is.

This isn't good for systems which can dynamically configure the clocks
based on the sample rate, they will wish to reconfigure things after the
user selected the sample rate in hw_params().  I've said several times
that this is the reason we don't actually advertise rates based on the
current rates.

Machine drivers are currently best placed to set constraints if the
clocking is limited.

More information about the Alsa-devel mailing list