Chinaunix首页 | 论坛 | 博客
  • 博客访问: 358705
  • 博文数量: 11
  • 博客积分: 3131
  • 博客等级: 中校
  • 技术积分: 152
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-21 16:10
个人简介

hello world

文章分类

全部博文(11)

文章存档

2011年(3)

2009年(3)

2007年(5)

我的朋友

分类: LINUX

2007-10-18 17:50:32

老文章了,一直放在公司的wiki上,转过来归档,懒得翻译了.....

This article describes How to enable the ALSA

Kernel Configure

The sections relevant to ALSA are in Device Drivers >> Sound. Here's what you need at the top level. Some of you might be thinking "Hey, those look like the default settings", and you would be correct! But if you may have already made changes, here's how things should be:

Linux Kernel Configuration: Sound

<*> Sound card support

   Advanced Linux Sound Architecture --->
   Open Sound System --->


Then under Advanced Linux Sound Architecture --->:

Linux Kernel Configuration: Advanced Linux Sound Architecture

<*> Advanced Linux Sound Architecture

<*> Sequencer support

< > Sequencer dummy client

<*> OSS Mixer API

<*> OSS PCM (digital audio) API

[*] OSS Sequencer API

[ ] Verbose printk

[ ] Debug Generic devices --->

    ISA devices --->

    PCI devices --->

    USB devices --->


Next, we must enable the correct driver. For most of us, will be under "PCI devices", but if you are using an ISA or USB audio card go to the appropriate section.

If you are unsure which driver to select, see the .

If you can't tell which item in menuconfig matches up with the driver name from alsa-project.org, press "?" with one selected to get more info on which cards it supports and the module name.

Linux Kernel Configuration: PCI devices

< > ALi M5451 PCI Audio Controller
< > ATI IXP AC97 Controller
< > ATI IXP Modem
< > Aureal Advantage
< > Aureal Vortex
< > Aureal Vortex 2
< > Aztech AZF3328 / PCI168 (EXPERIMENTAL)
< > Bt87x Audio Capture
< > Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x
< > Cirrus Logic (Sound Fusion) CS4281
< > Emu10k1 (SB Audigy, E-mu APS)
< > Emu10k1X (Dell OEM Version)
< > SB Audigy LS / Live 24bit
< > Korg 1212 IO
< > Digigram miXart
< > NeoMagic NM256AV/ZX
< > RME Digi32, 32/8, 32 PRO
< > RME Digi96, 96/8, 96/8 PRO
< > RME Digi9652 (Hammerfall)
< > RME Hammerfall DSP Audio
< > RME Hammerfall DSP MADI
< > Trident 4D-Wave DX/NX; SiS 7018
< > Yamaha YMF724/740/744/754
< > Analog Devices AD1889
< > Avance Logic ALS4000
< > C-Media 8738, 8338
< > (Creative) Ensoniq AudioPCI 1370
< > (Creative) Ensoniq AudioPCI 1371/1373
< > ESS ES1938/1946/1969 (Solo-1)
< > ESS ES1968/1978 (Maestro-1/2/2E)
< > ESS Allegro/Maestro3
< > ForteMedia FM801
< > ICEnsemble ICE1712 (Envy24)
< > ICE/VT1724/1720 (Envy24HT/PT)
< > Intel/SiS/nVidia/AMD/ALi AC97 Controller
< > Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)
< > S3 SonicVibes
< > VIA 82C686A/B, 8233/8235 AC97 Controller
< > VIA 82C686A/B, 8233 based Modems
< > Digigram VX222
<*> Intel HD Audio


ReInstall Kernel

Once you have made the necessary changes in menuconfig, exit and save.

build the kernel with

#make && make modules_install


Then mount the sda1 to the /boot directory , and copy the new bzImage into it.

# mount /dev/sda1 /boot

#Think_Squall_Caro linux

# cp arch/i386/boot/bzImage /boot/


Then reboot you computer

Verify Driver

Once you have booted your newly built kernel, you should make sure you enabled the correct driver. Simply run:

# cat /proc/asound/cards


Your output should be something like this:

0 [NVidia ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf5000000 irq 17


If you have no soundcards listed, you didn't enable the correct driver. Go back to step 1 and try again. If your card is listed, continue!

Set Permission

Until you add your users to the "audio" group, they will be unable to use the sound card. My user is "ben", so I add him to the audio group like this:

# gpasswd -a squall audio


PS:If you are already logged into the user you are adding to the new group, you will need to log in freshly for it to take effect.

Necessary Software

By default, your sound will be muted. To unmute, we need alsamixer, which is part of the media-sound/alsa-utils package. Emerge it now:

# emerge alsa-utils


Now run alsamixer. The important channels are Master and PCM, you should unmute each of them with "M" then turn them up to 70% or so. When done, hit "esc" to leave alsamixer.

At this point, alsa should be functioning. So fire up your favorite multimedia app with alsa support, and give it a go. My favorite is mplayer, its console output is very verbose and great for making sure alsa is functioning properly. If your applications have not been compiled with alsa support, you should add alsa to your USE flags in /etc/make.conf and use emerge --newuse --update world to rebuild them.

Unless you set it up to save your mixer settings, your sound card will be muted every time you reboot. You can solve this by using the "alsasound" init script. Among other things, alsasound restores your mixer settings when you boot up and saves them when you shut down. First save your current mixer settings with /etc/init.d/alsasound save then add it to your default or boot runlevel so it'll automatically start (and restore your settings) at boot:

# rc-update add alsasound boot


 本文章来至懒人的世界http://huster.cublog.cn),版权所有,如需转载,请注明出处
阅读(2538) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~