UVC video with webcam gadget fails with errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UVC video with webcam gadget fails with errors

3,616 Views
ivanljubicic
Contributor III

Hi,

I have configured imx6 sabrelite board with yocto(jethro) linux kernel version 3.14.28-1.0.0 as webcam gadget and I have tried to play video from ov5640 camera connected to board. For that I have used uvc-gadget application with patches applied. What happens is that exception is thrown at moment I open uvc video on windows for playing:

./uvc-gadget -f 0 -o 1 -r 0 -s 1 -u /dev/video4 -v /dev/video1

UVC: IO method requested is USER_mxc_cam_select_input: input(0) CSI IC MEM

PTR

ov5640_download_autofocus(mipi): Downloaded firmware successfully: 0

ov5640_set_virtual_channel: virtual channel=2

V4L2 device is  on bus

V4L2: Getting current format: YU12 288x352

V4L2: Setting format to: YUYV 640x360

V4L2: Getting current format: YUYV 640x360

v4l2 open succeeded, file descriptor = 3

uvc device is 2184000.usb on bus gadget

uvc open succeeded, file descriptor = 4

V4L2: Buffer 0 mapped at address 0x76da4000.

V4L2: Buffer 1 mapped at address 0x76d33000.

V4L2: 2 buffers allocated.

streaming request (req 81 cs 01)

streaming request (req 83 cs 01)

streaming request (req 82 cs 01)

streaming request (req 01 cs 01)

setting probe control, length = 26

streaming request (req 81 cs 01)

streaming request (req 83 cs 01)

streaming request (req 82 cs 01)

streaming request (req 81 cs 01)

streaming request (req 83 cs 01)

streaming request (req 82 cs 01)

streaming request (req 01 cs 01)

setting probe control, length = 26

streaming request (req 81 cs 01)

streaming request (req 83 cs 01)

streaming request (req 82 cs 01)

streaming request (req 01 cs 01)g_webcam gadget: uvc_function_set_alt(1, 1)

setting probe control, length = 26

streaming request (req 81 cprp_enc_setup:in:640x480 out:640x360 format=56595559

s 01)

streaming request (req 01 YUYV

cs 02)

setting commit control, length = 26

UVC: 2 buffers allocated.

Dev memmap requested!

V4L2: Starting video stream.

------------[ cut here ]------------

WARNING: CPU: 0 PID: 1011 at /home/dubravski/boundary/jethro/boundary-eval-image/tmp/work-shared/nitrogen6x/kernel-source/arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0xd4/0x1b0()

Modules linked in: g_webcam uvcvideo videobuf2_vmalloc videobuf2_memops videobuf_vmalloc adxl362(O) c130_mipi(O) brcmfmac brcmutil cfg80211 usb_f_ecm usb_f_rndis u_ether libcomposite ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc v4l2_int_device snd_soc_fsl_asrc galcore(O) [last unloaded: g_ether]

CPU: 0 PID: 1011 Comm: uvc-gadget Tainted: G        W  O 3.14.28-1.0.0_ga+yocto+g2ffd4a4 #17

Backtrace:

[<80011dd8>] (dump_backtrace) from [<80011fe8>] (show_stack+0x18/0x1c)

r7:8001bda0 r6:0000012d r5:808b925c r4:00000000

[<80011fd0>] (show_stack) from [<8063b544>] (dump_stack+0x84/0xc4)

[<8063b4c0>] (dump_stack) from [<8002e748>] (warn_slowpath_common+0x74/0x90)

r5:00000009 r4:00000000

[<8002e6d4>] (warn_slowpath_common) from [<8002e808>] (warn_slowpath_null+0x24/0x2c)

r8:30100000 r7:808a9b34 r6:00030100 r5:00000000 r4:00071000

[<8002e7e4>] (warn_slowpath_null) from [<8001bda0>] (__arm_ioremap_pfn_caller+0xd4/0x1b0)

[<8001bccc>] (__arm_ioremap_pfn_caller) from [<8001becc>] (__arm_ioremap_caller+0x50/0x58)

r9:7f1cc21c r8:00071000 r7:00000000 r6:76da4000 r5:9c70c1c0 r4:8001be7c

[<8001be7c>] (__arm_ioremap_caller) from [<8001bba0>] (__arm_ioremap+0x20/0x24)

