alsa 内核文档之——platform.txt

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 noboard
specific code.
一个ASoC平台驱动可以分为音频DAMSoC DAI配置和控制。平台驱动只锁定平台处理器为目标,必须不包含任何板级相关代码

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

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

/* SoC audio ops */
struct snd_pcm_ops {
    int (*startup)(struct snd_pcm_substream *);
    void (*shutdown)(struct snd_pcm_substream *);
    int (*hw_params)(struct snd_pcm_substream *, structsnd_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, structsnd_soc_cpu_dai *cpu_dai);
    int (*resume)(struct platform_device *pdev, structsnd_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
http://www.alsa-project.org/~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
3PCM描述
4) SYSCLK configuration
4)系统时钟配置
5) Suspend and resume (optional)
5)挂起和恢复(可选的)

Please see codec.txt for a description of items 1 - 4.
14项的描述请见codec.txt


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值