Difference between revisions of "Advanced Linux Sound Architecture (简体中文)"

From ArchWiki
Jump to navigation Jump to search
Line 65: Line 65:
* [[Allow multiple programs to play sound at once]]
* [[Allow multiple programs to play sound at once]]
==Still Getting No Sound?==
Even though your drivers are installed correctly, and your volume is right, and nothing is muted, you might not hear anything! Adding the following line to <code>/etc/modprobe.conf</code> fixes this problem (with the <code>via82xx</code> driver, at least).
声卡驱动已经正确安装,声音大小设置正确,并且没有设置为静音,但是你就是听不见任何声音。添加下面一行字到<code>/etc/modprobe.conf</code> 来解决这个问题(with the <code>via82xx</code> driver, at least)。
  options snd-NAME-OF-MODULE ac97_quirk=0
  options snd-NAME-OF-MODULE ac97_quirk=0
===Setup Permissions===
* Add your user to the audio group:
* 添加用户到audio组:
   # gpasswd -a USERNAME audio
   # gpasswd -a USERNAME audio
* Log your user out and back in to ensure the audio group is loaded.
* 退出再重新登录,确保设置生效。
===Restore Alsa Mixer settings at Startup===
* Run 'alsactl' once to create '/etc/asound.state'
* 运行 'alsactl' 命令创建 '/etc/asound.state' 文件
   alsactl store
   alsactl store
* 编辑 '/etc/rc.conf' 文件,添加 'alsa' 到DAEMONS行,使得系统启动时运行。
* Edit '/etc/rc.conf' and add 'alsa' to the list of daemons to start on bootup

Revision as of 07:27, 27 December 2005

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

这篇文章将讲述如何使Alsa在2.4和2.6内核中正常使用。同时请参考allow multiple programs to play sound at once

本文基于Arjan Timmerman的Alsa设置指南: http://www.soulfly.nl/~arjan/archlinux/alsa-setup.html 其他附加消息: http://bbs.archlinux.org/viewtopic.php?t=2544 如果你使用的是配置了Creative Labs Sound Blaster Live! card声卡的Dell电脑,你需要手动编译ALSA。


  • 2.4和2.6内核都需要做的:
 # pacman -Sy alsa-lib alsa-utils

  • 只需要2.4内核做的:
 # pacman -S alsa-driver
 # depmod -a

  • 推荐但不是必须的操作:
 # pacman -S alsa-oss




  • 到来查找你的声卡。声卡模块通常使用“snd-"作前缀(例如: 'snd-via82xx'). Optionally, run 'alsaconf' as root.
  • 加载模块:
 # modprobe snd-NAME-OF-MODULE
 # modprobe snd-pcm-oss

  • 设置音量
 # amixer set Master 75 unmute
 # amixer set PCM 75 unmute


  • 通过系统中存在的音频文件测试一下:
 # aplay mywav.wav

  • 在 '/etc/rc.conf' 的MODULES行中添加snd-pcm-oss 和 'snd-NAME-OF-MODULE'。


声卡驱动已经正确安装,声音大小设置正确,并且没有设置为静音,但是你就是听不见任何声音。添加下面一行字到/etc/modprobe.conf 来解决这个问题(with the via82xx driver, at least)。

options snd-NAME-OF-MODULE ac97_quirk=0


  • 添加用户到audio组:
 # gpasswd -a USERNAME audio

  • 退出再重新登录,确保设置生效。


  • 运行 'alsactl' 命令创建 '/etc/asound.state' 文件
 alsactl store
  • 编辑 '/etc/rc.conf' 文件,添加 'alsa' 到DAEMONS行,使得系统启动时运行。

Getting SPDIF output

  • (from gralves from the gentoo forums)
  • In Gnome Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.
  • If you don't have Gnome Volume Control installed,
    • Edit /etc/asound.state. This file is where alsasound store your mixer settings.
    • Find a line that says : 'IEC958 Playback Switch'. Near it you will find a line saying value:false. Change it to value:true
    • Now find this line: 'IEC958 Playback AC97-SPSA' and change value to 0.
    • Restart alsa.

KDE settings

  • Start up KDE:
 # startx

  • Setup the volumes as you want them for this user (each user has their own settings):
 # alsamixer

  • KDE 3.3 Go to the K Menu > Multimedia > KMix
    • Choose Settings > Configure KMix...
    • Un-check the option "Restore volumes on logon"
    • Press OK, and you should be all set. Now your volumes will be the same from the command line or within KDE.