原文地址:linux音频alsa-uda134x驱动分析之一(over-view) 作者:nearfuture_qinyaomin


前言

目前,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.

平台驱动:平台驱动包含相应平台的音频DMA引擎和音频接口驱动(如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驱动分析之一(over-view)相关推荐

  1. linux下usb转串口驱动分析

    linux下usb转串口驱动分析 分类: linux driver 2012-06-08 15:11 456人阅读 评论(0) 收藏 举报 linux struct interface returni ...

  2. linux pl320 mbox控制器驱动分析-(3) pl320驱动代码分析

    linux pl320 mbox控制器驱动分析-(3)pl320驱动代码分析 1 pl320 mbox控制器宏定义 2 初始化接口 3 ipc_handler mbox中断处理函数 4 数据的收发 4 ...

  3. linux pl320 mbox控制器驱动分析 - (1) pl320手册分析

    linux pl320 mbox控制器驱动分析 1 pl320简介 1.1 pl320用途 1.2 pl320 IPCM 由以下部分组成: 1.3 pl320 IPCM可配置的参数 1.4 功能操作 ...

  4. Linux USB 3.0驱动分析—UAC驱动分析

    转自 https://www.cnblogs.com/wen123456/p/14281917.html 因为项目里面有USB音频外设,所以需要分析一下UAC驱动. USB Audio Class,U ...

  5. linux内核SPI总线驱动分析(一)

    下面有两个大的模块: 一个是SPI总线驱动的分析            (研究了具体实现的过程) 另一个是SPI总线驱动的编写(不用研究具体的实现过程) SPI总线驱动分析   1 SPI概述     ...

  6. linux 串口驱动 atmel_set_mctrl何时调用,linux uart serial使用驱动分析

    uart tty serial 驱动分析 内核版本3.14.23 以atmel为例: 起点: static int __init atmel_serial_init(void) { int ret; ...

  7. cmd52命令发送 mmc_乾坤合一~Linux SD/MMC/SDIO驱动分析(上)

    一.SD/MMC/SDIO概念区分 SD(SecureDigital)与 MMC(MultimediaCard) SD 是一种 flash memory card 的标准,也就是一般常见的 SD 记忆 ...

  8. linux查询引脚功能复用,linux pinmux 引脚多路复用驱动分析与使用

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/code_style/article/d ...

  9. linux下矩阵键盘设备名,Linux下矩阵键盘驱动分析与移植

    Post Views: 1,598 首先要介绍一下Linux中input子系统的模型,一图胜千言,所以直接上图. 上图一目了然,我们的键盘驱动就是工作在input子系统的最低层.单纯地从驱动角度讲,我 ...

  10. cmd52命令发送 mmc_[MMC]Linux MMC/SD/SDIO驱动分析

    1.SD卡命令组成 SD卡的指令由6字节(Byte)组成,如下: Byte1:0 1 x x x x x x(命令号,由指令标志定义,如CMD39为100111即16进制0x27,那么完整的CMD39 ...

最新文章

  1. Shell 定时清理小脚本
  2. 基于STM32F103双轴机械臂完整电路板设计
  3. 你真的会二分查找吗?
  4. Python深度学习之搭建小型卷积神经网络(Kaggle网站Dogs-vs-Cats数据集)
  5. 升级.Net Core RC1的类库项目
  6. framebuffer驱动详解2——framebuffer驱动框架分析
  7. Android 性能优化---(8)APP启动时间优化指南
  8. 实验代做 行人识别_《行人跨模态重识别 | 双向限制的排序损失》
  9. 利用WinSock进行有连接的通信
  10. android之uniapp自定义基座
  11. create session 参数介绍
  12. 【转】乐观锁和悲观锁的区别
  13. 高清图片免费下载网站
  14. 搭建 Vue 开发环境
  15. Swift 之横竖屏切换
  16. python+vue+django高校教职工人事档案管理系统
  17. 麻省理工学院(MIT)发明漏洞自动修复系统
  18. Day4-STM32的中断与通信——百问网7天物联网智能家居
  19. 治愈系英语笔记-1-特殊疑问句
  20. 【ES】Elasticsearch的特点优点 为什么比MySQL快?

热门文章

  1. 15套前端经典实战项目大合集,小白练手必备实战项目
  2. java随机点名器_基于JavaScript实现随机点名器
  3. BinaryViewer(二进制查看器)使用教程(附下载)
  4. MYSQL数据库脱库写马写一句话
  5. 推荐一份完整的python教学视频
  6. dev万能头文件_超级好用的C++万能头文件
  7. 本地邮件服务器 易邮 使用
  8. 最新全套Web前端视频教程
  9. Win7 旗舰版 SP1环境下安装ArcGIS Pro 2.5
  10. cad画圆如何确定圆心_CAD如何利用对象捕捉追踪功能来确定小圆圆心以及矩形的角点位置...