[<8001bb80>] (__arm_ioremap) from [<7f1cc388>] (vb2_vmalloc_get_userptr+0x16c/0x1c4 [videobuf2_vmalloc])

r5:9c70c1c0 r4:9c7be030

[<7f1cc21c>] (vb2_vmalloc_get_userptr [videobuf2_vmalloc]) from [<8043e0c8>] (__qbuf_userptr+0x90/0x318)

r8:8093aa08 r7:9c5ab9f8 r6:9c824c00 r5:9c7bfb80 r4:9c824c00

[<8043e038>] (__qbuf_userptr) from [<8043f708>] (__buf_prepare+0x200/0x244)

r10:9c7bfe28 r9:9c5ab8cc r8:9cae3180 r7:9c60f538 r6:9c7bfe28 r5:9c5ab920

r4:9c824c00

[<8043f508>] (__buf_prepare) from [<804409e4>] (vb2_internal_qbuf+0x7c/0x170)

r9:9c5ab8cc r8:9cae3180 r7:9c824c00 r6:00000000 r5:9c7bfe28 r4:9c5ab920

[<80440968>] (vb2_internal_qbuf) from [<80440b10>] (vb2_qbuf+0x38/0x58)

r7:9c5aba40 r6:9c7bfe28 r5:9c5ab920 r4:9c5ab800

[<80440ad8>] (vb2_qbuf) from [<7f1e82d8>] (uvc_v4l2_do_ioctl+0x2f0/0x538 [g_webcam])

[<7f1e7fe8>] (uvc_v4l2_do_ioctl [g_webcam]) from [<8042f360>] (video_usercopy+0x1cc/0x4bc)

r9:7e8da898 r8:00000003 r7:00000044 r6:00000044 r5:00000000 r4:c044560f

[<8042f194>] (video_usercopy) from [<7f1e77b4>] (uvc_v4l2_ioctl+0x18/0x1c [g_webcam])

r10:00000000 r9:7f1e779c r8:9c5ab850 r7:9c73c540 r6:7e8da898 r5:c044560f

r4:9c5a8400

[<7f1e779c>] (uvc_v4l2_ioctl [g_webcam]) from [<8042b7c8>] (v4l2_ioctl+0xf0/0x168)

[<8042b6d8>] (v4l2_ioctl) from [<800f8c80>] (do_vfs_ioctl+0x3e8/0x5dc)

r9:9c7be000 r8:7e8da898 r7:00000004 r6:9c73c540 r5:9cb984c0 r4:7e8da898

[<800f8898>] (do_vfs_ioctl) from [<800f8eb0>] (SyS_ioctl+0x3c/0x64)

r9:9c7be000 r8:7e8da898 r7:c044560f r6:9c73c540 r5:00000004 r4:9c73c540

[<800f8e74>] (SyS_ioctl) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

r9:9c7be000 r8:8000e944 r7:00000036 r6:00000001 r5:7e8daa18 r4:00000000

---[ end trace 6c7d6c587ca44098 ]---

UVC: Unable to queue buffer 0: In------------[ cut here ]------------

valid argument (22).

UVC: UnableWARNING: CPU: 1 PID: 1011 at /home/dubravski/boundary/jethro/boundary-eval-image/tmp/work-shared/nitrogen6x/kernel-source/arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0xd4/0x1b0()

to queue buffer 1: Invalid argumModules linked in: g_webcam uvcvideo videobuf2_vmalloc videobuf2_memops videobuf_vmalloc adxl362(O) c130_mipi(O) brcmfmac brcmutil cfg80211 usb_f_ecm usb_f_rndis u_ether libcomposite ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc v4l2_int_device snd_soc_fsl_asrc galcore(O) [last unloaded: g_ether]

ent (22).

CPU: 1 PID: 1011 Comm: uvc-gadget Tainted: G        W  O 3.14.28-1.0.0_ga+yocto+g2ffd4a4 #17

Backtrace:

[<80011dd8>] (dump_backtrace) from [<80011fe8>] (show_stack+0x18/0x1c)

r7:8001bda0 r6:0000012d r5:808b925c r4:00000000

[<80011fd0>] (show_stack) from [<8063b544>] (dump_stack+0x84/0xc4)

