Plataforma ASOC

  
 /kernel/sound/soc/soc-core.c /*soc-core.c - ALSA SoC Audio Layer * //* prueba un nuevo socdev * /static int soc_probe (struct platform_device * pdev) {int ret = 0; struct snd_soc_device * socdev = platform_get_drvdata (pdev); //得到 platform_device 添加 的 数据 struct snd_soc_card * card = socdev- > card; //三角 关系 ??? /* Bodge mientras sacamos cosas de socdev * /card- > socdev = socdev; /* Bodge mientras eliminamos la instanciación * /card- > dev = &pdev- > dev; ret = snd_soc_register_card
(tarjeta); //注册 snd_soc_cardif (ret! = 0) {dev_err (&pdev- > dev, " Error al registrar la tarjeta \\ n "); return ret;} return 0;} /* Controlador de la plataforma ASoC * / static struct platform_driver
soc_driver = {.driver = {.name = " soc-audio
", owner = THIS_MODULE, .pm = &soc_pm_ops,} ,. probe = soc_probe ,. remove = soc_remove,}; static int __init snd_soc_init (void) {return platform_driver_register (&soc_driver);} module_init (snd_soc_init);


Copyright © Conocimiento de Windows All Rights Reserved