I've just installed 12.04 on my new inspiron 14z and since the systems starts loading a white noise begin to sound. When i play any song or music from internet, it works fine, but the noise continues. I've tried turning off all the volume controls but it continues..Could any one help me or give me a clue to find a solution? THANKS
1 Answer
The problem probably lies in the fact that the sound card is currently not supported by the ALSA Intel HDA module (as of v1.0.24). You can retrieve the model of your card using the command
$ cat /proc/asound/card0/codec* | grep Codec
which in my case returns
Codec: IDT92HD91BXX
Codec: Intel PantherPoint HDMI
(the first being the interesting one). The list of supported cards can be found at [www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt], and it appears that the latest are 92HD83*
.
However, after some investigation done with the excellent HDA Analyzer tool, I discovered that the problem can be solved by setting one of the GPIOs:
(I would have posted an image here, but I do not have enough reputation for it).
The tool can be used to export a python script which reproduces the modifications done through the GUI. Here are the script contents (slightly modified by me):
#!/usr/bin/env python
# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)
import os
import struct
from fcntl import ioctl
from time import sleep
def __ioctl_val(val):
# workaround for OverFlow bug in python 2.4
if val & 0x80000000:
return -((val^0xffffffff)+1)
return val
IOCTL_INFO = __ioctl_val(0x80dc4801)
IOCTL_PVERSION = __ioctl_val(0x80044810)
IOCTL_VERB_WRITE = __ioctl_val(0xc0084811)
def set(nid, verb, param):
verb = (nid << 24) | (verb << 8) | param
res = ioctl(FD, IOCTL_VERB_WRITE, struct.pack('II', verb, 0))
attempts = 0
while((not os.path.exists("/dev/snd/hwC0D0")) and attempts < 50):
attempts += 1
sleep(0.1)
FD = os.open("/dev/snd/hwC0D0", os.O_RDONLY)
info = struct.pack('Ii64s80si64s', 0, 0, '', '', 0, '')
res = ioctl(FD, IOCTL_INFO, info)
name = struct.unpack('Ii64s80si64s', res)[3]
if not name.startswith('HDA Codec'):
raise IOError, "unknown HDA hwdep interface"
res = ioctl(FD, IOCTL_PVERSION, struct.pack('I', 0))
version = struct.unpack('I', res)
if version < 0x00010000: # 1.0.0
raise IOError, "unknown HDA hwdep version"
# initialization sequence starts here...
set(0x01, 0x716, 0x02) # 0x01071602 (SET_GPIO_MASK)
os.close(FD)
In order to execute the script at boot time, first save it to /usr/local/sbin/fix-idt-codec
and then create the init script /etc/init/fix-idt-codec.conf
:
# fix-idt-codec - Fixes issues with snd-hda-intel
#
# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)
description "Fix Intel HDA IDT Codec issues"
start on runlevel [2345]
task
exec /usr/local/sbin/fix-idt-codec
Now reboot, and the problem should be fixed.
For the sake of completeness, there is an additional issue some people documented in this thread: the white noise reappears after a suspend/resume cycle (and, curiously, disappears when you plug in earphones). To fix it you can add a file named 20_fix-idt-codec
to /etc/pm/sleep.d
with the following contents:
#!/bin/sh
# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
HELPER=/usr/local/sbin/fix-idt-codec
if [ ! -f $CODEC ]; then
exit 0
fi
case "${1}" in
resume|thaw)
if [ -f $HELPER ]; then
python $HELPER
fi
;;
esac
I hope this helps. I found the following links quite useful during the debugging:
- Help to debug Intel HDA - [www.alsa-project.org/main/index.php/Help_To_Debug_Intel_HDA]
- Matrix:Module-hda-intel - [www.alsa-project.org/main/index.php/Matrix:Module-hda-intel]
- Audio debugging techniques - [voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/]
- HdaIntelSoundHowto - [help.ubuntu.com/community/HdaIntelSoundHowto]