Installation and configuration of the Sound Card Driver Software ALSA in Linux

Source: Internet
Author: User
Tags ftp site
Installation and configuration of the Sound Card Driver Software ALSA in Linux
2000-11-23

Publisher: netbull read count: 5585

LinuxByte note: the latest ALSA version is available on this site.

Zhang Zi

Over the past few years, although Linux has been invincible in the global server market due to its open and free features and powerful performance, it has occupied more and more market share, the multimedia features of Linux have never been quite satisfactory. For example, the built-in sound card driver in Linux supports very few sound cards. Most of the popular sound card products in the market cannot obtain system support.

This situation is rapidly changing. Many vendors see the trend of the times and actively participate in driver development. Some organizations and individuals have also begun to make some useful explorations.

The software we introduced today is a Sound card driver package-ALSA, full name of which is Advanced Linux Sound Architecture. It is one of the software under the GNU flag. As the name suggests, it can drive sound card devices in Linux.

It supports most popular sound cards. Modular architecture. Supports full duplex, digital audio, and other sound card features.

You can download the latest software packages from the FTP site to which the http://www.alsa-project.org belongs. If you are interested and have enough capabilities, you can join the development team. Show your talents to the world.

The following describes in detail all the installation and configuration processes and precautions of ALSA, and provides a list of supported sound cards.

Check whether your sound card is supported by the list before installation. In case you do not need to be busy.

I. hardware and software environment requirements.

The author's hardware environment: Sai Yang 366 CPU/Microstar 6199va motherboard/128 MB kingmax memory/10.2GB Gold Diamond 2 hard drive/8X CDROM/WINFast L2300 graphics card/Yamaha 724 chip sound card

Hard Disk partitioning and operating system software: Windows98 + Windows2000 + BluePoint1.0 (blue point Chinese Linux, fully compatible with Redhat ). Use the LILO starter.

ALSA Requirements for the Linux software environment: no special Linux version is required, but the kernel version is later than 2.2.x. If your Linux kernel is earlier than this version, recompile the new kernel. The kernel version of BluePoint1.0 is 2.2.13.

2. download the software.

The latest version of alsais 0.5.9b. the full file name is alsa-driver-0.5.9b.tar.bz2. Adopts the new bz2 compression format, which occupies less space. In addition to this, the following software packages are required for normal operations:

Alsa-utils-0.5.9a.tar.bz2 ---------- utility package

Alsa-lib-0.5.9.tar.bz2 ------------- compile library files required by the utility

If you use the software downloaded from the Windows operating system, copy it to the Linux system.

First, use the root user to log on and start the installation process.

1: Load Windows partitions containing this file in Linux,

Enter the following command:

"Mount-t vfat/dev/hadx/win98". "x" in hdax is the hard disk partition Number of Win98. If you have any questions, please consult other familiar friends.

2: In the downloaded directory, copy alsa-driver-0.5.9b.tar.bz2 and the other two files to a subdirectory,

Enter the following command:

"Cp alsa-driver-0.5.9 */root"

3: Decompress the file.

Enter the following command:

"Bzip2-dv alsa-driver-0.5.9b.tar.bz2"

When using the “ls”command, only alsa-driver-0.5.9b.tar is available in the front directory, indicating that bzip compression has been removed.

Enter the following command:

"Tar vfx alsa-driver-0.5.9b.tar"

The program automatically generates a subdirectory named --- alsa-driver-0.5.9b.

Repeat this step on the other two packages to uncompress. Run the "ls" command to view the directory.

If you are not familiar with the command line, you can view help information and books. You can also start the X-Window environment, select the corresponding compressed file in the file management program, and select the decompression command in the File menu.

3. Install the driver file.

1: enable sound card support in the kernel.

In most cases, this step can be ignored, because the default status of all Linux distributions supports sound card devices.

2: run the script.

Enter the following command:

"./Configure"

If your sound card belongs to the ISA plug-and-play type, enter the following command:

"./Configure -- with-isapnp = yes"

Enter the following command:

"Make install"

Note that this step takes a long time. Please wait. If everything is normal, the program will finally prompt that the module has been compiled successfully! It also warns that the default sound card status is mute. You need to use utilities such as amixer to adjust the volume.

The amixer-0.command is included with alsa-utils-0.5.9a.tar.bz2 and can be used only after compilation.

