[alsa-devel] Boot procudure on HDA driver
Hi Takashi,
When System Boot up. The Hda Driver running step was as below.
alc_init(); alc_shutup(); alc_init();
The depop procedure was put in spec->init_hook and spec->shutup.
But I find more codec which run spec->shutup at boot up. It will occur pop noise. If it doesn't run spec->shutup, it will not occur pop noise or reduce pop noise.
How could the spec->shutup not run at boot up?
I ever test to put the check in spec->shutup() for PM_EVENT_SUSPEND and PM_EVENT_HIBERNATE and shutdown. But if power_save=1, it was have issue for this. Codec was idle already in power_save=1 state. If system go suspend, it will not run spec->shutup() again.
BR, Kailang
On Mon, 13 May 2019 11:00:18 +0200, Kailang wrote:
Hi Takashi,
When System Boot up. The Hda Driver running step was as below.
alc_init(); alc_shutup(); alc_init();
The depop procedure was put in spec->init_hook and spec->shutup.
But I find more codec which run spec->shutup at boot up. It will occur pop noise. If it doesn't run spec->shutup, it will not occur pop noise or reduce pop noise.
How could the spec->shutup not run at boot up?
I ever test to put the check in spec->shutup() for PM_EVENT_SUSPEND and PM_EVENT_HIBERNATE and shutdown. But if power_save=1, it was have issue for this. Codec was idle already in power_save=1 state. If system go suspend, it will not run spec->shutup() again.
I guess it's a runtime PM, hence it's neither PM_EVENT_SUSPEND nor PM_EVENT_HIBERNATE.
Actually, if the shutup procedure makes the problem on a certain platform, just skip it. It's an optional behavior and would be fine without it (of course only if it's confirmed to work :)
Takashi
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, May 13, 2019 5:11 PM To: Kailang kailang@realtek.com Cc: (alsa-devel@alsa-project.org) alsa-devel@alsa-project.org Subject: Re: Boot procudure on HDA driver
On Mon, 13 May 2019 11:00:18 +0200, Kailang wrote:
Hi Takashi,
When System Boot up. The Hda Driver running step was as below.
alc_init(); alc_shutup(); alc_init();
The depop procedure was put in spec->init_hook and spec->shutup.
But I find more codec which run spec->shutup at boot up. It will occur pop
noise.
If it doesn't run spec->shutup, it will not occur pop noise or reduce pop noise.
How could the spec->shutup not run at boot up?
I ever test to put the check in spec->shutup() for PM_EVENT_SUSPEND and
PM_EVENT_HIBERNATE and shutdown.
But if power_save=1, it was have issue for this. Codec was idle already in power_save=1 state. If system go suspend, it will
not run spec->shutup() again.
I guess it's a runtime PM, hence it's neither PM_EVENT_SUSPEND nor PM_EVENT_HIBERNATE.
runtime PM and suspend and hibernate and shutdown need to run spec->shutup(). It's no problem. But spec->shutup() doesn't need to run in boot up. And it will set power_save=1 on all dell machine.
If (codec->auto_runtime_pm || codec->bus->shutdown || codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND || codec->core.dev.power.power_state.event == PM_EVENT_HIBERNATE)
So, I need to put upper check code in spec->shutup(). Right? Thanks.
Actually, if the shutup procedure makes the problem on a certain platform, just skip it. It's an optional behavior and would be fine without it (of course only if it's confirmed to work :)
Takashi
------Please consider the environment before printing this e-mail.
On Mon, 13 May 2019 11:30:56 +0200, Kailang wrote:
-----Original Message----- From: Takashi Iwai tiwai@suse.de Sent: Monday, May 13, 2019 5:11 PM To: Kailang kailang@realtek.com Cc: (alsa-devel@alsa-project.org) alsa-devel@alsa-project.org Subject: Re: Boot procudure on HDA driver
On Mon, 13 May 2019 11:00:18 +0200, Kailang wrote:
Hi Takashi,
When System Boot up. The Hda Driver running step was as below.
alc_init(); alc_shutup(); alc_init();
The depop procedure was put in spec->init_hook and spec->shutup.
But I find more codec which run spec->shutup at boot up. It will occur pop
noise.
If it doesn't run spec->shutup, it will not occur pop noise or reduce pop noise.
How could the spec->shutup not run at boot up?
I ever test to put the check in spec->shutup() for PM_EVENT_SUSPEND and
PM_EVENT_HIBERNATE and shutdown.
But if power_save=1, it was have issue for this. Codec was idle already in power_save=1 state. If system go suspend, it will
not run spec->shutup() again.
I guess it's a runtime PM, hence it's neither PM_EVENT_SUSPEND nor PM_EVENT_HIBERNATE.
runtime PM and suspend and hibernate and shutdown need to run spec->shutup().
Is the call really mandatory?
It's no problem. But spec->shutup() doesn't need to run in boot up.
The call of spec->shutup() at boot up *is* the runtime PM. Or any other call path I overlooked?
And it will set power_save=1 on all dell machine.
If (codec->auto_runtime_pm || codec->bus->shutdown || codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND || codec->core.dev.power.power_state.event == PM_EVENT_HIBERNATE)
So, I need to put upper check code in spec->shutup(). Right? Thanks.
No, the auto_runtime_pm is for a completely different purpose.
At the boot up, the runtime PM can be kicked in at any time. So if you disable the shutup during the runtime PM, it means you'd need to call the shutup at runtime PM completely.
Takashi
Actually, if the shutup procedure makes the problem on a certain platform, just skip it. It's an optional behavior and would be fine without it (of course only if it's confirmed to work :)
Takashi
------Please consider the environment before printing this e-mail.
participants (2)
-
Kailang
-
Takashi Iwai