First, introduce what is ALSA;
Advanced Linux Sound architecture abbreviation for ALSA, translated into Chinese means the Advanced Linux sound architecture (this is Google translation); when it comes to architecture, it's a bit too much, so ALSA not only includes support and drive for sound cards;
ALSA has the following characteristics:
1, the efficient support of all audio interfaces, from ordinary users of the sound card to the Professional level multi-channel audio equipment;
2, sound card driver fully modular design;
3. SMP and Thread-safe design.
4, the Development Library (ALSA-LIB) for the program design provides a simple, convenient, and has advanced effects and functions;
5. Support for legacy OSS API ports for most OSS applications; OSS is a commercial driver, and OSS has a paperback version of the code that has been moved into the kernel and ALSA, where Alsa-oss is, and OSS companies are said to be non-existent. ; We do not need to use the commercial version provided by OSS companies; the ALSA and OSS Lite Edition is Enough
Second, check the ALSA version, if the latest, you do not have to reinstall, carefully check the configuration bar.
$ alsactl-v
If you print out: Alsactl version 1.0.19, then ALSA is up to date. If it's not up to date, install the latest ALSA driver first.
The first step is to stop the current ALSA service:
Sudo/etc/init.d/alsa-utils stop
Step two, uninstall the original driver
sudo apt-get--purge remove linux-sound-base alsa-base alsa-utils
The third step, (* because in the deletion of Alsa-utils will also delete GDM and ubuntu-desktop, so you have to reinstall, otherwise you will not be able to access the desktop, please do not miss this step)
sudo apt-get install GDM ubuntu-desktop
Compile and install Alsa
First, on the ALSA official website http://www.alsa-project.org, download the latest ALSA drive, with TAR-JXVF alsa-*-1.0.19.tar.bz2 and tar xvf Alsa-*.1.0.19.tar decompression.
$ wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.19.tar.bz2
$ wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.19.tar.bz2
$ wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.19.tar.bz2
Second, check your kernel version and the sound card decoder chip for support.
To view supported kernel versions
$ less Alsa-driver-1.0.19/supported_kernels
View your sound card decoder chip (if the system does not recognize the sound card, may not be detected by the following two, then check your computer Configuration list)
$ tail-2/proc/asound/oss/sndstat
Or
$ head-1/proc/asound/card0/codec#0
Like my ONDA a69g, it shows the following.
0:realtek ALC655 Rev. 0
In Alsa-driver-1.0.15/alsa-kernel/documentation/alsa-configuration.txt to find their own sound card decoder chip corresponding model name, such as my alc655 corresponding is:
-Alc_jack for alc65x, turn on the Jack sense mode
Third, prepare the compilation environment, install GCC, libc and so on tools, also need to download the Linux header, which is compiled ALSA drive must.
$ sudo apt-get install build-essential libncurses5-dev gettext kernel-package gcc make libc6 libc6-dev
$ sudo apt-get install linux-headers-' uname-r '
Four, compile and install, general./configure, make, make install process. Note that the driver compile time required module name, is found in the third step of the modle corresponding module name, remove snd-can be. For example, my alc655 corresponding module is SND-ATIIXP so configure time need to add--with-cards=atiixp. I'm having problems compiling the installation please read the INSTALL that came with the source carefully.
$ CD alsa-driver-1.0.19
$./configure--with-cards=module_name mine is snd-atiixp.
$ make
$ sudo make install
$ cd ... /alsa-lib-1.0.19
$./configure
$ make
$ sudo make install
$ cd ... /alsa-utils-1.0.19
$./configure
$ make
$ sudo make install
Five, configure ALSA.
If the previous system does not use ALSA drive, may need to alsaconf to configure, but also to add ALSA kernel module, I have no experience;
If the system already has a ALSA driver, it does not recognize the sound card or the sound driver is problematic. So in theory it only needs to be changed in two places:
Add the/etc/modprobe.d/sound file, which reads:
Alias snd-card-0 Snd-module_name
Alias sound-slot-0 Snd-module_name
For example, mine is:
Alias snd-card-0 Snd-atiixp
Alias sound-slot-0 Snd-atiixp
Add the last line in/etc/modprobe.d/alsa-base:
Options Snd-module_name Model=model_name
Six, restart the view effect, you can use Alsamixer to adjust sound settings.