2024年3月12日发(作者:管忆秋)
int ret = 0;
/* Bodge while we unpick instantiation */
card->dev = &pdev->dev;
INIT_LIST_HEAD(&card->dai_dev_list);
INIT_LIST_HEAD(&card->codec_dev_list);
INIT_LIST_HEAD(&card->platform_dev_list);
printk(KERN_WARNING "soc audio probe!n");
ret = snd_soc_register_card(card);
if (ret != 0) {
dev_err(&pdev->dev, "Failed to register cardn");
return ret;
}
return 0;
}
4> 声卡创建
主要分析snd_soc_register_card()函数。
2024年3月12日发(作者:管忆秋)
int ret = 0;
/* Bodge while we unpick instantiation */
card->dev = &pdev->dev;
INIT_LIST_HEAD(&card->dai_dev_list);
INIT_LIST_HEAD(&card->codec_dev_list);
INIT_LIST_HEAD(&card->platform_dev_list);
printk(KERN_WARNING "soc audio probe!n");
ret = snd_soc_register_card(card);
if (ret != 0) {
dev_err(&pdev->dev, "Failed to register cardn");
return ret;
}
return 0;
}
4> 声卡创建
主要分析snd_soc_register_card()函数。