linux音频alsa-uda134x驱动文档阅读之一转自http://blog.csdn.net/wantianpei/article/details/7817293

前言

目前,linux系统常用的音频驱动有两种形式:alsa oss 
alsa:现在是linux下音频驱动的主要形式,与简单的oss兼容。
oss:过去的形式
而我们板子上的uda1341用的就是alsa驱动。
alsa概述:
因为我们用的是板上系统,用的也是alsa 的一个soc子系统。所以我们直接讲解alsa soc子系统。

ALSA SoC Layer
ALSA板上系统层
==============

The overall project goal of the ALSA System on Chip (ASoC) layer is to
provide better ALSA support for embedded system-on-chip processors (e.g.
pxa2xx, au1x00, iMX, etc) and portable audio codecs.  Prior to the ASoC
subsystem there was some support in the kernel for SoC audio, however it
had some limitations:-
ALSA板上系统(ASoC)层的总体项目目标,是为对SOC嵌入式处理器和便携音频解码器提供更好的ALSA支持。在ASoC子系统之前,己有对内核的SoC音频支持,但是那些支持存在一些局限:
Codec drivers were often tightly coupled to the underlying SoC
    CPU. This is not ideal and leads to code duplication - for example,
    Linux had different wm8731 drivers for 4 different SoC platforms.
解码器常常与底层嵌入式处理器一对一紧密结合。这是非理想化的,因为这将导致代码的重复-例如,对四个不同的嵌入式平台,Linux要有不同的wm8731驱动。(理想的状态是我们可以只有一个wm8731的驱动代码,就可以对应于四个不同的处理器,但由上面说的,解码器-这里的wm8731与底层嵌入式处理器结合过于紧密,无法实现wm8731驱动代码的复用)

* There was no standard method to signal user initiated audio events (e.g.
    Headphone/Mic insertion, Headphone/Mic detection after an insertion
    event). These are quite common events on portable devices and often require
    machine specific code to re-route audio, enable amps, etc., after such an
    event.
没有一个标准的方法可以产生用户初始化音频事件的信号(即,耳机/麦克插入,响应插入事件的耳机/麦克探测)。这些在便携设备上都是十分常见的事件并且在这些事件之后经常需要机器相关的代码来对音频重设路径,开启放大器等。

* Drivers tended to power up the entire codec when playing (or
    recording) audio. This is fine for a PC, but tends to waste a lot of
    power on portable devices. There was also no support for saving
    power via changing codec oversampling rates, bias currents, etc.
放音(录音)时,驱动常常会打开整个解码器。对个人电脑来说这没什么问题,但是在便携设备上往往会导致电能的浪费。另外,也没有通过改变解码器采样率、偏置电流等方式来省电的支持。

ASoC Design
ASoC 设计
===========

The ASoC layer is designed to address these issues and provide the following
features :-
ASoC层被设计用来解决这些问题并提供如下特性:

* Codec independence. Allows reuse of codec drivers on other platforms
    and machines.
解码器独立。允许在其它平台或机器上重用解码器驱动。

* Easy I2S/PCM audio interface setup between codec and SoC. Each SoC
    interface and codec registers it‘s audio interface capabilities with the
    core and are subsequently matched and configured when the application
    hardware parameters are known.
解码器与SoC的I2S/PCM音频接口设置很容易。每个SoC接口与解码器都向ALSA核心注册它的音频接口能力,而且应用硬件参数己知时顺序匹配并配置。

* Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to
    its minimum power state at all times. This includes powering up/down
    internal power blocks depending on the internal codec audio routing and any
    active streams.
动态音频电源管理(DAPM)。DAPM自动无论何时,总是把解码器自动设置为它的最小电源状态。这包括依据内部解码音频线路和活跃的流来开启和关闭内部电源模块

* Pop and click reduction. Pops and clicks can be reduced by powering the
    codec up/down in the correct sequence (including using digital mute). ASoC
    signals the codec when to change power states.
