This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm816x v4l2 capture problem (gstreamer v4l2src)

Other Parts Discussed in Thread: TVP7002

I try to run the following gstreamer pipeline in EZSDK 5.05.01.04:

gst-launch v4l2src always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! filesink location=v4l2cap.h264

and it fails with the segmentation fault: 

root@dm816x-evm:~/dm816x-evm/usr/share/ti/ti-psp-examples# gst-launch v4l2src always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,fo
rmat=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! filesink location=v4l2cap.
h264
Setting pipeline to PAUSED ...

Mode set is 1080
allocating 12 buffers of size:3110400!!
allocated outbuf:0x40d3a080
allocated outbuf:0x41031680
allocated outbuf:0x41328c80
allocated outbuf:0x41620280
allocated outbuf:0x41917880
allocated outbuf:0x41c0ee80
allocated outbuf:0x41f06480
allocated outbuf:0x421fda80
allocated outbuf:0x424f5080
allocated outbuf:0x427ec680
allocated outbuf:0x42ae3c80
allocated outbuf:0x42ddb280
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught SIGSEGV accessing address 0x8
Spinning. Please run 'gdb gst-launch 1401' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

And this is dmesg output:

tvp7002 2-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
tvp7002 2-005d: Rev. 02 detected.
ti81xxvin ti81xxvin: registered sub device tvp7002
ti81xxvin ti81xxvin: TI81xx HDVPSS Capture driver initialized
HDMI W1 rev 2.0
HDMI CEC Spec version 1.2
hdmi: Enter HDMI_W1_StopVideoFrame()
found best resolution: 1680x1050 (31)
hdmi: Enter HDMI_W1_GlobalInitVars()
hdmi: Enter HDMI_Core_GlobalInitVars()
hdmi: Enter HDMI_W1_ConfigVideoResolutionTiming()
hdmi: Enter HDMI_W1_ConfigVideoInterface()
hdmi: HDMI_WP_AUDIO_CFG = 0x1030006
hdmi: HDMI_WP_AUDIO_CFG2 = 0x20c0
hdmi: HDMI_WP_AUDIO_CTRL = 0x20
hdmi: Enter DSS_HDMI_CORE_SW_RESET_ASSERT ()
hdmi: Enter DSS_HDMI_CORE_POWER_DOWN_DISABLE()
hdmi: Enter DSS_HDMI_CORE_SW_RESET_RELEASE()
hdmi: Enter HDMI_W1_StartVideoFrame ()
hdmi: Irqenable 60000011
hdmi: 40 hpd
hdmi: -------------DEBUG-------------------
hdmi: 1 hdmi_wp_irqstatus
hdmi: 1 hdmi_core_intr_state
hdmi: 60 hdmi_core_intr1
hdmi: 3 hdmi_core_intr2
hdmi: f hdmi_core_intr3
hdmi: 87 hdmi_core_sys_sys_stat
hdmi: -------------DEBUG-------------------
hdmi: first hpd
eth0: no IPv6 routers present
hdmi: Enter DSS_HDMI_CORE_SW_RESET_ASSERT ()
hdmi: Enter HDMI_W1_StopVideoFrame()
hdmi: Enter HDMI_W1_StopVideoFrame()
found best resolution: 1680x1050 (31)
hdmi: Enter HDMI_W1_GlobalInitVars()
hdmi: Enter HDMI_Core_GlobalInitVars()
hdmi: Enter HDMI_W1_ConfigVideoResolutionTiming()
hdmi: Enter HDMI_W1_ConfigVideoInterface()
hdmi: HDMI_WP_AUDIO_CFG = 0x1030006
hdmi: HDMI_WP_AUDIO_CFG2 = 0x20c0
hdmi: HDMI_WP_AUDIO_CTRL = 0x20
hdmi: Enter DSS_HDMI_CORE_SW_RESET_ASSERT ()
hdmi: Enter DSS_HDMI_CORE_POWER_DOWN_DISABLE()
hdmi: Enter DSS_HDMI_CORE_SW_RESET_RELEASE()
hdmi: Enter HDMI_W1_StartVideoFrame ()
hdmi: Irqenable 60000011
hdmi: 40 hpd
hdmi: -------------DEBUG-------------------
hdmi: 1 hdmi_wp_irqstatus
hdmi: 1 hdmi_core_intr_state
hdmi: 60 hdmi_core_intr1
hdmi: 3 hdmi_core_intr2
hdmi: f hdmi_core_intr3
hdmi: 87 hdmi_core_sys_sys_stat
hdmi: -------------DEBUG-------------------
------------[ cut here ]------------
WARNING: at kernel/softirq.c:159 local_bh_enable+0x54/0xc4()
Modules linked in: bufferclass_ti omaplfb pvrsrvkm ti81xxhdmi ti81xxvin tvp7002 ti81xxvo ti81xxfb vpss syslink ipv6
Backtrace:
[<c0049bb8>] (dump_backtrace+0x0/0x110) from [<c039bec8>] (dump_stack+0x18/0x1c)
r7:00000000 r6:c0073bd8 r5:c0465e24 r4:0000009f
[<c039beb0>] (dump_stack+0x0/0x1c) from [<c006e65c>] (warn_slowpath_common+0x54/0x6c)
[<c006e608>] (warn_slowpath_common+0x0/0x6c) from [<c006e698>] (warn_slowpath_null+0x24/0x2c)
r9:c05167f4 r8:d708c800 r7:0000000e r6:d66d5c00 r5:c04f0380
r4:c0541b40
[<c006e674>] (warn_slowpath_null+0x0/0x2c) from [<c0073bd8>] (local_bh_enable+0x54/0xc4)
[<c0073b84>] (local_bh_enable+0x0/0xc4) from [<c0068554>] (omap_mbox_msg_send+0xcc/0xdc)
r5:c04f0380 r4:00000000
[<c0068488>] (omap_mbox_msg_send+0x0/0xdc) from [<c02dd084>] (notify_shm_drv_send_event+0x1c8/0x208)
r5:00000001 r4:00000000
[<c02dcebc>] (notify_shm_drv_send_event+0x0/0x208) from [<c02da814>] (notify_send_event+0x114/0x26c)
[<c02da700>] (notify_send_event+0x0/0x26c) from [<bf192a08>] (vps_fvid2_queue+0xe4/0x21c [vpss])
[<bf192924>] (vps_fvid2_queue+0x0/0x21c [vpss]) from [<bf19bcfc>] (capture_queue+0x50/0x64 [vpss])
r8:bf1d4414 r7:60000013 r6:d5801180 r5:00000000 r4:d5e21800
[<bf19bcac>] (capture_queue+0x0/0x64 [vpss]) from [<bf1d31d4>] (ti81xxvin_buffer_queue+0x9c/0xe8 [ti81xxvin])
r5:d5c1e800 r4:d5e21800
[<bf1d3138>] (ti81xxvin_buffer_queue+0x0/0xe8 [ti81xxvin]) from [<c02b4014>] (videobuf_streamon+0x80/0xd0)
r7:60000013 r6:d5c1e9c4 r5:d5c1e904 r4:d5801180
[<c02b3f94>] (videobuf_streamon+0x0/0xd0) from [<bf1d2c4c>] (vidioc_streamon+0x244/0x400 [ti81xxvin])
r7:d5fc0a00 r6:00000001 r5:d5c1e800 r4:d5c1e904
[<bf1d2a08>] (vidioc_streamon+0x0/0x400 [ti81xxvin]) from [<c02a991c>] (__video_do_ioctl+0x1618/0x3f34)
r6:40045612 r5:00000000 r4:00000001
[<c02a8304>] (__video_do_ioctl+0x0/0x3f34) from [<c02a80f4>] (__video_usercopy+0x2e4/0x428)
[<c02a7e10>] (__video_usercopy+0x0/0x428) from [<c02a8268>] (video_ioctl2+0x30/0x38)
[<c02a8238>] (video_ioctl2+0x0/0x38) from [<c02a72a8>] (v4l2_ioctl+0xe8/0x11c)
r5:d5fc0a00 r4:d5c65d80
[<c02a71c0>] (v4l2_ioctl+0x0/0x11c) from [<c00d3c7c>] (vfs_ioctl+0x28/0x44)
r9:d59b2000 r8:bebcac6c r7:00000003 r6:00000003 r5:d5c65d80
r4:00000000
[<c00d3c54>] (vfs_ioctl+0x0/0x44) from [<c00d438c>] (do_vfs_ioctl+0x500/0x540)
[<c00d3e8c>] (do_vfs_ioctl+0x0/0x540) from [<c00d4424>] (sys_ioctl+0x58/0x7c)
[<c00d43cc>] (sys_ioctl+0x0/0x7c) from [<c0045e00>] (ret_fast_syscall+0x0/0x30)
r8:c0045fa8 r7:00000036 r6:00000002 r5:bebcac6c r4:0001215c
---[ end trace 81462528746bb2c8 ]---
ti81xxvin ti81xxvin: Invalid input index
ti81xxvin ti81xxvin: Invalid format index
notify_shm_drv_sendevent failed! status = 0xfffffff2
notify_send_event failed! status = 0xfffffff2
notify_shm_drv_sendevent failed! status = 0xfffffff2
notify_send_event failed! status = 0xfffffff2

The same pipeline runs fime in EZSDK 5.04.00.11:

root@dm816x-evm:~# gst-launch v4l2src always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1920,height=1080
,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! filesink location=v4l2cap.h264
Setting pipeline to PAUSED ...

Mode set is 1080
allocating 12 buffers of size:3110400!!
allocated outbuf:0x4743e880
allocated outbuf:0x47735e80
allocated outbuf:0x47a2d480
allocated outbuf:0x47d24a80
allocated outbuf:0x4801c080
allocated outbuf:0x48313680
allocated outbuf:0x4860ac80
allocated outbuf:0x48902280
allocated outbuf:0x48bf9880
allocated outbuf:0x48ef0e80
allocated outbuf:0x491e8480
allocated outbuf:0x494dfa80
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 15474964630 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

saLoopBack works fine for both versions.

Any ideas?

Alex