我正在尝试将snd_bcm2835移植到主线内核(主要是因为rpi官方内核没有使用设备树)。
现在,vcio、vchiq、snd_bcm2835都可以嵌入到内核中,但是仍然没有有效的音频播放设备。snd_bcm2835模块的module_init函数是bcm2835_alsa_device_init(),它的主要工作是(一个简化版本):
static int bcm2835_alsa_device_init(void)
{
platform_driver_register(&bcm2835_alsa0_driver);
platform_driver_register(&bcm2835_alsa1_driver);
//...repeat for 8 times
}这个bcm2835_alsa_device_init函数是在我输入snd_bcm2835时调用的,它可以正常运行。
结构bcm2835_alsa0_driver,bcm2835_alsa1_driver看起来像这样:
static struct platform_driver bcm2835_alsa0_driver = {
.probe = snd_bcm2835_alsa_probe,
.remove = snd_bcm2835_alsa_remove,
//...
}.probe函数snd_bcm2835_alsa_probe是主程序,但未被调用。
所以问题是这个snd_bcm2835_alsa_probe什么时候会被调用?
发布于 2015-03-04 20:06:16
我已经使用elinux给出的以下步骤在raspberry pi上移植了4.0,并且我成功了。所以你也可以试一试:Raspberry pi Upstream
https://stackoverflow.com/questions/28780368
复制相似问题