免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1441 | 回复: 0
打印 上一主题 下一主题

linux音频alsa-uda134x驱动文档阅读之八(平台驱动) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-23 11:11 |只看该作者 |倒序浏览
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
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP