个人工具

UbuntuHelp:HdaIntelSoundHowto/zh

来自Ubuntu中文

140.77.2.152讨论2009年12月10日 (四) 04:08的版本 升级到最新的ALSA驱动

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索





启动

如果您在启动的过程中停滞在了载入“snd-hda-intel“模块的阶段,请尝试在BIOS中禁用您的声卡。通常其名为 "HD Audio Controller", 或者"Azalia Audio" 。 然后请尝试按照下面的指引解决问题。

判定错误

大多数声卡都能在Ubuntu 6.08 LTS默认的内核下正常动作,但是,有时也会发生下面的问题:

  • 不能发声
  • 音量太小
  • 有杂音
  • 音质不佳
  • 点击音频控制面板时突然无声
  • 重启过后声音时有时无
  • 麦克风无法工作
  • 只有耳机有声音

升级到最新的ALSA驱动

更新:对于ubuntu8.04以及更高的版本,有更简单的方法来升级ALSA驱动。 首先到 http://ubuntuforums.org/showthread.php?p=6589810#post6589810 下载1楼提供的附件:AlsaUpgrade-1.0.21-4.tar 到Download文件夹(/Home/username内任意文件夹都可以) 然后

1. cd 刚才下载的目录
2. tar xvf AlsaUpgrade-1.0.21-4.tar
3. sudo ./AlsaUpgrade-1.0.21-4.sh -di
4. 重启电脑

更新过程大概要15分钟时间,此时间不要关闭shell。

出处: http://ubuntuforums.org/showthread.php?p=6589810#post6589810

{i} 这些指令并不会破坏 Ubuntu package structure 和其它内核模块 - 换句话说,虽然看起来有重大的修改,但是它们仅仅是对已有的内核模块进行了功能上的扩充。 (详情请参阅Caveats部分!)

上面的说法并不准确 - 当我重启之后却没有了声音,我花了几个小时才让其正常工作 (感谢 [故障除]). [PaulOppenheim]

  • 安装所需的工具和 kernelheaders
sudo aptitude install build-essential libncurses-dev gettext linux-headers-`uname -r`
  • 安装kernel headers
  • 从这里下载最新的ALSA驱动 Alsa project (driver, lib, and utils) 至一个文件夹(例如. ~/downloads). 下面我们以1.0.14版为例. Please change this in accordance with the one you downloaded from the Alsa project site.
  • alsa-driver
  • alsa-lib
  • alsa-utils
  • 设置安装目录
sudo mkdir -p /usr/src/alsa
cd /usr/src/alsa
sudo cp ~/downloads/alsa* .
sudo tar xjf alsa-driver*.bz2
sudo tar xjf alsa-lib*.tar.bz2
sudo tar xjf alsa-utils*.tar.bz2
  • 编译并安装 alsa-driver
cd alsa-driver*
sudo ./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r)
sudo make
sudo make install
  • 编译并安装 alsa-lib
cd ../alsa-lib*
sudo ./configure
sudo make
sudo make install
  • 编译并安装 alsa-utils
cd ../alsa-utils*
sudo ./configure
sudo make
sudo make install

请确保你已经安装了 curses library以便编译 alsa-utils. 您可以在终端运行下面的命令来安装它:

sudo apt-get install libncurses5-dev
  • 重启
  • 如果没有声音, 运行 dmesg查看 "snd_"字符串

手动设定模块参数

  • 首先你必须得知您所用声卡的型号,使用如下命令:
cat /proc/asound/card0/codec#* | grep Codec

它将返回您声卡的型号,例如: "Codec: Realtek ALC260", 那么您的声卡就是 ALC260。

  • 从这里(用您所用的内核版本替换KERNEL_VERSION)打开ALSA 文档:
/usr/src/KERNEL_VERSION/Documentation/sound/alsa/ALSA-Configuration.txt

如果您没有这份文档,您可以在这里查阅 this link(适用于2.6.22),您也可以在“/alsa-kernel/Documentation/ of the alsa-driver-1.x.x“目录下找到 ALSA-Configuration.txt。

  • 搜索您的型号,例如ALC260。
hp		HP machines
hp-3013		HP machines (3013-variant)
fujitsu		Fujitsu S7020
acer		Acer TravelMate
basic		fixed pin assignment (old default model)
auto		auto-config reading BIOS (default)

选择和您声卡最相近的,例如您使用的是笔记本,您就选择 "acer"。

  • 用下面的命令打开 /etc/modprobe.d/alsa-base
sudo nano /etc/modprobe.d/alsa-base

Then paste the following line at the end of the file (change MODEL with the type of sound card's model, in our example it should be "acer" (without quotation marks)):

options snd-hda-intel model=MODEL
  • Reboot

Playing with probe_mask

Another possible option is the 'probe_mask' parameter, which has been known to fix sound issues characterized by the occurrence of "azx_get_response timeout" messages reported with 'dmesg'. Try either "probe_mask=1" or "probe_mask=8" by adding a line like:

options snd-hda-intel probe_mask=1