[<8063b4c0>] (dump_stack) from [<8002e748>] (warn_slowpath_common+0x74/0x90)

r5:00000009 r4:00000000

[<8002e6d4>] (warn_slowpath_common) from [<8002e808>] (warn_slowpath_null+0x24/0x2c)

r8:30180000 r7:808a9b34 r6:00030180 r5:00000000 r4:00071000

[<8002e7e4>] (warn_slowpath_null) from [<8001bda0>] (__arm_ioremap_pfn_caller+0xd4/0x1b0)

[<8001bccc>] (__arm_ioremap_pfn_caller) from [<8001becc>] (__arm_ioremap_caller+0x50/0x58)

r9:7f1cc21c r8:00071000 r7:00000000 r6:76d33000 r5:9c566340 r4:8001be7c

[<8001be7c>] (__arm_ioremap_caller) from [<8001bba0>] (__arm_ioremap+0x20/0x24)

[<8001bb80>] (__arm_ioremap) from [<7f1cc388>] (vb2_vmalloc_get_userptr+0x16c/0x1c4 [videobuf2_vmalloc])

r5:9c566340 r4:9c7be030

[<7f1cc21c>] (vb2_vmalloc_get_userptr [videobuf2_vmalloc]) from [<8043e0c8>] (__qbuf_userptr+0x90/0x318)

r8:8093aa08 r7:9c5ab9f8 r6:9c824800 r5:9c7bfb80 r4:9c824800

[<8043e038>] (__qbuf_userptr) from [<8043f708>] (__buf_prepare+0x200/0x244)

r10:9c7bfe28 r9:9c5ab8cc r8:9cae3180 r7:9c60f538 r6:9c7bfe28 r5:9c5ab920

r4:9c824800

[<8043f508>] (__buf_prepare) from [<804409e4>] (vb2_internal_qbuf+0x7c/0x170)

r9:9c5ab8cc r8:9cae3180 r7:9c824800 r6:00000000 r5:9c7bfe28 r4:9c5ab920

[<80440968>] (vb2_internal_qbuf) from [<80440b10>] (vb2_qbuf+0x38/0x58)

r7:9c5aba40 r6:9c7bfe28 r5:9c5ab920 r4:9c5ab800

[<80440ad8>] (vb2_qbuf) from [<7f1e82d8>] (uvc_v4l2_do_ioctl+0x2f0/0x538 [g_webcam])

[<7f1e7fe8>] (uvc_v4l2_do_ioctl [g_webcam]) from [<8042f360>] (video_usercopy+0x1cc/0x4bc)

r9:7e8da898 r8:00000003 r7:00000044 r6:00000044 r5:00000000 r4:c044560f

[<8042f194>] (video_usercopy) from [<7f1e77b4>] (uvc_v4l2_ioctl+0x18/0x1c [g_webcam])

r10:00000000 r9:7f1e779c r8:9c5ab850 r7:9c73c540 r6:7e8da898 r5:c044560f

r4:9c5a8400

[<7f1e779c>] (uvc_v4l2_ioctl [g_webcam]) from [<8042b7c8>] (v4l2_ioctl+0xf0/0x168)

[<8042b6d8>] (v4l2_ioctl) from [<800f8c80>] (do_vfs_ioctl+0x3e8/0x5dc)

r9:9c7be000 r8:7e8da898 r7:00000004 r6:9c73c540 r5:9cb984c0 r4:7e8da898

[<800f8898>] (do_vfs_ioctl) from [<800f8eb0>] (SyS_ioctl+0x3c/0x64)

r9:9c7be000 r8:7e8da898 r7:c044560f r6:9c73c540 r5:00000004 r4:9c73c540

[<800f8e74>] (SyS_ioctl) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

r9:9c7be000 r8:8000e944 r7:00000036 r6:00000002 r5:7e8daa18 r4:00000000

---[ end trace 6c7d6c587ca44099 ]---

g_webcam gadget: uvc_function_set_alt(1, 0)

g_webcam gadget: uvc_function_set_alt(1, 1)

setting probe control, length = ERROR: v4l2 capture: Capture stream has been turned  on

26

streaming request (req 81 cs 01)

streaming request (req 01 cs 02)

setting commit control, length = 26

