Dear ALSA folks,
playing with PowerTOP 1.97 I notice that it lists 100 % usage for the Audio device on several systems [1].
I made sure that power management is enabled.
$ grep snd /etc/modprobe.d/* …: options snd_hda_intel power_save=1 $ more /sys/module/snd_hda_intel/parameters/power_save_controller Y $ more /sys/module/snd_hda_intel/parameters/power_save 0
Since I was on AC power pm-utils seems to reset that parameter to not save power. :/
$ sudo su # echo "1" > /sys/module/snd_hda_intel/parameters/power_save # exit
But enabling that does not change anything right away. Only after using the device by playing some audio – `speaker-test` in this case, the power management seems to kick in.
$ more /sys/module/snd_hda_intel/parameters/power_save* :::::::::::::: /sys/module/snd_hda_intel/parameters/power_save :::::::::::::: 1 :::::::::::::: /sys/module/snd_hda_intel/parameters/power_save_controller :::::::::::::: Y $ more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 405056 $ more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 409664 $ more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 413672 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:08:46 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 464644 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:08:52 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 470076 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:09:04 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 482604 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:10:41 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 9640 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 578904 $ date && speaker-test Sa 11. Feb 10:12:58 CET 2012
speaker-test 1.0.24.2
Wiedergabe-Gerät ist default Stream-Parameter sind 48000 Hz, S16_LE, 1 Kanäle Verwende 16 Oktaven rosa Rauschen Rate ist 48000 Hz (angefordert: 48000 Hz) Puffergröße von 2048 bis 8192 Periodengröße von 1024 bis 1024 Verwende maximale Puffergröße 8192 Perioden = 4 gesetzt: period_size = 1024 gesetzt: buffer_size = 8192 0 - Vorne links Zeit pro Periode = 2,828717 0 - Vorne links Zeit pro Periode = 2,985785 0 - Vorne links Zeit pro Periode = 2,985784 0 - Vorne links Zeit pro Periode = 2,985806 0 - Vorne links Zeit pro Periode = 2,985834 0 - Vorne links Zeit pro Periode = 2,985798 0 - Vorne links Zeit pro Periode = 2,985838 0 - Vorne links ^C $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:13:24 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 100732 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 651372 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:13:29 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 105384 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 651372 $ date && more /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_*_acct Sa 11. Feb 10:24:18 CET 2012 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_off_acct :::::::::::::: 753148 :::::::::::::: /sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0/power_on_acct :::::::::::::: 652876
Is that an error in the driver? I have seen that with Realtek and Conexant devices. Please also find the output of `alsa-info.sh` [2] attached. There is no difference before and after playing some audio.
$ diff -u alsa-info.txt.beforeplayingaudio alsa-info.txt.afterplayingaudio --- alsa-info.txt.beforeplayingaudio 2012-02-11 10:11:31.000000000 +0100 +++ alsa-info.txt.afterplayingaudio 2012-02-11 10:13:52.000000000 +0100 @@ -3,7 +3,7 @@ !!ALSA Information Script v 0.4.60 !!################################
-!!Script ran on: Sat Feb 11 09:11:29 UTC 2012 +!!Script ran on: Sat Feb 11 09:13:51 UTC 2012
!!Linux Distribution @@ -379,7 +379,7 @@ crw-rw----+ 1 root audio 116, 5 Feb 11 10:00 /dev/snd/controlC0 crw-rw----+ 1 root audio 116, 4 Feb 11 10:00 /dev/snd/hwC0D0 crw-rw----+ 1 root audio 116, 3 Feb 11 10:00 /dev/snd/pcmC0D0c -crw-rw----+ 1 root audio 116, 2 Feb 11 10:00 /dev/snd/pcmC0D0p +crw-rw----+ 1 root audio 116, 2 Feb 11 10:12 /dev/snd/pcmC0D0p crw-rw----+ 1 root audio 116, 1 Feb 11 10:00 /dev/snd/seq crw-rw----+ 1 root audio 116, 33 Feb 11 10:00 /dev/snd/timer
Thanks,
Paul
[1] http://lists.lesswatts.org/pipermail/discuss/2012-February/000687.html [2] http://alsa-project.org/main/index.php/Help_To_Debug