咔嗒声减少。咔嗒声可以通过使用正确的解码器电源开启和关闭顺序而减少(包括使用数字消音)。ASoC在改变电源状态时向解码器发出信号。

* Machine specific controls: Allow machines to add controls to the sound card
    (e.g. volume control for speaker amplifier).
机器相关的控制:允许机器增加对声卡的控制。(如扬声器放大器的音量控制)。

To achieve all this, ASoC basically splits an embedded audio system into 3
components :-
要实现这些,ASoC基本上将嵌入式音频系统分为3个部分:

* Codec driver: The codec driver is platform independent and contains audio
    controls, audio interface capabilities, codec DAPM definition and codec IO
    functions.
解码器驱动:解码器驱动是平台无关的,包含音频控制、音频接口能力、解码器动态音频电源管理和解码器IO函数。

* Platform driver: The platform driver contains the audio DMA engine and audio
    interface drivers (e.g. I2S, AC97, PCM) for that platform.
平台驱动:平台驱动包含相应平台的音频DAM引擎和音频接口驱动(如I2S,AC97,PCM)

* Machine driver: The machine driver handles any machine specific controls and
    audio events (e.g. turning on an amp at start of playback).
机器驱动:机器驱动处理所有机器相关的控制和音频事件(如回放开始时打开放大器)。

Documentation
文档
=============

The documentation is spilt into the following sections:-
本文档分成如下部分:

overview.txt: This file.
overview.txt:概述,本文件。
codec.txt: Codec driver internals.
codec.txt:解码器驱动内部实现

DAI.txt: Description of Digital Audio Interface standards and how to configure
a DAI within your codec and CPU DAI drivers.
DAI.txt:对数字音频接口(DAI)标准和如何配置你的解码器和CPU的数字音频接品驱动中的数字音频接口的描述。

dapm.txt: Dynamic Audio Power Management
dapm.txt:动态音频电源管理

platform.txt: Platform audio DMA and DAI.
platform.txt:平台音频DMA和DAI。

machine.txt: Machine driver internals.
machine.txt:机器驱动内容介绍。

pop_clicks.txt: How to minimise audio artifacts.
pop_clicks.txt:如何最小化音步噪声。

clocking.txt: ASoC clocking for best power performance.
clocking.txt:最佳电源表现下的ASoC时钟

时间: 2024-08-29 21:30:43

linux音频alsa-uda134x驱动文档阅读之一转自http://blog.csdn.net/wantianpei/article/details/7817293的相关文章

