12.04 dell 14z inspiron 5423 ultrabook 声音(噪音)

12.04 dell 14z inspiron 5423 ultrabook 声音(噪音)

我刚刚在新的 inspiron 14z 上安装了 12.04,系统开始加载后,开始发出白噪声。当我播放任何歌曲或互联网音乐时,它都能正常工作,但噪声仍然存在。我尝试关闭所有音量控制,但噪声仍然存在。有人能帮助我或给我一些线索来找到解决方案吗?谢谢

答案1

问题可能在于声卡目前不支持 ALSA Intel HDA 模块(自 v1.0.24 起)。您可以使用以下命令检索卡的型号

$ cat /proc/asound/card0/codec* | grep Codec

在我的例子中返回

Codec: IDT92HD91BXX
Codec: Intel PantherPoint HDMI

(第一个是有趣的)。支持的卡列表可以在 [www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt] 找到,最新的似乎是92HD83*

然而,在对优秀HDA 分析器工具,我发现可以通过设置其中一个GPIO来解决该问题:

(我本来想在这里发布一张图片,但我的声誉不够)。

该工具可用于导出一个 Python 脚本,该脚本可重现通过 GUI 所做的修改。以下是脚本内容(我稍作修改):

#!/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)

为了在启动时执行脚本,首先将其保存到/usr/local/sbin/fix-idt-codec,然后创建初始化脚本/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

现在重新启动,问题就应该解决了。

为了完整起见,有些人记录了一个额外的问题此主题:白噪声在挂起/恢复循环后再次出现(奇怪的是,当您插入耳机时它会消失)。要修复此问题,您可以添加一个名为的文件,其20_fix-idt-codec内容/etc/pm/sleep.d如下:

#!/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

希望对您有所帮助。我在调试过程中发现以下链接非常有用:

  • 帮助调试英特尔 HDA - [www.alsa-project.org/main/index.php/Help_To_Debug_Intel_HDA]
  • 矩阵:模块-hda-intel - [www.alsa-project.org/main/index.php/Matrix:Module-hda-intel]
  • 音频调试技术 - [voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/]
  • HdaIntelSoundHowto - [help.ubuntu.com/community/HdaIntelSoundHowto]

相关内容