开发板自带的wm9713驱动就会运行
ps:
我在static int __init wm9713_init(void),
static __devinit int wm9713_probe(struct platform_device *pdev),
static int wm9713_soc_probe(struct snd_soc_codec *codec)都加了打印信息,都打印出来了。
打印信息
wm9713 init
wm9713 probe
wm9713 soc prob
asoc: wm9713-hifi <-> samsung-ac97 mapping ok
snd card register in snd soc instantiate card
card number is 0
ALSA device list:
#0: MINI6410
源代码
static struct snd_soc_codec_driver soc_codec_dev_wm9713 = {
.probe = wm9713_soc_probe,
.remove = wm9713_soc_remove,
.suspend = wm9713_soc_suspend,
.resume = wm9713_soc_resume,
.read = ac97_read,
.write = ac97_write,
.set_bias_level = wm9713_set_bias_level,
.reg_cache_size = ARRAY_SIZE(wm9713_reg),
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = wm9713_reg,
};
static __devinit int wm9713_probe(struct platform_device *pdev)
{
printk("wm9713 probe\n");
return snd_soc_register_codec(&pdev->dev,
&soc_codec_dev_wm9713, wm9713_dai, ARRAY_SIZE(wm9713_dai));
}
static int __devexit wm9713_remove(struct platform_device *pdev)
{
snd_soc_unregister_codec(&pdev->dev);
return 0;
}
static struct platform_driver wm9713_codec_driver = {
.driver = {
.name = "wm9713-codec",
.owner = THIS_MODULE,
},
.probe = wm9713_probe,
.remove = __devexit_p(wm9713_remove),
};
static int __init wm9713_init(void)
{
printk("wm9713 init\n");
return platform_driver_register(&wm9713_codec_driver);
}
module_init(wm9713_init);
static void __exit wm9713_exit(void)
{
platform_driver_unregister(&wm9713_codec_driver);
}
module_exit(wm9713_exit);