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时钟
linux音频alsa-uda134x驱动文档阅读之一转自http://blog.csdn.net/wantianpei/article/details/7817293的更多相关文章
- Linux下nf_conntrack(最全面)_董明磊-CSDN博客_nf_conntrack https://blog.csdn.net/qq_35299863/article/details/79530732
Linux下nf_conntrack(最全面)_董明磊-CSDN博客_nf_conntrack https://blog.csdn.net/qq_35299863/article/details/79 ...
- linux下各种格式软件的安装(引用http://blog.csdn.net/zyz511919766/article/details/7574040)
首先介绍两个简单的方式 第一:sudo apt-get install packagename 命令 如果我们知道我们要安装的软件的确切的名称,那么我们可以简单的通过此条命令来获取和安装软件.apt- ...
- H5学习系列之文件读取API--本文转自http://blog.csdn.net/jackfrued/article/details/8967667
HTML5定义了FileReader作为文件API的重要成员用于读取文件,根据W3C的定义,FileReader接口提供了读取文件的方法和包含读取结果的事件模型. FileReader的使用方式非常简 ...
- linux initcall 介绍 (转自http://blog.csdn.net/fenzhikeji/article/details/6860143)
现在以module_init为例分析initcall在内核中的调用顺序 在头文件init.h中,有如下定义: #define module_init(x) __initcall(x); 很明显 ...
- linux dentry cache 转自:http://blog.csdn.net/denzilxu/article/details/9188003
Linux dentry cache学习 每个dentry对象都属于下列几种状态之一: (1)未使用(unused)状态:该dentry对象的引用计数d_count的值为0,但其d_inode指针仍然 ...
- linux上Kettle定时执行(转换的单步执行,job的单步执行,环境变量,kettle定时功能,效率问题等)转自(http://blog.csdn.net/feng19821209/article/details/5800960)
1,Kettle跨平台使用. 例如:在AIX下(AIX是IBM商用UNIX操作系统,此处在LINUX/UNIX同样适用),运行Kettle的相关步骤如下: 1)进入到Kettle部署的路径 ...
- linux安装tomcat(转载:http://blog.csdn.net/zhuihunmiling/article/details/8977387)
在安装Tomcat之前需要安装j2sdk(Java 2 Software Development Kit),也就是JDK 1.安装JDK完毕. 2.安装Tomcat 1)下载apache-tomcat ...
- GDAL中文件的驱动及对应的文件格式(转) https://blog.csdn.net/haojknm/article/details/5851968
GDALDriver * poDriver; char *pszFormat=GetOutimgInfo(m_strInput); poDriver = GetGDALDriverManager()- ...
- linux进程监控和简单的重启&服务的创建 参考自http://blog.csdn.net/lockheed_hong/article/details/73549837
脚本文件 该脚本实现了一个检测进程是否存在,不存在的情况下重启进程并且记录日志. #! /bin/sh proc_name="console/queue/gift.php" # 进 ...
随机推荐
- php 关于文件夹的一些封装好的函数
/** *检测文件名是否合法 * @param string $filename * @return boolean */ function checkFilename($filename){ $pa ...
- 自平衡二叉(查找树/搜索树/排序树) binary search tree
在计算机科学中,AVL树是最先发明的自平衡二叉查找树.AVL树得名于它的发明者 G.M. Adelson-Velsky 和 E.M. Landis,他们在 1962 年的论文 "An alg ...
- BZOJ2876 [Noi2012]骑行川藏 【拉格朗日乘数法】
题目链接 BZOJ 题解 拉格朗日乘数法 拉格朗日乘数法用以求多元函数在约束下的极值 我们设多元函数\(f(x_1,x_2,x_3,\dots,x_n)\) 以及限制\(g(x_1,x_2,x_3,\ ...
- 洛谷 P4279 [SHOI2008]小约翰的游戏 解题报告
P4279 [SHOI2008]小约翰的游戏 题目描述 小约翰经常和他的哥哥玩一个非常有趣的游戏:桌子上有\(n\)堆石子,小约翰和他的哥哥轮流取石子,每个人取的时候,可以随意选择一堆石子,在这堆石子 ...
- Idea的Maven使用
使用SSM(Spring,SpringMVC和Mybatis) 1.1.Spring Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johns ...
- js 弹出新页面,避免被浏览器、ad拦截的一种办法
以绑定click弹窗的方式,改为普通的链接,即 a[target=_blank],在点击打开新窗口之前,修改其href. 绑定mousedown,鼠标点击执行完成前修改href. 绑定focus,保证 ...
- 解题:WC 2007 石头剪刀布
题面 要我们把边定向,最大化留下来的三元环数目......并不能直接做,考虑容斥,去掉不合法的数目. 那么三个点不成环当且仅当有一个点出度为2一个点入度为2,发现最终答案就是$C_n^3-\sum C ...
- 三、java面向对象编程_1
目录 一.对象和类的概念 二.对象和引用 1.对象 2.成员变量 3.引用 三.java类的定义 四.构造函数(构造方法) 五.内存分析 一.对象和类的概念 1.对象 对象用计算机语言对应问题域中事物 ...
- NAT ------ 为什么手动设置NAT端口映射(转发)不成功,导致访问不了局域网服务器
手动设置端口映射成功的条件是路由器WAN口接的是外网IP,而不是网络提供商的路由器NAT之后的IP.假如有个外网的客户端,连的服务器IP一定要是外网IP(假设IP_A),如果自己的路由器WAN口接的是 ...
- 【Asp.net入门3-03】jQuery-选择元素
练习:使用jQuery实现一个可以给table增加.删除行的页面 HTML代码: <body> <input type="button" value=" ...