UVC: 2 buffers allocated.

Dev memmap requested!

V4L2: Unable to start streaming: Operation not permitted (1).

------------[ cut here ]------------

WARNING: CPU: 1 PID: 1011 at /home/dubravski/boundary/jethro/boundary-eval-image/tmp/work-shared/nitrogen6x/kernel-source/arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0xd4/0x1b0()

Modules linked in: g_webcam uvcvideo videobuf2_vmalloc videobuf2_memops videobuf_vmalloc adxl362(O) c130_mipi(O) brcmfmac brcmutil cfg80211 usb_f_ecm usb_f_rndis u_ether libcomposite ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc v4l2_int_device snd_soc_fsl_asrc galcore(O) [last unloaded: g_ether]

CPU: 1 PID: 1011 Comm: uvc-gadget Tainted: G        W  O 3.14.28-1.0.0_ga+yocto+g2ffd4a4 #17

Backtrace:

[<80011dd8>] (dump_backtrace) from [<80011fe8>] (show_stack+0x18/0x1c)

r7:8001bda0 r6:0000012d r5:808b925c r4:00000000

[<80011fd0>] (show_stack) from [<8063b544>] (dump_stack+0x84/0xc4)

[<8063b4c0>] (dump_stack) from [<8002e748>] (warn_slowpath_common+0x74/0x90)

r5:00000009 r4:00000000

[<8002e6d4>] (warn_slowpath_common) from [<8002e808>] (warn_slowpath_null+0x24/0x2c)

r8:30100000 r7:808a9b34 r6:00030100 r5:00000000 r4:00071000

[<8002e7e4>] (warn_slowpath_null) from [<8001bda0>] (__arm_ioremap_pfn_caller+0xd4/0x1b0)

[<8001bccc>] (__arm_ioremap_pfn_caller) from [<8001becc>] (__arm_ioremap_caller+0x50/0x58)

r9:7f1cc21c r8:00071000 r7:00000000 r6:76da4000 r5:9c5662c0 r4:8001be7c

[<8001be7c>] (__arm_ioremap_caller) from [<8001bba0>] (__arm_ioremap+0x20/0x24)

[<8001bb80>] (__arm_ioremap) from [<7f1cc388>] (vb2_vmalloc_get_userptr+0x16c/0x1c4 [videobuf2_vmalloc])

r5:9c5662c0 r4:9c7be030

[<7f1cc21c>] (vb2_vmalloc_get_userptr [videobuf2_vmalloc]) from [<8043e0c8>] (__qbuf_userptr+0x90/0x318)

r8:8093aa08 r7:9c5ab9f8 r6:9c5a8800 r5:9c7bfb80 r4:9c5a8800

[<8043e038>] (__qbuf_userptr) from [<8043f708>] (__buf_prepare+0x200/0x244)

r10:9c7bfe28 r9:9c5ab8cc r8:9cae3180 r7:9c60f538 r6:9c7bfe28 r5:9c5ab920

r4:9c5a8800

[<8043f508>] (__buf_prepare) from [<804409e4>] (vb2_internal_qbuf+0x7c/0x170)

r9:9c5ab8cc r8:9cae3180 r7:9c5a8800 r6:00000000 r5:9c7bfe28 r4:9c5ab920

[<80440968>] (vb2_internal_qbuf) from [<80440b10>] (vb2_qbuf+0x38/0x58)

r7:9c5aba40 r6:9c7bfe28 r5:9c5ab920 r4:9c5ab800

[<80440ad8>] (vb2_qbuf) from [<7f1e82d8>] (uvc_v4l2_do_ioctl+0x2f0/0x538 [g_webcam])

[<7f1e7fe8>] (uvc_v4l2_do_ioctl [g_webcam]) from [<8042f360>] (video_usercopy+0x1cc/0x4bc)

r9:7e8da898 r8:00000003 r7:00000044 r6:00000044 r5:00000000 r4:c044560f

[<8042f194>] (video_usercopy) from [<7f1e77b4>] (uvc_v4l2_ioctl+0x18/0x1c [g_webcam])

r10:00000000 r9:7f1e779c r8:9c5ab850 r7:9c73c540 r6:7e8da898 r5:c044560f

r4:9c5a8400

[<7f1e779c>] (uvc_v4l2_ioctl [g_webcam]) from [<8042b7c8>] (v4l2_ioctl+0xf0/0x168)

[<8042b6d8>] (v4l2_ioctl) from [<800f8c80>] (do_vfs_ioctl+0x3e8/0x5dc)

r9:9c7be000 r8:7e8da898 r7:00000004 r6:9c73c540 r5:9cb984c0 r4:7e8da898

[<800f8898>] (do_vfs_ioctl) from [<800f8eb0>] (SyS_ioctl+0x3c/0x64)

r9:9c7be000 r8:7e8da898 r7:c044560f r6:9c73c540 r5:00000004 r4:9c73c540

[<800f8e74>] (SyS_ioctl) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

r9:9c7be000 r8:8000e944 r7:00000036 r6:00000003 r5:7e8daa18 r4:00000000

---[ end trace 6c7d6c587ca4409a ]---

UVC: Unable to queue buffer 0: In------------[ cut here ]------------

valid argument (22).

WARNING: CPU: 1 PID: 1011 at /home/dubravski/boundary/jethro/boundary-eval-image/tmp/work-shared/nitrogen6x/kernel-source/arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0xd4/0x1b0()

Modules linked in: g_webcam uvcvideo videobuf2_vmalloc videobuf2_memops videobuf_vmalloc adxl362(O) c130_mipi(O) brcmfmac brcmutil cfg80211 usb_f_ecm usb_f_rndis u_ether libcomposite ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc v4l2_int_device snd_soc_fsl_asrc galcore(O) [last unloaded: g_ether]

CPU: 1 PID: 1011 Comm: uvc-gadget Tainted: G        W  O 3.14.28-1.0.0_ga+yocto+g2ffd4a4 #17

Backtrace:

[<80011dd8>] (dump_backtrace) from [<80011fe8>] (show_stack+0x18/0x1c)

r7:8001bda0 r6:0000012d r5:808b925c r4:00000000

[<80011fd0>] (show_stack) from [<8063b544>] (dump_stack+0x84/0xc4)

[<8063b4c0>] (dump_stack) from [<8002e748>] (warn_slowpath_common+0x74/0x90)

r5:00000009 r4:00000000

[<8002e6d4>] (warn_slowpath_common) from [<8002e808>] (warn_slowpath_null+0x24/0x2c)

r8:30180000 r7:808a9b34 r6:00030180 r5:00000000 r4:00071000

[<8002e7e4>] (warn_slowpath_null) from [<8001bda0>] (__arm_ioremap_pfn_caller+0xd4/0x1b0)

[<8001bccc>] (__arm_ioremap_pfn_caller) from [<8001becc>] (__arm_ioremap_caller+0x50/0x58)

r9:7f1cc21c r8:00071000 r7:00000000 r6:76d33000 r5:9c5662c0 r4:8001be7c

[<8001be7c>] (__arm_ioremap_caller) from [<8001bba0>] (__arm_ioremap+0x20/0x24)

[<8001bb80>] (__arm_ioremap) from [<7f1cc388>] (vb2_vmalloc_get_userptr+0x16c/0x1c4 [videobuf2_vmalloc])

r5:9c5662c0 r4:9c7be030

[<7f1cc21c>] (vb2_vmalloc_get_userptr [videobuf2_vmalloc]) from [<8043e0c8>] (__qbuf_userptr+0x90/0x318)

r8:8093aa08 r7:9c5ab9f8 r6:9c5aa400 r5:9c7bfb80 r4:9c5aa400

[<8043e038>] (__qbuf_userptr) from [<8043f708>] (__buf_prepare+0x200/0x244)

r10:9c7bfe28 r9:9c5ab8cc r8:9cae3180 r7:9c60f538 r6:9c7bfe28 r5:9c5ab920

r4:9c5aa400

[<8043f508>] (__buf_prepare) from [<804409e4>] (vb2_internal_qbuf+0x7c/0x170)

r9:9c5ab8cc r8:9cae3180 r7:9c5aa400 r6:00000000 r5:9c7bfe28 r4:9c5ab920

[<80440968>] (vb2_internal_qbuf) from [<80440b10>] (vb2_qbuf+0x38/0x58)

r7:9c5aba40 r6:9c7bfe28 r5:9c5ab920 r4:9c5ab800

[<80440ad8>] (vb2_qbuf) from [<7f1e82d8>] (uvc_v4l2_do_ioctl+0x2f0/0x538 [g_webcam])

[<7f1e7fe8>] (uvc_v4l2_do_ioctl [g_webcam]) from [<8042f360>] (video_usercopy+0x1cc/0x4bc)

r9:7e8da898 r8:00000003 r7:00000044 r6:00000044 r5:00000000 r4:c044560f

[<8042f194>] (video_usercopy) from [<7f1e77b4>] (uvc_v4l2_ioctl+0x18/0x1c [g_webcam])

r10:00000000 r9:7f1e779c r8:9c5ab850 r7:9c73c540 r6:7e8da898 r5:c044560f

r4:9c5a8400

[<7f1e779c>] (uvc_v4l2_ioctl [g_webcam]) from [<8042b7c8>] (v4l2_ioctl+0xf0/0x168)

[<8042b6d8>] (v4l2_ioctl) from [<800f8c80>] (do_vfs_ioctl+0x3e8/0x5dc)

r9:9c7be000 r8:7e8da898 r7:00000004 r6:9c73c540 r5:9cb984c0 r4:7e8da898

[<800f8898>] (do_vfs_ioctl) from [<800f8eb0>] (SyS_ioctl+0x3c/0x64)

r9:9c7be000 r8:7e8da898 r7:c044560f r6:9c73c540 r5:00000004 r4:9c73c540

[<800f8e74>] (SyS_ioctl) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

r9:9c7be000 r8:8000e944 r7:00000036 r6:00000004 r5:7e8daa18 r4:00000000

---[ end trace 6c7d6c587ca4409b ]---

UVC: Unable to queue buffer 1: Invalid argument (22).

g_webcam gadget: uvc_function_set_alt(1, 0)

What I have did wrong?

There is also warning thrown when I start g_webcam.ko driver:

gadget# insmod g_webcam.ko

g_webcam gadget: uvc_function_bind

------------[ cut here ]------------

WARNING: CPU: 1 PID: 1005 at /home/dubravski/boundary/jethro/boundary-eval-image/tmp/work-shared/nitrogen6x/kernel-source/drivers/media/v4l2-core/videobuf2-core.c:2218 vb2_queue_init+0x18c/0x194()

Modules linked in: g_webcam(+) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf_vmalloc adxl362(O) c130_mipi(O) brcmfmac brcmutil cfg80211 usb_f_ecm usb_f_rndis u_ether libcomposite ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc v4l2_int_device snd_soc_fsl_asrc galcore(O) [last unloaded: g_ether]

CPU: 1 PID: 1005 Comm: insmod Tainted: G           O 3.14.28-1.0.0_ga+yocto+g2ffd4a4 #17

Backtrace:

[<80011dd8>] (dump_backtrace) from [<80011fe8>] (show_stack+0x18/0x1c)

r7:80440960 r6:000008aa r5:808b925c r4:00000000

[<80011fd0>] (show_stack) from [<8063b544>] (dump_stack+0x84/0xc4)

[<8063b4c0>] (dump_stack) from [<8002e748>] (warn_slowpath_common+0x74/0x90)

r5:00000009 r4:00000000

[<8002e6d4>] (warn_slowpath_common) from [<8002e808>] (warn_slowpath_null+0x24/0x2c)

r8:9c5ab804 r7:7f1e8d00 r6:9c5ab800 r5:9cae3180 r4:9c5ab920

[<8002e7e4>] (warn_slowpath_null) from [<80440960>] (vb2_queue_init+0x18c/0x194)

[<804407d4>] (vb2_queue_init) from [<7f1eb71c>] (uvc_function_bind+0x37c/0x4c4 [g_webcam])

r5:9cae3180 r4:9c5ab874

[<7f1eb3a0>] (uvc_function_bind [g_webcam]) from [<7f118930>] (usb_add_function+0x60/0x108 [libcomposite])

r10:7f1e8738 r9:7f1e8784 r8:7f1e8760 r7:7f1e8d00 r6:7f1e874c r5:7f1e8d00

r4:9c5ab874

[<7f1188d0>] (usb_add_function [libcomposite]) from [<7f1eba60>] (uvc_bind_config+0x1fc/0x248 [g_webcam])

r5:9c5ab800 r4:7f1e8ddc

[<7f1eb864>] (uvc_bind_config [g_webcam]) from [<7f1ebae4>] (webcam_config_bind+0x38/0x40 [g_webcam])

r10:7f1e8eac r9:00000000 r8:00000000 r7:9cae3180 r6:00000000 r5:7f1ebaac

r4:7f1e8d00

[<7f1ebaac>] (webcam_config_bind [g_webcam]) from [<7f1196ac>] (usb_add_config+0x38/0xe0 [libcomposite])

[<7f119674>] (usb_add_config [libcomposite]) from [<7f1eb36c>] (webcam_bind+0x54/0x88 [g_webcam])

r9:9ce3a010 r8:00000000 r7:9c392218 r6:00000000 r5:9cae3180 r4:7f1e8cac

[<7f1eb318>] (webcam_bind [g_webcam]) from [<7f11aebc>] (composite_bind+0xa0/0x198 [libcomposite])

r5:7f1e8e50 r4:9cae3180

[<7f11ae1c>] (composite_bind [libcomposite]) from [<803f8da4>] (udc_bind_to_driver+0x34/0xd8)

r10:7f1e8eac r9:9ce3a010 r8:00000000 r7:00000005 r6:7f1e8e50 r5:7f1e8e50

r4:9c3c6600

[<803f8d70>] (udc_bind_to_driver) from [<803f8ec0>] (usb_gadget_probe_driver+0x78/0xa8)

r7:00000005 r6:7f1e8e50 r5:7f1e8e50 r4:808ca658

[<803f8e48>] (usb_gadget_probe_driver) from [<7f119508>] (usb_composite_probe+0xc0/0xcc [libcomposite])

r5:7f1e8be0 r4:7f1e8e28

[<7f119448>] (usb_composite_probe [libcomposite]) from [<7f1ebb04>] (webcam_init+0x18/0x1c [g_webcam])

r7:9c842080 r6:9c842088 r5:00000001 r4:7f1ebaec

[<7f1ebaec>] (webcam_init [g_webcam]) from [<80008878>] (do_one_initcall+0x104/0x160)

[<80008774>] (do_one_initcall) from [<8008f000>] (load_module+0x1970/0x202c)

r9:7f1e8eb8 r8:00000001 r7:9c842080 r6:9c842088 r5:00000001 r4:9ce3bf48

[<8008d690>] (load_module) from [<8008f854>] (SyS_finit_module+0x8c/0x9c)

r10:00000000 r9:9ce3a000 r8:8000e944 r7:0000017b r6:00028ec0 r5:00000003

r4:00000000

[<8008f7c8>] (SyS_finit_module) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

r6:00000000 r5:00000000 r4:00c5b008

---[ end trace 6c7d6c587ca44097 ]---

g_webcam gadget: Webcam Video Gadget

g_webcam gadget: g_webcam ready

Are there any patch to fix this problems for yocto(jethro) linux, because from forum search I have found that patches for other linux version exists but I can not apply them on my linux version.

Thanks, regards, Ivan.

Labels (1)
4 Replies

1,820 Views
marcomadrigal
Contributor III

Hi,

Maybe this could help you:

USB Video Class Gadget Library - libguvc - RidgeRun Developer Connection 

Best Regards,

Marco

0 Kudos

1,820 Views
缙云张
Contributor I

I have the same problem, have you solved it?

0 Kudos

1,820 Views
tomgao
Contributor III

could you tell me how to config the kernel as webcam gadget ?

Thank you very much

0 Kudos

1,820 Views
ivanljubicic
Contributor III

Hi,

you have to enable web cam hid in menuconfig.

device drivers

usb

gadget

web_cam gadget.

Bitbake the image.

Unload other hid driver. rmmod g_ether.ko, or other if installed.

lsmod lists drivers loaded.

And when start linux go in lib/modules/yocto.../kernel/usb/gadget/ and

insmod g_wecam.ko.

You also have to load other dirvers before that in dir .../kernel/v4l2/

(or something like that) and insmod memory_alloc drivers so webcam would

work. I am currently not able to reproduce everything because my board

is not working.