Comment 7 for bug 151111

Revision history for this message
Ewen McNeill (ewen) wrote :

I can confirm that on a HP NC6220 after resume with the -generic Ubuntu Gutsy kernel (2.6.22-14.47) the internal speakers are mute (but playback to external speakers and/or headphones is fine).

After reverting the patch mentioned earlier in this bug, at comment:

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/151111/comments/1

the internal speakers work after suspend to RAM and resume (in fact the sound continues playing even before the screen is reset).

Looking at the line that is re-enabled by reverting that patch, it appears that on the HP NC6220 the internal amplifier does not get powered on again unless the sound card is powered off at suspend time (without that it appears that whatever turns the power to the amplifier back on again doesn't get run when the sound card is powered up again in the resume code). Given the comment in the patch mentioned above I guess in some other laptops the power on code doesn't work at all, so if it's powered down it never gets powered up.

So the best fix is probably to put that particular power down line under the control of a kernel module option, so on the HP NC6220, etc, the card can be properly powered down at suspend so it powers up fully at resume, but on other laptops where that causes problems the power down can be skipped.

FTR (in case it helps someone else) it appears to be sufficient (after installing the packages needed to compile a kernel) to do:

    apt-get source linux-image-2.6.22-14-generic
    cd linux-source-2.6.22-2.6.22
    cp /boot/config-`uname -r` .config
    make oldconfig
    make sound/pci/snd-intel8x0.ko
    make sound/pci/snd-intel8x0m.ko
    # Make a backup of the existing sound modules if desired then...
    cp -p sound/pci/snd*ko /lib/modules/`uname -r`/kernel/sound/pci/

and then reboot to use the new modules.

Ewen