Article Title: Detailed description of how to use ALSA to drive the sound card in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. What is ALSA;
Advanced Linux Sound Architecture is short for "ALSA", which means the
Sndrv_dev_jack ((__force snd_device_type_t) 0x1009)
#define Sndrv_dev_lowlevel ((__force snd_device_type_t) 0x2000)
In general, we are more concerned with both the PCM and control devices.Three. Driver-driven code file structureIn the Linux2.6 code tree, the ALSA code file structure is as follows:Sound/core/oss/seq/ioctl32/include/drivers/i2c/synth/emux/pci/(Cards)/isa/(Cards)/arm/ppc/sparc/usb/pcmcia/(cards)/oss/soc/codecs
Core This direc
has 6 devices mounted. According to the actual capacity of the Sound Card, more types of devices can be mounted to the driver, in the include/sound/core. h defines the following device types:
# Definesndrc v_dev_toplevel (_ force snd_device_type_t) 0)
Generally, we are more concerned with PCM and control devices.
3. Driver
Code File structure
In the linux2.6 code tree, the structure of the Alsa code file is as follows:
Sound/Core/OSS/Seq/Ioct
sndrv_dev_jack (_ force snd_device_type_t) 0x1009)
# Define sndrv_dev_lowlevel (_ force snd_device_type_t) 0x2000)
Generally, we are more concerned with PCM and control devices.
3. Driver
Code File structure
In the linux2.6 code tree, the structure of the Alsa code file is as follows:
Sound/Core/OSS/Seq/Ioctl32/Include/Drivers/I2C/Synth/Emux/PCI/(CARDS)/Isa/(CARDS)/ARM/PPC/ISCSI/USB/PCMCIA/(CARDS)/OSS/SOC/Codecs
Core this directory con
People who have done the system should know that there is a layer of lib between the framework and the driver, and the corresponding LIB libraries in the audio framework and some tool alsa-libalsa-utils are shown below.
Alsa-lib for Arm:
>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>> #!/bin/bash echo "Building ALSA library for ARM platform .
1. layer-3 structure of ALSA:(1) audio interface:The audio interface is the sound card, which contains the hardware buffer. Note that the hardware buffer is in the sound card, not the memory.(2) COMPUTER:This refers to the computer kernel and driver (the driver is provided by ALSA). When (1) Audio interfacce causes an interruption, the kernel will capture it and then hand over the processing to
There is a good article about ALSA's configuration file.
Thanks to the original.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Understand and use the ALSA configuration file
Author: Liu Xuhui Raymond Reprint please indicate the source http://blog.csdn.net/colorant/archive/2008/06/30/2598815.aspx
Email:colorant@163.com
blog:http://blog.csdn.net/colorant/
Home: http://rgbbones.googlepages.com/
Recently in making audio-r
command-line-based toolsets, such as mixer (mixer), audio file player (Aplay), and tools to control specific properties of specific sound cards.ALSA ArchitectureThe ALSA API can be decomposed into several main interfaces:1 Control Interface: Provides common functionality for managing the sound card registration and requesting available devices2 PCM Interface: manages digital audio playback (playback) and recording (capture) interfaces. The following
Problems with porting alsa-lib: Problems with porting alsa-lib
Problems with porting alsa-lib
Linux audio alsa lib VERSIONED_SYMBOLS
During the migration of alsa lib in the past two days, I encountered a problem and was stuck for a long time.Make a record and be trapped by t
audio file player (Aplay), and a tool that controls specific properties of a particular sound card.Five, ALSA architecture
The ALSA API can be decomposed into the following key interfaces:
1 Control Interface: Provides common functions for managing sound card registration and requesting available devices
2 PCM interface: an interface for managing digital audio playback (playback) and recording (capture). T
*************************************************************************************************************** ************Easywave Time: 2014.10.25Category: Linux application-alsa audio architecture Alsa-lib porting to compilation declaration: reprint, please keep the linkNote: If there is an error, please correct me. These are the journal articles I studied ...********************************************
Under the root file system, the ALSA related configuration files are:
Under the/system/usr/share/alsa directory:
├──alsa.conf├──cards│└──aliases.conf└──pcm├──center_lfe.conf├──default.conf├──dmix.conf├──dpl.conf├──dsn Oop.conf├──front.conf├──iec958.conf├──modem.conf├──rear.conf├──side.conf├──surround40.conf├──surround41.conf ├──surround50.conf├──surround51.conf└──surround71.conf
And
/system/etc/asound.state
and control devices.
Three. Driver code file structure
In the Linux2.6 code tree, the code file structure of ALSA is as follows:
Sound/core/oss/seq/ioctl32/include/drivers/i2c/synth/emux/pci/(Cards)/isa/(Cards)/arm/ppc/sparc/usb/pcmcia/(cards)/oss/soc / Codecs core This directory contains a ALSA-driven middle tier , it is the core part of the entire ALSA drive
is too complex for this purpose.PCI directory, mainly for PCI sound cards on PCI busISA directory, primarily for ISA sound cards on the ISA busARM, PPC, and SPARC directories, some sound card drivers under these architectures, such as the PXA2XX-PCM.C PXA processorUSB Directory, Usb-audio driverPcmciaOSS directory, OSS architecture files, not belonging to Alsa 2.2 InterfaceAlsa kernel mainly provides the following interfaces for the upper layer:The 1
2011-06-24 17:35:58
The Alsa Utils below Android offers three tools, respectively:Alsa_amixer: ConfiguringAlsa_aplay: Play RecordingAlsa_ctl:: Store/restore configuration file, related to asound.conf
Detailed parameters can be viewed through alsa_xxx--help
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"Alsa_amixer"/$ alsa_amixer--help usage:amixer
"Use Method"
Alsa_amixer controls: Lists all the control interfaces registered in t
Original http://www.volkerschatz.com/noise/alsa.html
Intro
If anyone often uses a Linux machine to process music, he will deal with ALSA sooner or later. ALSA, short for advanced Linux sound architecture, is more powerful than the outdated Open Sound System (OSS. In fact, you may have unknowingly used ALSA, such as the OSS simulation function of
Porting ALSA audio library
Category: Linux Embedded driver development ()
5244 reading comments (1)
Favorites
Report
Playbackaudio embedded test linuxtimer
Andrew Huang
Bluedrum@163.comALSA is a late audio processing library in Linux, which is mainly used to improve the original OSS library. better performance, supporting multiple playback sources, etc. but correspondingly, the programming complexity is increased. the old OSS uses the standard file I
Snd_register_device_for_dev () Parameters passed in by function
(2) the Snd_register_device_for_dev () function is called by the Snd_pcm_dev_register () function
The str parameter inside is exactly the name parameter, below has PCMC%ID%IP and pcmc%id%ic,c to indicate card's meaning,%i indicates which sound card, d indicates which one is under which logic device, p means play, C means recording
9, summary (how to write Alsa sound card driver)
(1)
The control interface allows the user space application (ALSA-Lib) to access and control multiple switches and sliding controls in the Audio Codec Chip.
We need to actively call the snd_pcm_new () function to create the PCM device during driver initialization, while the control device is created in snd_card_create,
Snd_card_create () creates a control device node by calling the snd_ctl_create () function. Therefore, you do not need to create a contro
I. Introduction
The ALSA standard is an advanced Linux sound system. It contains kernel-driven collections, API libraries, and tools to support Linux sounds. The ALSA contains a series of kernel-driven support for different sound cards, as well as an API library for Libasound. Using these to write a program does not need to open the device and so on, so programmers in the writing process will not be bother
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.