staticinthsw_pcm_close(struct snd_pcm_substream *substream){structsnd_soc_pcm_runtime*rtd=substream->private_data;structhsw_priv_data*pdata=snd_soc_platform_get_drvdata(rtd->platform);structhsw_pcm_data*pcm_data=snd_soc_pcm_get_drvdata(rtd);structsst_hsw*hsw=pdata->hsw;intret; mutex...
staticintuda134x_set_bias_level(struct snd_soc_component *component,enumsnd_soc_bias_level level){structuda134x_priv*uda134x=snd_soc_component_get_drvdata(component);structuda134x_platform_data*pd=uda134x->pd;pr_debug("%s bias level %d\n", __func__, level);switch(level) {caseSND_...
EXPORT_SYMBOL_GPL(snd_soc_read); 因此,要想使用snd_soc_read,必须要设置codec->read回调函数,当我们提供了read/write函数时,在snd_soc_register_codec函数中会设置codec->read intsnd_soc_register_codec(structdevice *dev,conststructsnd_soc_codec_driver *codec_drv,structsnd_soc_dai_driver *dai_drv,in...
card->name || !card->dev)7return-EINVAL;89for(i =0; i < card->num_links; i++) {10structsnd_soc_dai_link *link = &card->dai_link[i];1112ret =soc_init_dai_link(card, link);//检查dai_link中codec、platform、CPU dai信息是否完整13if(ret) {14dev_err...
snd_soc_platform 之 ops:snd_pcm_ops 分析 snd_pcm_ops open 中会有 DMA 的相关设置 注意 其中的 音频数据流向图 就是 dpam 中 流向图 snd_pcm_ops的更多描述
static int my_component_probe(struct platform_device *pdev) { // 初始化组件的其他成员变量 // ... return 0; } static struct dev_pm_ops my_component_pm = { // 设置组件的电源管理操作 }; static struct snd_soc_component_driver my_component_driver = { ...
if(platform->driver->ops){ soc_pcm_ops.mmap=platform->driver->ops->mmap; soc_pcm_ops.pointer=platform->driver->ops->pointer; soc_pcm_ops.ioctl=platform->driver->ops->ioctl; soc_pcm_ops.copy=platform->driver->ops->copy; soc_pcm_ops.silence=platform->driver->ops->silence; ...
/*Audio machine driver*/ staticstructsnd_soc_card snd_soc_machine_afeb9260 = { .name="AFEB9260", .platform= &atmel_soc_platform, .dai_link= &afeb9260_dai, .num_links=1, }; /*Audio subsystem*/ staticstructsnd_soc_device afeb9260_snd_devdata = { ...
* */ #include linux/init.h> #include linux/module.h> #include linux/platform_device.h> #include...soc_codec_dev_bt_sco = { .component_driver = { .dapm_widgets = bt_sco_widgets, .num_dapm_widgets...\n"); return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_bt_sco, &...
soc_pcm_runtime *rtd, int num) { if (platform-driver-ops) { soc_pcm_ops.mmap = platform-driver-ops-mmap; soc_pcm_ops.pointer = platform-driver-ops-pointer; soc_pcm_ops.ioctl = platform-driver-ops-ioctl; soc_pcm_ops.copy = platform-driver-ops-copy; soc_pcm_ops.silence = platform...