Advanced Linux Sound Architecture (简体中文)

From ArchWiki
Revision as of 07:08, 27 December 2005 by Wd (talk | contribs)
Jump to navigation Jump to search

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设置指南: 其他附加消息: 如果你使用的是配置了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'。

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 /etc/modprobe.conf fixes this problem (with the via82xx driver, at least).

options snd-NAME-OF-MODULE ac97_quirk=0

Setup Permissions

  • Add your user to the audio group:
 # 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 store

  • Edit '/etc/rc.conf' and add 'alsa' to the list of daemons to start on bootup

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.