- 论坛徽章:
- 0
|
ASoC Platform Driver
[color="Red"]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.
[color="Red"]一个ASoC平台驱动可以分为音频DAM和SoC DAI配置和控制。平台驱动只锁定平台处理器为目标,必须不包含任何板级相关代码。
Audio DMA
[color="Red"]音频DMA
=========
The platform DMA driver optionally supports the following ALSA operations:-
[color="Red"]平台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:-
[color="Red"]平台驱动通过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.
[color="Red"]请参考ALSA驱动文档以更加详尽地了解音频DMA。
http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm
An example DMA driver is soc/pxa/pxa2xx-pcm.c
[color="Red"]DMA驱动的一个例子:soc/pxa/pxa2xx-pcm.c
SoC DAI Drivers
[color="Red"]板级DAI驱动
===============
Each SoC DAI driver must provide the following features:-
[color="Red"]每个SoC DAI驱动都必须提供如下性能:
1) Digital audio interface (DAI) description
[color="Red"]1)数字音频接口描述
2) Digital audio interface configuration
[color="Red"]2)数字音频接口配置
3) PCM's description
[color="Red"]3)PCM描述
4) SYSCLK configuration
[color="Red"]4)系统时钟配置
5) Suspend and resume (optional)
[color="Red"]5)挂起和恢复(可选的)
Please see codec.txt for a description of items 1 - 4.
[color="Red"]对1-4项的描述请见codec.txt
君子注:
您现在所阅读的,是君子阅读Linux音频SoC驱动时,写下的文档译文。
君子写些译文,一方面是作为自己的笔记,帮助记忆,另一方面也希望能对他人有所帮助。
如果您能于君子的译文中有所收获,则吾心甚慰。
所有这几个文档原文,是见于linux-2.6.30/Documentation/sound/alsa/soc目录下的全部内容。
由于君子对音频方面的内容了解也不多,很多地方我自己也不理解,只是照着原文生硬的译出来。
其中错误愿来来访者之宾不吝指正。
张君再拜.
下面是所有九篇译文的详细网址,希望能对大家有用:
linux音频alsa-uda134x驱动文档阅读之一(over-view)
linux音频alsa-uda134x驱动文档阅读之二(时钟)
linux音频alsa-uda134x驱动文档阅读之三(解码器)
linux音频alsa-uda134x驱动文档阅读之四(数字音频接口)
linux音频alsa-uda134x驱动文档阅读之五(动态音频电源管理)
linux音频alsa-uda134x驱动文档阅读之六(插口)
linux音频alsa-uda134x驱动文档阅读之七(机器驱动)
linux音频alsa-uda134x驱动文档阅读之八(平台驱动)
linux音频alsa-uda134x驱动文档阅读之九(咔咔声)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/106614/showart_2100940.html |
|