[alsa-devel] HD-Audio: can msleep in hda_set_power_state() to D3 be optional?

Lin, Mengdong mengdong.lin at intel.com
Thu Nov 28 16:07:48 CET 2013


Hi Takashi,

In hda_set_power_state(), there is a mandatory sleep up to 100ms before setting state to D3.

/* this delay seems necessary to avoid click noise at power-down */
if (power_state == AC_PWRST_D3) {
                   msleep(codec->epss ? 10 : 100);   ... Could this be optional for specific codecs?
                   flags = HDA_RW_NO_RESPONSE_FALLBACK;
}

Some codecs implement their own sleep in patch_ops.suspend() to avoid the noise.
So is it okay to add a codec flag to decide whether the sleep is necessary here?

Thanks
Mengdong


More information about the Alsa-devel mailing list