Android音频系统之音频框架(转http://blog.csdn.net/uiop78uiop78/article/details/8796492)

1.1 音频框架 转载请注明,From LXS, http://blog.csdn.net/uiop78uiop78/article/details/8796492 Android的音频系统在很长一段时间内都是外界诟病的焦点.的确,早期的Android系统在音频处理上相比于IOS有一定的差距,这也是很多专业的 音乐播放软件开发商没有推出Android平台产品的一个重要原因.但这并不代表它的音频框架一无是处,相反,基于Linux系统的Android平台有 很多值得我们学习的地方. 1.1.1 Li

Linux下socket编程(转载自http://blog.csdn.net/hguisu/article/details/7445768/)

Linux的SOCKET编程详解 1. 网络中进程之间如何通信 进 程通信的概念最初来源于单机系统.由于每个进程都在自己的地址范围内运行,为保证两个相互通信的进 程之间既互不干扰又协调一致工作,操作系统为进程通信提供了相应设施,如 UNIX BSD有:管道(pipe).命名管道(named pipe)软中断信号(signal) UNIX system V有:消息(message).共享存储区(shared memory)和信号量(semaphore)等. 他们都仅限于用在本机进程之间通信.网间进

Linux进程状态(ps stat)之R、S、D、T、Z、X 转:http://blog.csdn.net/huzia/article/details/18946491

Linux是一个多用户,多任务的系统,可以同时运行多个用户的多个程序,就必然会产生很多的进程,而每个进程会有不同的状态. Linux进程状态:R (TASK_RUNNING),可执行状态. 只有在该状态的进程才可能在CPU上运行.而同一时刻可能有多个进程处于可执行状态,这些进程的task_struct结构(进程控制块)被放入对应CPU的可执行队列中(一个进程最多只能出现在一个CPU的可执行队列中).进程调度器的任务就是从各个CPU的可执行队列中分别选择一个进程在该CPU上运行. 很多操作系统教科

linux设备模型详解 http://blog.csdn.net/linux_xiaomugua/article/details/6989386

http://blog.csdn.net/linux_xiaomugua/article/details/6989386 1. Sysfs文件系统 2. 内核对象机制关键数据结构 2.1 kobject内核对象 2.2 kset内核对象集合 2.3 subsystem内核对象子系统 3. 内核对象机制主要相关函数 3.1 kobject相关函数 3.2 kset相关函数 3.3 subsystem相关函数 4. 设备模型组件 4.1 devices 4.2 drivers 4.3 buses 4

linux下各种格式软件的安装(引用http://blog.csdn.net/zyz511919766/article/details/7574040)

首先介绍两个简单的方式 第一:sudo apt-get install packagename 命令 如果我们知道我们要安装的软件的确切的名称,那么我们可以简单的通过此条命令来获取和安装软件.apt-get是一条linux命令,适用于deb 包管理式的操作系统,如ubuntu,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸载软件.apt-get命令一般需要root执行,所以一般 跟着sudo命令. 一些常用的apt命令参数(更具体的可参见相关的帮助文档): apt-cache search

H5学习系列之文件读取API--本文转自http://blog.csdn.net/jackfrued/article/details/8967667

HTML5定义了FileReader作为文件API的重要成员用于读取文件,根据W3C的定义,FileReader接口提供了读取文件的方法和包含读取结果的事件模型. FileReader的使用方式非常简单,可以按照如下步骤创建FileReader对象并调用其方法: 1.检测浏览器对FileReader的支持 if(window.FileReader) { var fr = new FileReader(); // add your code here } else { alert("Not sup

Linux下/proc目录简介(文章来源于http://blog.csdn.net/zdwzzu2006/article/details/7747977)

1. /proc目录 Linux 内核提供了一种通过 /proc 文件系统,在运行时访问内核内部数据结构.改变内核设置的机制.proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间.它以文件系统的方式为访问系统内核数据的操作提供接口. 用户和应用程序可以通过 proc得到系统的信息,并可以改变内核的某些参数.由于系统的信息,如进程,是动态改变的,所以用户或应用程序读取proc文件时,proc文件系统是 动态从系统内核读出所需信息并提交的.下面列出的这些文件或子文件夹,并不是都是在你

linux下kill进程的N中方式(来源:http://blog.csdn.net/andy572633/article/details/7211546,请支持原创)

常规篇: 首先,用ps查看进程,方法如下: $ ps -ef ……smx       1822     1  0 11:38 ?        00:00:49 gnome-terminalsmx       1823  1822  0 11:38 ?        00:00:00 gnome-pty-helpersmx       1824  1822  0 11:38 pts/0    00:00:02 bashsmx       1827     1  4 11:38 ?       

linux上Kettle定时执行(转换的单步执行,job的单步执行,环境变量,kettle定时功能,效率问题等)转自(http://blog.csdn.net/feng19821209/article/details/5800960)

1,Kettle跨平台使用.    例如:在AIX下(AIX是IBM商用UNIX操作系统,此处在LINUX/UNIX同样适用),运行Kettle的相关步骤如下:    1)进入到Kettle部署的路径    2)执行 chmod *.sh,将所有shell文件添加可执行权限    3)在Kettle路径下,如果要执行transformation,就运行./pan.sh -file=?.ktr -debug=debug -log=log.log    其中.-file说明你要运行的transfor