On 23.03.2016 14:44, Lars-Peter Clausen wrote: > On 03/23/2016 12:58 PM, pascal.huerst@xxxxxxxxx wrote: >> From: Pascal Huerst <pascal.huerst@xxxxxxxxx> >> >> 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. Ok, I see your point. So I did some measurements. On our devices, a firmware download takes about: 844ms Resetting the pll settings takes about: 87ms I'm not sure, if this worth the effort, but certainly it could be done. I would probably leave it for now, be a bit more precise in the comment above and add a note to the commit message, as Mark suggested (?) While at it I also saw, that we should keep the reset line low, while changing the pll settings. (Which we don't right now) The datasheet states: ... "The state of the PLL_MODEx pins should be changed while RESET is held low." ... _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel