RK3399 uvc 启动 识别 问题
问题
插入UVC摄像头后,开发板上电,进入Android后,识别不到UVC摄像头
分析
通过串口的kernel输出,可以看到设备有创建input文件成功
硬件中断可以接收到,说明驱动加载OK
/dev/input/event由ueventd进程创建
查看log,发现ueventd的创建晚于uvc的camsys事件发送之后,原因找到
解决
临时解决办法
在uvc驱动中增加一个延迟,让初始化事件的发送晚于ueventd创建之后.
$ vi kernel/drivers/media/usb/uvc/uvc_driver.c
static int uvc_probe(struct usb_interface *intf,
const struct usb_device_id *id) {
// ...
static bool first_time_call = true;
if(first_time_call) {
msleep(8000);
first_time_call = false;
}
// ...
}