The process of using ALSA to drive sound card in Linux

Source: Internet
Author: User
Tags dmesg linux

First, what is ALSA;

Advanced Linux Sound architecture abbreviation for ALSA, translated into Chinese meaning is the Linux Advanced Sound system (this is my literal translation, may be incorrect); when it comes to the system, it's a bit too much, so ALSA not only includes support and drive for sound cards. ;

ALSA has the following characteristics:

Code:

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 sufficient;

Second, on the hardware driven by the necessary foundation;

1, how to view the hardware chip;

In the Linux operating system, all hardware is based on the chipset to differentiate, the brand is not the most important; the hardware's most important identification is the chipset; So when you ask for help in the discussion area, just say the hardware brand, but do not provide chipset, we can not help you, remember;

We look at the hardware chipset is the command is lspci-v or DMESG, because the DMESG output of the information is not too much intuitive, so often used or lspci-v, can also be obtained by Lshal, the most convenient or lspci-v, beginners or lspci-v A little better;

Code:

[Root@localhost beinan]# Lspci-v

After we run lspci-v, if you look at the sound card chipset, the DAC has a section similar to the following;

  [root@localhost beinan]# lspci -v
Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
AC'97 Audio Controller (rev 03)
 Subsystem: Hewlett-Packard Company: Unknown device 3080
     Flags: bus master, medium devsel, latency 0, IRQ 5
     I/O ports at 1c00 size=256
     I/O ports at 18c0 size=64
     Memory at e0100c00 (32-bit, non-prefetchable) size=512
     Memory at e0100800 (32-bit, non-prefetchable) size=256
     Capabilities: [50] Power Management version 2

2, the system kernel version;

[Root@localhost beinan]# uname-r-m-p-I.

2.6.11-1.1369_FC4 i686 i686 i386

The above represents the kernel version of the system, the processor architecture, and so on;

Tip: If you compile the kernel yourself, you also have to install Kernel-devel (or Kernel-source), which is in the system CD or image file, if you want to download the kernel by yourself, compile it yourself, and then drive the sound card, you can also kernel.org Download the latest kernel source code;

Under normal circumstances, if the system's default kernel does not drive the sound card, most of them have to replace the kernel, we recommend that you upgrade the kernel and source code from the upgrade package provided by the release; For example, Fedora's extended project package is updated very quickly, and we can upgrade it via apt and yum; when new kernel is enabled , we do not recommend that you delete the old kernel, because now fedora/redhat introduce apt and yum update tools, the integrity of the system is extremely important; if the system is compromised, it becomes extremely difficult to use the Update tool;

For example, Fedora's apt and yum upgrade of the kernel can not solve your problem, we may need to download the kernel through the kernel.org to compile, but also can not delete the previous kernel package and source package; one is for security, after all, our own compilation of the kernel is not absolutely successful In addition, the system has its own kernel and source-code package by the system many software dependencies; apt and Yum every time the package is updated to check the integrity of the system;

For some distributions, you can download the latest kernel from the kernel.org directly, or you may not be able to solve your problem if you compile from the kernel source code (kernel-devel or Kernel-source) provided by the system;

3, the content of modprobe.conf;

In Fedora Core 4.0, the Add or define alias for the kernel module is in the/etc/modprobe.conf file; in other versions it may be modules.conf; if there is modprobe.conf in your system, we will use this file as a standard. Different distributions have different definition files, such as Slackware is defined in the/etc/modules.conf, but also in the/etc/rc.d/rc.modules to open the relevant driver module;

Modprobe.conf or module.conf is the system has loaded the corresponding configuration of the module, such as the setting of aliases, and so on, which are usually automatically generated from the tool, we can also view the hardware documents and sites, can also add their own. Why do you add that instead of that? I also do not understand, because the other people's documents say, I will not develop, if understand the development, may understand, please understand me;

For example, I use 855 of the motherboard, the system is driven by snd-intel8x0, in the/etc/modprobe.conf configuration is the following content; The following section is generated automatically by the Alsaconf Configuration tool;

alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0
remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0

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.