wm8960 codec driver question

Charles Keepax ckeepax at opensource.cirrus.com
Mon Apr 20 12:19:23 CEST 2020


On Thu, Apr 16, 2020 at 04:24:18AM +0000, Alexey Shinkin wrote:
> 	/* Turn it on */
> 	snd_soc_component_update_bits(component, WM8960_POWER2, 0x1, 0x1);
> 	msleep(250);
> 	snd_soc_component_update_bits(component, WM8960_CLOCK1, 0x1, 0x1);
> 
> 
> What is the reason  for the 250 ms delay ?  I did not find anything
> related in the chip datasheet .
> 
> I found the delay very annoying in my app that generates an
> audible feedback to touchscreen events.  Looks like it is safe to
> comment out the msleep() call  , could there be any implications ?

Almost certainly this is providing time for the PLL to lock before
turning on clocks dependent on this. If you reduce the value some
systems might progress before the PLL is locked which could cause
weird behaviour. Although might work fine on other systems,
removing it all together is probably a bad idea though.

Thanks,
Charles


More information about the Alsa-devel mailing list