-----Original Message----- From: Takashi Iwai [mailto:tiwai@suse.de] Sent: Monday, December 10, 2012 4:18 PM
Actually 1m is chosen as the smallest positive number for msleep, and it doesn't mean that we need to wait for 1ms at least. It could be shorter than that if you care about the speed.
So, I'd suggest to change the value to a smaller one, and change the timeout check instead of counting the loop but a more objective way, e.g. checking jiffies, in order to get further reduction.
Hi Takashi,
The 2nd version of patch was sent according to your suggestion. Would you please have a check? The title is "[PATCH v2 1/1] ALSA: hda - use usleep_range in link reset and change timeout check".
The new patch - reduced the time for each usleep to 500us - set a 100ms timeout for both entering and exiting link reset. - still leave a big margin for the codec PLL to settle and codec initialization for safety consideration.
Thanks Mengdong