Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1297417
  • 博文数量: 860
  • 博客积分: 425
  • 博客等级: 下士
  • 技术积分: 1464
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-20 19:57
个人简介

对技术执着

文章分类

全部博文(860)

文章存档

2019年(16)

2018年(12)

2015年(732)

2013年(85)

2012年(15)

我的朋友

分类: LINUX

2015-03-14 16:22:57

ASoC Platform Driver
ASoC平台驱动
====================

An ASoC platform driver can be divided into audio DMA and SoC DAI configuration
and control. The platform drivers only target the SoC CPU and must have no board
specific code.
一个ASoC平台驱动可以分为音频DAM和SoC DAI配置和控制。平台驱动只锁定平台处理器为目标,必须不包含任何板级相关代码

Audio DMA
音频DMA
=========

The platform DMA driver optionally supports the following ALSA operations:-
平台DMA驱动可以选择性地支持下面的ALSA操作:

/* SoC audio ops */
struct snd_soc_ops {
    int (*startup)(struct snd_pcm_substream *);
    void (*shutdown)(struct snd_pcm_substream *);
    int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
    int (*hw_free)(struct snd_pcm_substream *);
    int (*prepare)(struct snd_pcm_substream *);
    int (*trigger)(struct snd_pcm_substream *, int);
};

The platform driver exports its DMA functionality via struct snd_soc_platform:-
平台驱动通过snd_doc_platform结构导出其DAM功能

struct snd_soc_platform {
    char *name;

    int (*probe)(struct platform_device *pdev);
    int (*remove)(struct platform_device *pdev);
    int (*suspend)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);
    int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);

    /* pcm creation and destruction */
    int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *);
    void (*pcm_free)(struct snd_pcm *);

    /* platform stream ops */
    struct snd_pcm_ops *pcm_ops;
};

Please refer to the ALSA driver documentation for details of audio DMA.
请参考ALSA驱动文档以更加详尽地了解音频DMA。
~iwai/writing-an-alsa-driver/c436.htm

An example DMA driver is soc/pxa/pxa2xx-pcm.c
DMA驱动的一个例子:soc/pxa/pxa2xx-pcm.c

SoC DAI Drivers
板级DAI驱动
===============

Each SoC DAI driver must provide the following features:-
每个SoC DAI驱动都必须提供如下性能:

1) Digital audio interface (DAI) description
1)数字音频接口描述
2) Digital audio interface configuration
2)数字音频接口配置
3) PCM's description
3)PCM描述
4) SYSCLK configuration
4)系统时钟配置
5) Suspend and resume (optional)
5)挂起和恢复(可选的)

Please see codec.txt for a description of items 1 - 4.
对1-4项的描述请见codec.txt
君子注:
您现在所阅读的,是君子阅读Linux音频SoC驱动时,写下的文档译文。
君子写些译文,一方面是作为自己的笔记,帮助记忆,另一方面也希望能对他人有所帮助。
如果您能于君子的译文中有所收获,则吾心甚慰。
所有这几个文档原文,是见于linux-2.6.30/Documentation/sound/alsa/soc目录下的全部内容。
由于君子对音频方面的内容了解也不多,很多地方我自己也不理解,只是照着原文生硬的译出来。
其中错误愿来来访者之宾不吝指正。
张君再拜.
下面是所有九篇译文的详细网址,希望能对大家有用:

  1. linux音频alsa-uda134x驱动文档阅读之一(over-view)

  2. linux音频alsa-uda134x驱动文档阅读之二(时钟)

  3. linux音频alsa-uda134x驱动文档阅读之三(解码器)

  4. linux音频alsa-uda134x驱动文档阅读之四(数字音频接口)

  5. linux音频alsa-uda134x驱动文档阅读之五(动态音频电源管理)

  6. linux音频alsa-uda134x驱动文档阅读之六(插口)

  7. linux音频alsa-uda134x驱动文档阅读之七(机器驱动)

  8. linux音频alsa-uda134x驱动文档阅读之八(平台驱动)

  9. linux音频alsa-uda134x驱动文档阅读之九(咔咔声)

阅读(215) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~