[alsa-devel] [PATCH] ASoC: adau1701: Reset codec based on sample rate changes

Lars-Peter Clausen lars at metafoo.de
Wed Mar 23 14:44:43 CET 2016


On 03/23/2016 12:58 PM, pascal.huerst at gmail.com wrote:
> From: Pascal Huerst <pascal.huerst at gmail.com>
> 
> Instead of checking if mclk/lrclk ratio has changed, check if
> sample rate has changed. In certain cases, the mclk might be
> changed in the machine driver, which can lead to the same
> mclk/lrclk ration, eventhow the sample rate has changed.
> 
> Since the codec has to be programmed differently for every
> sample rate, its better to check for samplerate changes instead
> of mclk/lrclk ration changes.

Mark's comment made me give this some additional though. Do we actually
need to reset the device if the clkdiv did not change. Stopping the DSP,
uploading the new firmware and then restarting it should be sufficient.
But on the other hand the time the reset takes should be negligible
compared to programming the firmware, so it might be ok to always do it.
Let me know what you think.



More information about the Alsa-devel mailing list