If the make command cannot be executed, you need to find the Linux installation disk and install the file packages related to development and compilation into the system. For more information, see the software manual.

Enter the following command:

"./Snddevices"

The script automatically creates a sound card device in the "/dev" directory.

4. Install the library files and utilities.

The corresponding library file can be compiled only after you find the corresponding library file, such as your amixer.pdf. First install alsa-lib-0.5.9.tar.bz2.

Go to the appropriate subdirectory alsa-lib-0.5.9,

Enter the following command:

"./Configure"

Enter the following command:

"Make install"

After these two steps are done, return to the upper directory, enter the alsa-utils-0.5.9a subdirectory,

Enter the following command:

"./Configure"

Enter the following command:

"Make install"

Note: If the "./configure" error occurs in the preceding step, you may need to use the "-prefix" parameter to specify the path.

For example, when installing the library file, try to use "./configure-prefix =/usr/include/linux"

When installing the utility, try "./configure-prefix =/usr/include/sys"

5. Edit the/etc/modules. conf file.

This step is probably the most difficult one. However, the following example is provided. Generally, you only need to change the configuration according to your system.

1: Create the modules. conf file.

Because there is a demo file in the system, you only need to copy it and modify it again.

Enter the following command:

"Cp modules. conf. sample modules. conf"

2: Modify modules. conf.

Open this file using any text editor, such as VI, and add the following content at the bottom:

"

# ALSA portion

Alias char-major-116 snd

# Note: main device number used by ALSA

Alias snd-card-0 snd-card-ymfpci

# Snd-card-0 is the first sound card device in the system, if the system has more than two sound cards,

# You can map using methods such as snd-card-1 snd-card-2

# Snd-card-ymfpci is the name of the sound card device.

# OSS/free portion ---- because ALSA requires support from OSS SoundCore and other devices in the kernel

Alias char-major-14 soundcore

# Main device Number of soundcore IN THE SYSTEM

Alias sound-slot-0 snd-card-0

# The slot corresponding to the first sound card

# The following is the sound card driver module. sound-service-0 indicates the first sound card. If there is only one sound card in the system, it will not be retained # copy it. Otherwise, add other sound card driver modules in this format.

# Card #1

Alias sound-service-0-0 snd-mixer-oss

Alias sound-service-0-1 snd-seq-oss

Alias sound-service-0-3 snd-pcm-oss

Alias sound-service-0-8 snd-seq-oss

Alias sound-service-0-12 snd-PCM-OSS

# You need to specify the IRQ/IO address for the ISA sound card, because there are very few on the market, so we will not discuss it here. Check if necessary

# Refer to the related description of this software.

"

6. system testing and sound card device adjustment.

1: After editing the/etc/modules. conf file, you need to use the system program to test whether the module can be loaded normally.

Enter the following command:

"Modprobe snd-card-ymfpci"

The system directly enters the prompt status, indicating that the loading is normal. However, if you cannot figure out which modules are loaded, you can view them under/lib/modules/2.2.13/Misc. The sound card modules can be loaded. With the module name, you can know what files you need.

2: adjust the volume.

Enter the following command:

"Amixer"

The command prompt is as follows:

"

Capabilities: volume

Channels: Front-left front-Right

Limits: min = 0, max = 16383

Front-left: 0 [0, 0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group ADC record, 0

Capabilities: volume

Channels: Front-left front-Right

Limits: min = 0, max = 16383

Front-left: 0 [0, 0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group capture volume, 0

Capabilities: volume

Channels: Front-left front-Right

Limits: min = 0, max = 16383

Front-left: 0 [0, 0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group input gain, 0

Capabilities: volume mute jointly-mute

Channels: Front-left front-Right

Limits: min = 0, max = 15

Front-left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group master mono, 0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-left front-Right

Limits: min = 0, max = 31

Front-left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Master, 0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Aux, 0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Video, 0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group CD, 0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Line, 0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group MIC, 0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [capture]

Front-Right: 0 [0%] [mute] [capture]

Group Phone, 0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group PC Speaker, 0

Capabilities: volume mute

Channels: Front-Left Front-Right

Limits: min = 0, max = 15

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group PCM, 0

Capabilities: volume mute jointly-mute

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

"

Source: first stop of Linux Chinese Resources

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.