Web-камера в embedded устройстве
Форум — Linux-hardware
Привет. Поведайте, плиз, почему v4l2 и uvcvideo никак не хотят работать с моей вебкой logitech c270 на ядре 2.6.7.18, сбилженным под ARM со следующим конфигом для вебки:
#
# Multimedia core support
#
CONFIG_ACPI_VIDEO=y
CONFIG_VIDEO_IR=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2_COMMON=y
CONFIG_VIDEO_MEDIA=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB=y
CONFIG_VIDEO_V4L2=y
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_ALLOW_V4L1=y
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
CONFIG_VIDEO_IR_I2C=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_MEDIA_ATTACH=y
При этом в UVC логе при подключении камеры:
usb 2-1: new high speed USB device using bcm-ehci and address 4
usb 2-1: configuration #1 chosen from 1 choice
uvcvideo: Probing generic UVC device 1
uvcvideo: Found format YUV 4:2:2 (YUYV).
uvcvideo: - 640x480 (30.0 fps)
uvcvideo: - 160x120 (30.0 fps)
uvcvideo: - 176x144 (30.0 fps)
uvcvideo: - 320x176 (30.0 fps)
uvcvideo: - 320x240 (30.0 fps)
uvcvideo: - 352x288 (30.0 fps)
uvcvideo: - 432x240 (30.0 fps)
uvcvideo: - 544x288 (30.0 fps)
uvcvideo: - 640x360 (30.0 fps)
uvcvideo: - 752x416 (25.0 fps)
uvcvideo: - 800x448 (20.0 fps)
uvcvideo: - 800x600 (20.0 fps)
uvcvideo: - 864x480 (20.0 fps)
uvcvideo: - 960x544 (15.0 fps)
uvcvideo: - 960x720 (10.0 fps)
uvcvideo: - 1024x576 (10.0 fps)
uvcvideo: - 1184x656 (10.0 fps)
uvcvideo: - 1280x720 (5.0 fps)
uvcvideo: - 1280x960 (5.0 fps)
uvcvideo: Found format MJPEG.
uvcvideo: - 640x480 (30.0 fps)
uvcvideo: - 160x120 (30.0 fps)
uvcvideo: - 176x144 (30.0 fps)
uvcvideo: - 320x176 (30.0 fps)
uvcvideo: - 320x240 (30.0 fps)
uvcvideo: - 352x288 (30.0 fps)
uvcvideo: - 432x240 (30.0 fps)
uvcvideo: - 544x288 (30.0 fps)
uvcvideo: - 640x360 (30.0 fps)
uvcvideo: - 752x416 (30.0 fps)
uvcvideo: - 800x448 (30.0 fps)
uvcvideo: - 800x600 (30.0 fps)
uvcvideo: - 864x480 (30.0 fps)
uvcvideo: - 960x544 (30.0 fps)
uvcvideo: - 960x720 (30.0 fps)
uvcvideo: - 1024x576 (30.0 fps)
uvcvideo: - 1184x656 (30.0 fps)
uvcvideo: - 1280x720 (30.0 fps)
uvcvideo: - 1280x960 (30.0 fps)
uvcvideo: Found a Status endpoint (addr 87).
uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/2 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/3 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/7 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/8 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/1 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/4 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/5 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000001/2 to device 1 entity 1
uvcvideo: Added control 00000000-0000-0000-0000-000000000001/3 to device 1 entity 1
uvcvideo: Added control 00000000-0000-0000-0000-000000000001/4 to device 1 entity 1
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/11 to device 1 entity 2
uvcvideo: Added control 00000000-0000-0000-0000-000000000101/10 to device 1 entity 2
uvcvideo: Scanning UVC chain: OT 5 <- XU 4 (-> XU 6 7) <- PU 2 (-> XU 3) <- IT 1
uvcvideo: Found a valid video chain (1 -> 5).
input: UVC Camera (046d:0825) as /devices/platform/bcm-ehci.0/usb2/2-1/2-1:1.0/input/input4
uvcvideo: UVC device initialized.
Но после создания устройства mknod /dev/video0 c 81 0 не могу прицепиться к нему тем же mplayer'ом допустим, а luvcview ругается, что не может заинишиалайзить v4l2:
SDL_NOMOUSE=1 ./luvcview -l
luvcview 0.2.6
SDL information:
Video driver: fbcon
Hardware surfaces are available (1020k video memory)
Device information:
Device path: /dev/video0
Stream settings:
Frame format: MJPG
Frame size: 640x480
Frame rate: 30 fps
Unable to query buffer: Invalid argument
Init v4L2 failed !! exit fatal
uvcvideo: uvc_v4l2_open
uvcvideo: uvc_v4l2_ioctl
VIDIOC_QUERYCAP<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_ENUM_FMT<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_S_FMT<7>uvcvideo: Trying format 0x47504a4d (MJPG): 640x480.
uvcvideo: Using default frame interval 33333.3 us (30.0 fps).
uvcvideo: uvc_v4l2_ioctl
VIDIOC_S_PARM<7>uvcvideo: Setting frame interval to 1/30 (333333).
uvcvideo: uvc_v4l2_ioctl
VIDIOC_G_PARM<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_REQBUFS<7>uvcvideo: uvc_v4l2_ioctl
VIDIOC_QUERYBUF<7>uvcvideo: Unknown ioctl 0xc0445609
uvcvideo: uvc_v4l2_release,
./v4l2grab.arm -o 123
VIDIOC_QUERYBUF error 22, Invalid argument