Skip to contentSkip to conversation

Resent: [RFC] More power-saving for HD-audio driver

DISCUSSION Takashi Iwai 2 participants 3 messages Sep 22, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

[resent due to a size limit - now the patch gzipped and attached]

the patch below is an experimental patch to achieve more aggressive power-saving on HD-audio. With the patch, the device is disabled after a certain timeout when no apps are using the PCM and no loopback channels are being used. (According to Pavel Machek, sound chips consume significant powers.)

For some reasons, the patch is a bit intrusive and touches many places. But the change is pretty straightforward: add power-up/down calls in appropriate place (e.g. mixer changes, PCM open/close).

For the power-up/down control, a damn simple way is chosen in this version. The driver does basically a same job like suspend/resume. We can tune up this later if the perfomance matters.

The default timeout value is 30 seconds. This is adjustable via power_save module option of snd-hda-intel driver. You can change this value dynamically via writing to /sys/modules/snd_hda_intel/parameters/power_save. The value changed isn't propagated immediately, and you have to do something (like change a mixer value or open/close PCM) to activate the new value, though.

Note that my plan is to push this after ALSA 1.0.13-final is released. Thus it's a material for 2.6.20 kernel... yes, we have still a lot of time for debugging.

BTW, a similar patch for intel8x0 driver is on my queue. If you're interested in it, let me know. It's still buggy, so I have to debug it first :)

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw
Quoted 15 lines · Takashi Iwai

the patch below is an experimental patch to achieve more aggressive power-saving on HD-audio. With the patch, the device is disabled after a certain timeout when no apps are using the PCM and no loopback channels are being used. (According to Pavel Machek, sound chips consume significant powers.)

For some reasons, the patch is a bit intrusive and touches many places. But the change is pretty straightforward: add power-up/down calls in appropriate place (e.g. mixer changes, PCM open/close).

For the power-up/down control, a damn simple way is chosen in this version. The driver does basically a same job like suspend/resume. We can tune up this later if the perfomance matters.

Quoted 7 lines

The default timeout value is 30 seconds. This is adjustable via power_save module option of snd-hda-intel driver. You can change this value dynamically via writing to /sys/modules/snd_hda_intel/parameters/power_save. The value changed isn't propagated immediately, and you have to do something (like change a mixer value or open/close PCM) to activate the new value, though.

I'd be interested to know if there are any pops or clicks associated with the HD-audio power up/down events (I don't have an HD PC or laptop to test). Pops and clicks are an unwanted side effect of audio power management atm and occur when the audio subsystems analog circuits are power switched.

If the pops are bad then it may be more desirable to disable the digital components in the audio subsystem (e.g. PLL's, DAI, digital filters, core) and selectively (per machine/codec) disable certain analog components.

Liam

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#2 lore raw

At Fri, 22 Sep 2006 16:09:23 +0100,

Quoted 25 lines · Liam Girdwood
Quoted 15 lines · Takashi Iwai

the patch below is an experimental patch to achieve more aggressive power-saving on HD-audio. With the patch, the device is disabled after a certain timeout when no apps are using the PCM and no loopback channels are being used. (According to Pavel Machek, sound chips consume significant powers.)

For some reasons, the patch is a bit intrusive and touches many places. But the change is pretty straightforward: add power-up/down calls in appropriate place (e.g. mixer changes, PCM open/close).

For the power-up/down control, a damn simple way is chosen in this version. The driver does basically a same job like suspend/resume. We can tune up this later if the perfomance matters.

Quoted 7 lines

The default timeout value is 30 seconds. This is adjustable via power_save module option of snd-hda-intel driver. You can change this value dynamically via writing to /sys/modules/snd_hda_intel/parameters/power_save. The value changed isn't propagated immediately, and you have to do something (like change a mixer value or open/close PCM) to activate the new value, though.

Quoted 5 lines

I'd be interested to know if there are any pops or clicks associated with the HD-audio power up/down events (I don't have an HD PC or laptop to test). Pops and clicks are an unwanted side effect of audio power management atm and occur when the audio subsystems analog circuits are power switched.

Yeah it's possible although a laptop I've tested doesn't cause it. We'd need mute/unmute appropriately before power-switching. But the muting didn't help much on my intel8x0 laptop, though.

Quoted 4 lines

If the pops are bad then it may be more desirable to disable the digital components in the audio subsystem (e.g. PLL's, DAI, digital filters, core) and selectively (per machine/codec) disable certain analog components.

Basically, the power-down shouldn't occur so frequently unless you set the timeout value too short. So, I don't think it's a critical problem if the power-saving is enough. (Of course, we should fix the thing that is fixable :)

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV