struct snd_soc_dai_link *dai_link; // 核心单元,一个黏结器,黏结了cpu内部音频控制器接口和arm开发板中cpu外置音频解码芯片通信接口 int num_links; }; /* SoC machine DAI configuration, glues a codec and cpu DAI together */ struct snd_soc_dai_link { // 当然就是指该SoC芯片的DAI接口链接了,...
struct snd_soc_dai_link *dai_link; // 核心单元,一个黏结器,黏结了cpu内部音频控制器接口和arm开发板中cpu外置音频解码芯片通信接口 int num_links; }; /* SoC machine DAI configuration, glues a codec and cpu DAI together */ struct snd_soc_dai_link { // 当然就是指该SoC芯片的DAI接口链接了,...
-->soc_bind_dai_link// 为每个dai link查找 相应的DAI实例(component_list)、codec DAI实例(component_list)、platform 实例(platform_list)、codec实例-->snd_card_new// 向ALSA注册sound card-->snd_soc_dapm_new_controls// 注册machine级别的 widgets-->structsnd_soc_card->probe()函数 -->soc_probe...
snd_soc_dapm_route用于配置音频信号的路由,包括输入和输出路径等。我们需要配置snd_soc_dapm_route以确保音频数据正确传输。 ```c static struct snd_soc_dapm_route my_routes[] = { { "Capture", NULL, "MY_DAI", 0 }, { "MY_DAI", NULL, "Playback", 0 }, // 其他路由配置 }; ``` ###...
structsnd_soc_dai_ops接⼝介绍 CPU DAI和codec DAI 驱动⽤结构体 struct snd_soc_dai_driver描述,其字段ops的类型是 struct snd_soc_dai_ops,定义了DAI驱动的操作接⼝。代码如下:struct snd_soc_dai_ops { /* * DAI clocking configuration, all optional.* Called by soc_card drivers, normally ...
cpu_dai->ops->startup // 无 platform->pcm_ops->open // s3c_dma_open 分配DMA空间 codec_dai->ops->startup // uda134x_startup card_dai_link->ops->startup // s3c24xx_uda134x_startup 获取clock时钟源 // cpu_dai单元 struct snd_soc_dai s3c24xx_i2s_dai = { ...
staticstructsnd_soc_dai_link afeb9260_dai = { .name="TLV320AIC23", .stream_name="AIC23", .cpu_dai= &atmel_ssc_dai[0], .codec_dai= &tlv320aic23_dai, .init= afeb9260_tlv320aic23_init, .ops= &afeb9260_ops, }; /*Audio machine driver*/ ...
static struct snd_soc_dai_ops atmel_ssc_dai_ops = { static const struct snd_soc_dai_ops atmel_ssc_dai_ops = { .startup = atmel_ssc_startup, .shutdown = atmel_ssc_shutdown, .prepare = atmel_ssc_prepare, Expand Down 2 changes: 1 addition & 1 deletion 2 sound/soc/au1x/ac97c....
snd_pcm_set_ops(pcm,SNDRV_PCM_STREAM_CAPTURE,&soc_pcm_ops); ... } 在定义时初始化好的structsnd_pcm_ops结构体所指向的函数主要是通用函数(同时针对codec,codec_dai,platform、cpu_dai),而soc_new_pcm所赋值的函数主要是针对platform的函数。 我们看看...
==> soc_pcm_open cpu_dai->ops->startup // 无 platform->pcm_ops->open // s3c_dma_open 分配DMA空间 codec_dai->ops->startup // uda134x_startup card_dai_link->ops->startup // s3c24xx_uda134x_startup 获取clock时钟源 // cpu_dai单元 ...