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.

Linux/AM5728: VIP driver problem

Part Number: AM5728
Other Parts Discussed in Thread: TVP5158, , ADS7846

Tool/software: Linux

Hi,

TI, I test the tvp5158  on the am5728. And I found that I can not capture  every channel independently.

I first start capture channel 1,then I start capture channel 2.After I start capture channel 2,the channel 1 is not ok.The vip can not get data from channel 1.

channel 1: 

gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! waylandsink

channel 2:

gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! waylandsink

I debug it by open debug option of vip driver,there are not irq from vip.

echo 8 > /sys/module/ti_vip/parameters/debug

if I use dmabuftest,it is ok if capture four channel.

dmabuftest --multi 4 -d /dev/video1 -c 720x288@YUYV -d /dev/video2 -c 720x288@YUYV -d /dev/video3 -c 720x288@YUYV -d /dev/video4 -c 720x288@YUYV -s 32:1920x1080

are there any problem of vip driver?

any suggestion?

BR,

vefone

  • The software team have been notified. They will respond here.
  • Hello,

    If you are use these pipelines:
    gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink &
    gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! waylandsink
    Do you observe the problem?

    What is PSDK version that you are using?
    Could you provide the debug logs from vip and gstreamer?

    Please check these e2e threads they could be in help:
    e2e.ti.com/.../2034147
    e2e.ti.com/.../2192304
    e2e.ti.com/.../2149230
    e2e.ti.com/.../587937

    You could check this thread in case one of your video sources is usb cam:
    e2e.ti.com/.../581003



    BR
    Margarita
  • Hi,
    Margarita,I do what you suggest.
    here are the log:

    [ 1238.492232] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.492239] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.492245] vip2-s1: vip buffer complete 0xdf919800, 0x0
    [ 1238.492254] vip2-s1: added next buffer
    [ 1238.492260] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe880000
    [ 1238.508913] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.508919] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.508925] vip2-s1: vip buffer complete 0xdf919a00, 0x0
    [ 1238.508934] vip2-s1: added next buffer
    [ 1238.508940] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe780000
    [ 1238.525593] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.525599] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.525605] vip2-s1: vip buffer complete 0xd56b6600, 0x0
    [ 1238.525615] vip2-s1: added next buffer
    [ 1238.525621] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe800000
    [ 1238.542273] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.542280] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.542285] vip2-s1: vip buffer complete 0xdf919c00, 0x0
    [ 1238.542294] vip2-s1: added next buffer
    [ 1238.542300] vip2-s1: start_dma: vb2 buf idx:3, dma_addr:0xbe900000
    [ 1238.558955] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.558963] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.558970] vip2-s1: vip buffer complete 0xdf919800, 0x0
    [ 1238.558979] vip2-s1: added next buffer
    [ 1238.558986] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe880000
    [ 1238.575633] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.575641] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.575647] vip2-s1: vip buffer complete 0xdf919a00, 0x0
    [ 1238.575656] vip2-s1: added next buffer
    [ 1238.575662] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe780000
    [ 1238.592330] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.592337] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.592343] vip2-s1: vip buffer complete 0xd56b6600, 0x0
    [ 1238.592352] vip2-s1: added next buffer
    [ 1238.592359] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe800000
    [ 1238.608993] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.609000] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.609007] vip2-s1: vip buffer complete 0xdf919c00, 0x0
    [ 1238.609015] vip2-s1: added next buffer
    [ 1238.609022] vip2-s1: start_dma: vb2 buf idx:3, dma_addr:0xbe900000
    [ 1238.625691] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.625697] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.625703] vip2-s1: vip buffer complete 0xdf919800, 0x0
    [ 1238.625712] vip2-s1: added next buffer
    [ 1238.625719] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe880000
    [ 1238.642370] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1238.642377] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1238.642382] vip2-s1: vip buffer complete 0xdf919a00, 0x0
    [ 1238.642392] vip2-s1: added next buffer
    [ 1238.642398] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe780000

    From the log,it seems that only the /dev/video2 is work fine.

    if I run "gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink", the vip log are:
    [ 885.844850] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.844856] vip2-s1: vip buffer complete 0xee3b8400, 0x0
    [ 885.844865] vip2-s1: Dropping frame
    [ 885.844869] vip2-s1: start_dma: dropped
    [ 885.861557] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.861564] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.861570] vip2-s1: vip buffer complete 0xdfe03200, 0x0
    [ 885.861580] vip2-s1: added next buffer
    [ 885.861586] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe600000
    [ 885.878236] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.878243] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.878249] vip2-s1: vip buffer complete 0xdfe03e00, 0x0
    [ 885.878258] vip2-s1: added next buffer
    [ 885.878264] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe680000
    [ 885.894917] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.894923] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.894929] vip2-s1: vip buffer complete 0xecb41800, 0x1
    [ 885.894934] vip2-s1: added next buffer
    [ 885.894940] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe700000
    [ 885.911596] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.911603] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.911608] vip2-s1: vip buffer complete 0xee3b8400, 0x0
    [ 885.911618] vip2-s1: Dropping frame
    [ 885.911623] vip2-s1: start_dma: dropped
    [ 885.928276] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.928284] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.928290] vip2-s1: vip buffer complete 0xdfe03200, 0x0
    [ 885.928298] vip2-s1: added next buffer
    [ 885.928305] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe600000
    [ 885.944956] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.944963] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.944969] vip2-s1: vip buffer complete 0xdfe03e00, 0x0
    [ 885.944977] vip2-s1: added next buffer
    [ 885.944984] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe680000
    [ 885.961653] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.961659] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.961665] vip2-s1: vip buffer complete 0xee3b0c00, 0x1
    [ 885.961670] vip2-s1: added next buffer
    [ 885.961677] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe700000
    [ 885.978332] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x1
    [ 885.978338] vip2-s1: IRQ 1: handling LIST0_COMPLETE
    [ 885.978343] vip2-s1: vip buffer complete 0xee3b8400, 0x0
    [ 885.978351] vip2-s1: Dropping frame
    [ 885.978355] vip2-s1: start_dma: dropped

    if I run "gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! waylandsink",the vip log are:
    [ 1037.660159] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe800000
    [ 1037.676799] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1037.676806] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1037.676812] vip2-s1: vip buffer complete 0xdfe0c600, 0x0
    [ 1037.676827] vip2-s1: Dropping frame
    [ 1037.676832] vip2-s1: start_dma: dropped
    [ 1037.693511] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1037.693518] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1037.693523] vip2-s1: vip buffer complete 0xec12a000, 0x0
    [ 1037.693538] vip2-s1: added next buffer
    [ 1037.693545] vip2-s1: start_dma: vb2 buf idx:2, dma_addr:0xbe880000
    [ 1037.710160] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1037.710167] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1037.710173] vip2-s1: vip buffer complete 0xec12bc00, 0x0
    [ 1037.710186] vip2-s1: added next buffer
    [ 1037.710193] vip2-s1: start_dma: vb2 buf idx:0, dma_addr:0xbe780000
    [ 1037.726872] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1037.726879] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1037.726885] vip2-s1: vip buffer complete 0xee3b1000, 0x1
    [ 1037.726890] vip2-s1: added next buffer
    [ 1037.726896] vip2-s1: start_dma: vb2 buf idx:1, dma_addr:0xbe800000
    [ 1037.743522] vip2-s1: IRQ 310 VIP_INT1_STATUS0 0x4
    [ 1037.743528] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [ 1037.743534] vip2-s1: vip buffer complete 0xdfe0c600, 0x0
    [ 1037.743548] vip2-s1: Dropping frame
    [ 1037.743553] vip2-s1: start_dma: dropped

    It shows me that the second capture will make the first capture not work.The root case should be the vip driver.There are some reason that I don't know.


    I am using the SDK03.01 and SDK04.01.
  • Hello,

    Please run:
    echo 3 > /sys/class/video4linux/videoX/dev_debug
    You could check this guide for vip debugging:
    processors.wiki.ti.com/.../Linux_Core_VIP_User's_Guide
    Could you add the gst debug log.
    I will consult with the vip expert also.

    BR
    Margarita
  • Hi Vefone,

    The logs that you shared doesn't suggest any issue with VIP. VIP is receiving the interrupts on both the channels.

    Also, dmabuftest is successfully able to capture multiple channels, this as well suggest no issues with VIP driver.

    I tried below pipeline, suggesting no issues with vpe and waylandsink plugin too -
    gst-launch-1.0 videotestsrc ! 'video/x-raw,format=(string)YUY2,width=(int)640,height=(int)480' ! queue ! vpe ! waylandsink &
    gst-launch-1.0 videotestsrc ! 'video/x-raw,format=(string)YUY2,width=(int)800,height=(int)480' ! queue ! vpe ! waylandsink &

    These all points that v4l2src gstreamer plugin has issues running multiple instances. Can you enable the debug logs for v4l2src plugin as well for kernel log as Margarita suggested in her post above -
    echo 3 > /sys/class/video4linux/videoX/dev_debug
  • Hello,

    Please could you check with pipeline like this:
    gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink silent=false name=fakesink0 v4l2src device=/dev/video2 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink silent=false name=fakesink1 -v

    BR
    Margarita
  • Hi,

    Margarita,still only one channel can work.

    here are the log:

    vip-log.txt
    [  531.151131] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.151144] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.151152] vip2-s1: vip buffer complete 0xcc55fa00, 0x0
    [  531.151165] vip2-s1: added next buffer
    [  531.151176] vip2-s1: start_dma: buf:0xcc55f000, vb:0xcc55f000, dma_addr:0x7daef000
    [  531.167857] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.167869] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.167877] vip2-s1: vip buffer complete 0xcc55fc00, 0x0
    [  531.167889] vip2-s1: added next buffer
    [  531.167898] vip2-s1: start_dma: buf:0xcc55f200, vb:0xcc55f200, dma_addr:0x7da9a000
    [  531.184508] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.184519] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.184527] vip2-s1: vip buffer complete 0xcc55fe00, 0x0
    [  531.184539] vip2-s1: added next buffer
    [  531.184549] vip2-s1: start_dma: buf:0xcc55f400, vb:0xcc55f400, dma_addr:0x7d770000
    [  531.201221] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.201233] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.201241] vip2-s1: vip buffer complete 0xcc55f000, 0x0
    [  531.201253] vip2-s1: added next buffer
    [  531.201263] vip2-s1: start_dma: buf:0xcc55f600, vb:0xcc55f600, dma_addr:0x7dcd8000
    [  531.217868] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.217879] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.217887] vip2-s1: vip buffer complete 0xcc55f200, 0x0
    [  531.217899] vip2-s1: added next buffer
    [  531.217909] vip2-s1: start_dma: buf:0xcc55f800, vb:0xcc55f800, dma_addr:0x7de81000
    [  531.234580] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.234591] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.234602] vip2-s1: vip buffer complete 0xcc55f400, 0x0
    [  531.234614] vip2-s1: added next buffer
    [  531.234624] vip2-s1: start_dma: buf:0xcc55fa00, vb:0xcc55fa00, dma_addr:0x7d8f0000
    [  531.251229] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.251239] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.251247] vip2-s1: vip buffer complete 0xcc55f600, 0x0
    [  531.251260] vip2-s1: added next buffer
    [  531.251269] vip2-s1: start_dma: buf:0xcc55fc00, vb:0xcc55fc00, dma_addr:0x7dbc3000
    [  531.267956] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.267966] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.267975] vip2-s1: vip buffer complete 0xcc55f800, 0x0
    [  531.267987] vip2-s1: added next buffer
    [  531.267996] vip2-s1: start_dma: buf:0xcc55fe00, vb:0xcc55fe00, dma_addr:0x7db6e000
    [  531.284605] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.284619] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.284628] vip2-s1: vip buffer complete 0xcc55fa00, 0x0
    [  531.284640] vip2-s1: added next buffer
    [  531.284649] vip2-s1: start_dma: buf:0xcc55f000, vb:0xcc55f000, dma_addr:0x7db19000
    [  531.301317] vip2-s1: IRQ 378 VIP_INT1_STATUS0 0x4
    [  531.301328] vip2-s1: IRQ 1: handling LIST1_COMPLETE
    [  531.301337] vip2-s1: vip buffer complete 0xcc55fc00, 0x0
    [  531.301352] vip2-s1: added next buffer
    [  531.301362] vip2-s1: start_dma: buf:0xcc55f200, vb:0xcc55f200, dma_addr:0x7dac4000
    gst-log.txt
    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink silent=false name=fakesink0 v4l2src device=/dev/video2 num-buffers=-1 io-mode=4 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! queue ! fakesink silent=false name=fakesink1 -v
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)c96f68af2481f051133a1874a933d9206964f7e590b05f10f1fe0f1ca55c9ac2, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0xb5504010
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = event   ******* (fakesink1:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)74387e2bbc5adbd216100f574a3d7fd368e2c2f6c5acdd0179e4f5645e887372, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)0;) 0x13ad40
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001;) 0xb5504110
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstVpe:vpe1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = event   ******* (fakesink1:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001;) 0x13ae40
    /GstPipeline:pipeline0/GstFakeSink:fakesink1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstVpe:vpe1.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1IDIOC_STREAMON
    1/, interlace-mode=(string)progressive, framerate=(fraction)300001001
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30000/1001
    [  522.710239] :
    [  522.728882] type=vid-cap
    [  522.737149] VIDIOC_STREAMON: type=vid-cap
    G/stPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = video/x-raw format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0xb5504190
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = event   ******* (fakesink0:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001;) 0xb55041d0
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = preroll   *******
    /GstPipeline:pipeline0/GstVpe:vpe1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = event   ******* (fakesink1:sink) E (type: segment (17934), GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x13aec0
    /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = event   ******* (fakesink1:sink) E (type: caps (12814), GstEventCaps, caps=(GstCaps)video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001;) 0x13af00
    /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = preroll   *******
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.374352000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609420
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (259200 bytes, dts: none, pts: 0:00:00.313725000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb550cd50
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (259200 bytes, dts: none, pts: 0:00:00.313757000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb550cdf0
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (259200 bytes, dts: none, pts: 0:00:00.313791000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609560
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (259200 bytes, dts: none, pts: 0:00:00.342828000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609600
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (259200 bytes, dts: none, pts: 0:00:00.342828000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609600
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.724711000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510cb8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.741390000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510d58
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.758071000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510df8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.774749000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609420
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.791430000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb56094c0
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.808111000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510c18
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.824807000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510cb8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.841471000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510d58
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.858168000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510df8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.874848000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609420
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.891528000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb56094c0
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.908208000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510c18
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.924904000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510cb8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.941567000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510d58
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.958262000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510df8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.974927000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5609420
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:00.991624000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb56094c0
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:01.008304000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510c18
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain   ******* (fakesink1:sink) (259200 bytes, dts: none, pts: 0:00:01.025000000, duration: none, offset: -1, offset_end: -1, flags: 00000000 ) 0xb5510cb8
    /GstPipeline:pipeline0/GstFakeSink:fakesink1: last-message = chain

    BR,

    vefone

  • Hi,

    manisha ,

    I think the reason would be the vip and vpdma.

    The first test:

    I disable the pixel clock output of tvp5158,after I start four channel capture using the below command.

    gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    gst-launch-1.0 v4l2src device=/dev/video3 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    gst-launch-1.0 v4l2src device=/dev/video4 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    then I enable the pixel clock output of tvp5158.By this way, I can capture four channel.Then I kill one gst-launch-1.0 process(one of four),the other channels will not work fine.

    I guess that: 

    1. It seems that I need to let the data input after I had streamed on all the channel.

    2. If I stop one channle capture,the data is deranged(vpdma list is not ok),then the vip can not get the data(had not irq occurred).

    The second test:

    I use two tvp5158 module,one is connect to vin3a,one is connect to vin4a. the first tvp5158's four channel (/dev/video1、/dev/video2、/dev/video3、/dev/video4). The second tvp5158(/dev/video5、/dev/video6、/dev/video7、/dev/video8). I run the command to test:

    gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    gst-launch-1.0 v4l2src device=/dev/video5 num-buffers=-1 ! 'video/x-raw,format=(string)YUY2, width=(int)720, height=(int)240' ! fakesink

    the two channel capture is fine.

    After done the two test,I double that there are maybe some problem of vip driver.

    1. There are some problem that the same vin support the  multichannel. vip driver can not support multichannel independently.

    if I start the first channel(vip had got the data and  irq had occurred),then start the second channel,only the second channel work fine. 

    2. The different vin port(just like vin3a and vin4a),channel capture is independently.

    I'm not familiar with vpdma. Especially the vpdma list.

    any suggestion?

    BR,

    vefone

  • Hi Vefone,

    To make the debugging simple, if the problem lies within vip driver, I would like to eliminate gstreamer complexity from the test scenario. Wondering if you can use Yavta to test multiple channel. Also, when you use below to generate debug logs, they are collected in dmesg, so please share the dmesg logs too.
    echo 3 > /sys/class/video4linux/videoX/dev_debug

    Also, enable the vip logs using
    echo 3 > /sys/module/ti_vip/parameters/debug

    You can run Yavta using below command. Here W and H are width and height you want to capture.
    yavta -c60 -fYUYV -F/dev/null -sWxH /dev/videoX
  • Hi,

    manisha .I had used the yavta  to test it.The situation is the same as I described earlier(use the gst-launch-1.0).

    I do two test as the before.

    First:

    enable the pixel clock out of tvp5158,run the command below;

    echo '\n' |  yavta -c100 -p -F/home/root/1.yuv --skip 2 -t 1/30 -f YUYV -s 720x240 /dev/video1

    echo '\n' |  yavta -c100 -p -F/home/root/2.yuv --skip 2 -t 1/30 -f YUYV -s 720x240 /dev/video2

    here the log:

    ya-1.txt
    [  635.840003] vip2-s1: vip_open
    [  635.840025] vip2-s1: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV12 size: 720x240
    [  635.840039] vip2-s1: calc_format_size: fourcc:NV12 size: 720x240 bpl:720 img_size:259200
    [  635.840049] vip2-s1: init_stream fourcc:NV12 size: 720x240 bpl:720 img_size:259200
    [  635.840056] vip2-s1: init_stream vpdma data type: 0x02
    [  635.840065] vip2-s1: vip_init_stream: stream instance 0x00000000dfa2e000
    [  635.840181] video1: VIDIOC_QUERYCAP: driver=vip, card=vip, bus=platform:vip, version=0x00040413, capabilities=0x85200001, device_caps=0x05200001
    [  635.840235] vip2-s1: s_fmt input fourcc:YUYV size: 720x240
    [  635.840244] vip2-s1: try_fmt fourcc:YUYV size: 720x240
    [  635.840253] vip2-s1: try_fmt loop:0 fourcc:YUYV size: 720x240
    [  635.840261] vip2-s1: try_fmt loop:0 found new larger: 720x240
    [  635.840268] vip2-s1: try_fmt loop:0 found at least larger: 720x240
    [  635.840275] vip2-s1: try_fmt loop:0 found new best: 720x240
    [  635.840282] vip2-s1: try_fmt loop:0 found direct match: 720x240
    [  635.840290] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  635.840297] vip2-s1: s_fmt try_fmt fourcc:YUYV size: 720x240
    [  635.840305] vip2-s1: s_fmt fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  635.840312] vip2-s1: s_fmt pix_to_mbus mbus_code: 2006 size: 720x240
    [  635.840319] vip2-s1: s_fmt subdev fmt mbus_code: 2006 size: 720x240
    [  635.840326] vip2-s1: s_fmt vpdma data type: 0x07
    [  635.840332] video1: VIDIOC_S_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  635.840383] vip2-s1: g_fmt fourcc:YUYV code: 2006 size: 720x240 bpl:1440 img_size:345600
    [  635.840391] vip2-s1: g_fmt vpdma data type: 0x07
    [  635.840397] video1: VIDIOC_G_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  635.840439] video1: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  635.840484] video1: VIDIOC_S_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  635.840508] video1: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  635.840546] vip2-s1: get 8 buffer(s) of size 345600 each.
    [  635.842944] video1: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [  635.843106] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=345600
    [  635.843137] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843192] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x55000, length=345600
    [  635.843220] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843270] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xaa000, length=345600
    [  635.843297] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843341] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xff000, length=345600
    [  635.843366] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843413] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=4, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x154000, length=345600
    [  635.843438] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843482] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=5, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1a9000, length=345600
    [  635.843507] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843557] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=6, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1fe000, length=345600
    [  635.843583] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843624] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=7, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x253000, length=345600
    [  635.843649] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  635.843784] vip2-s1: vip_set_slice_path:
    [  635.843795] vip2-s1: vip_set_slice_path: DATA_PATH_SELECT(00000110): 00008000
    [  635.844079] vip2-s1: start_streaming: buf 0xedf51800 8
    [  635.844088] vip2-s1: start_streaming video1: index(0), mask(0x1)
    [  635.884986] vip2-s1: start_streaming: start_dma buf 0xedf51800
    [  635.885004] video1: VIDIOC_STREAMON: type=vid-cap
    [  636.141404] vip2-s1: vip_open
    [  636.141425] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  636.141436] vip2-s1: init_stream fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  636.141446] vip2-s1: init_stream vpdma data type: 0x07
    [  636.141458] vip2-s1: vip_init_stream: stream instance 0x00000000dfa2d800
    [  636.141563] video2: VIDIOC_QUERYCAP: driver=vip, card=vip, bus=platform:vip, version=0x00040413, capabilities=0x85200001, device_caps=0x05200001
    [  636.141638] vip2-s1: s_fmt input fourcc:YUYV size: 720x240
    [  636.141649] vip2-s1: try_fmt fourcc:YUYV size: 720x240
    [  636.141661] vip2-s1: try_fmt loop:0 fourcc:YUYV size: 720x240
    [  636.141669] vip2-s1: try_fmt loop:0 found new larger: 720x240
    [  636.141677] vip2-s1: try_fmt loop:0 found at least larger: 720x240
    [  636.141685] vip2-s1: try_fmt loop:0 found new best: 720x240
    [  636.141693] vip2-s1: try_fmt loop:0 found direct match: 720x240
    [  636.141703] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  636.141714] vip2-s1: s_fmt try_fmt fourcc:YUYV size: 720x240
    [  636.141743] vip2-s1: s_fmt fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  636.141751] vip2-s1: s_fmt pix_to_mbus mbus_code: 2006 size: 720x240
    [  636.141760] vip2-s1: s_fmt subdev fmt mbus_code: 2006 size: 720x240
    [  636.141768] vip2-s1: s_fmt vpdma data type: 0x07
    [  636.141775] video2: VIDIOC_S_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  636.141867] vip2-s1: g_fmt fourcc:YUYV code: 2006 size: 720x240 bpl:1440 img_size:345600
    [  636.141877] vip2-s1: g_fmt vpdma data type: 0x07
    [  636.141885] video2: VIDIOC_G_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  636.141959] video2: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  636.142065] video2: VIDIOC_S_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  636.142097] video2: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  636.142168] vip2-s1: get 8 buffer(s) of size 345600 each.
    [  636.148740] video2: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [  636.148920] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=345600
    [  636.148953] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149016] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x55000, length=345600
    [  636.149044] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149102] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xaa000, length=345600
    [  636.149129] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149178] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xff000, length=345600
    [  636.149206] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149253] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=4, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x154000, length=345600
    [  636.149278] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149325] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=5, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1a9000, length=345600
    [  636.149352] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149399] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=6, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1fe000, length=345600
    [  636.149425] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149471] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=7, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x253000, length=345600
    [  636.149497] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  636.149647] vip2-s1: vip_set_slice_path:
    [  636.149659] vip2-s1: vip_set_slice_path: DATA_PATH_SELECT(00000110): 00008000
    [  636.149957] vip2-s1: start_streaming: buf 0xedd7a000 8
    [  636.149967] vip2-s1: start_streaming video2: index(1), mask(0x3)
    [  636.149979] vip2-s1: start_streaming: start_dma buf 0xedd7a000
    [  636.149991] video2: VIDIOC_STREAMON: type=vid-cap
    [  637.844343] vip2-s1: vip_stop_streaming:
    [  637.844354] vip2-s1: vip_disable_sc_path:
    [  637.844361] vip2-s1: stop_streaming video2: index(1), mask(0x1)
    [  637.844369] vip2-s1: Clear channel no: 110
    [  637.844390] video2: VIDIOC_STREAMOFF: type=vid-cap
    [  637.845045] video2: VIDIOC_REQBUFS: count=0, type=vid-cap, memory=mmap
    [  637.845080] vip2-s1: vip_release
    [  637.845092] function: vip_release line: 2403
    [  637.849470] vip2-s1: vip_release_stream: stream instance 0xceab7ef0dfa2d800

    After I run "echo '\n' |  yavta -c100 -p -F/home/root/2.yuv --skip 2 -t 1/30 -f YUYV -s 720x240~/dev/video2" to capture the second channel,the first channel capture will stop just like the picture above shows.

    Second:

    disable the pixel clock out of tvp5158,run the command below;

    echo '\n' |  yavta -c100 -p -F/home/root/1.yuv --skip 2 -t 1/30 -f YUYV -s 720x240 /dev/video1

    echo '\n' |  yavta -c100 -p -F/home/root/2.yuv --skip 2 -t 1/30 -f YUYV -s 720x240 /dev/video2

    After that,I enable  the pixel clock out of tvp5158.By this way, I can capture two channel completely.

    here the log:

    ya-0.txt
    [  437.385871] vip2-s1: vip_open
    [  437.385894] vip2-s1: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV12 size: 720x240
    [  437.385910] vip2-s1: calc_format_size: fourcc:NV12 size: 720x240 bpl:720 img_size:259200
    [  437.385919] vip2-s1: init_stream fourcc:NV12 size: 720x240 bpl:720 img_size:259200
    [  437.385926] vip2-s1: init_stream vpdma data type: 0x02
    [  437.385936] vip2-s1: vip_init_stream: stream instance 0x00000000dfa2e000
    [  437.386062] video1: VIDIOC_QUERYCAP: driver=vip, card=vip, bus=platform:vip, version=0x00040413, capabilities=0x85200001, device_caps=0x05200001
    [  437.386112] vip2-s1: s_fmt input fourcc:YUYV size: 720x240
    [  437.386121] vip2-s1: try_fmt fourcc:YUYV size: 720x240
    [  437.386131] vip2-s1: try_fmt loop:0 fourcc:YUYV size: 720x240
    [  437.386138] vip2-s1: try_fmt loop:0 found new larger: 720x240
    [  437.386145] vip2-s1: try_fmt loop:0 found at least larger: 720x240
    [  437.386152] vip2-s1: try_fmt loop:0 found new best: 720x240
    [  437.386158] vip2-s1: try_fmt loop:0 found direct match: 720x240
    [  437.386166] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  437.386174] vip2-s1: s_fmt try_fmt fourcc:YUYV size: 720x240
    [  437.386182] vip2-s1: s_fmt fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  437.386189] vip2-s1: s_fmt pix_to_mbus mbus_code: 2006 size: 720x240
    [  437.386196] vip2-s1: s_fmt subdev fmt mbus_code: 2006 size: 720x240
    [  437.386203] vip2-s1: s_fmt vpdma data type: 0x07
    [  437.386209] video1: VIDIOC_S_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  437.386261] vip2-s1: g_fmt fourcc:YUYV code: 2006 size: 720x240 bpl:1440 img_size:345600
    [  437.386268] vip2-s1: g_fmt vpdma data type: 0x07
    [  437.386273] video1: VIDIOC_G_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  437.386314] video1: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  437.386358] video1: VIDIOC_S_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  437.386382] video1: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  437.386420] vip2-s1: get 8 buffer(s) of size 345600 each.
    [  437.389383] video1: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [  437.389544] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=345600
    [  437.389574] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.389629] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x55000, length=345600
    [  437.389656] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.389708] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xaa000, length=345600
    [  437.389735] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.389777] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xff000, length=345600
    [  437.389804] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.396467] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=4, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x154000, length=345600
    [  437.396498] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.396545] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=5, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1a9000, length=345600
    [  437.396572] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.396616] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=6, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1fe000, length=345600
    [  437.396642] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  437.396685] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=7, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x253000, length=345600
    [  437.396710] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  438.103680] vip2-s1: vip_set_slice_path:
    [  438.103695] vip2-s1: vip_set_slice_path: DATA_PATH_SELECT(00000110): 00008000
    [  438.103977] vip2-s1: start_streaming: buf 0xedfa6400 8
    [  438.103987] vip2-s1: start_streaming video1: index(0), mask(0x1)
    [  438.150104] vip2-s1: start_streaming: start_dma buf 0xedfa6400
    [  438.150120] video1: VIDIOC_STREAMON: type=vid-cap
    [  444.620702] vip2-s1: vip_open
    [  444.620723] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  444.620734] vip2-s1: init_stream fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  444.620741] vip2-s1: init_stream vpdma data type: 0x07
    [  444.620752] vip2-s1: vip_init_stream: stream instance 0x00000000dfa2d800
    [  444.620990] video2: VIDIOC_QUERYCAP: driver=vip, card=vip, bus=platform:vip, version=0x00040413, capabilities=0x85200001, device_caps=0x05200001
    [  444.621131] vip2-s1: s_fmt input fourcc:YUYV size: 720x240
    [  444.621141] vip2-s1: try_fmt fourcc:YUYV size: 720x240
    [  444.621151] vip2-s1: try_fmt loop:0 fourcc:YUYV size: 720x240
    [  444.621159] vip2-s1: try_fmt loop:0 found new larger: 720x240
    [  444.621166] vip2-s1: try_fmt loop:0 found at least larger: 720x240
    [  444.621173] vip2-s1: try_fmt loop:0 found new best: 720x240
    [  444.621180] vip2-s1: try_fmt loop:0 found direct match: 720x240
    [  444.621188] vip2-s1: calc_format_size: fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  444.621195] vip2-s1: s_fmt try_fmt fourcc:YUYV size: 720x240
    [  444.621203] vip2-s1: s_fmt fourcc:YUYV size: 720x240 bpl:1440 img_size:345600
    [  444.621210] vip2-s1: s_fmt pix_to_mbus mbus_code: 2006 size: 720x240
    [  444.621218] vip2-s1: s_fmt subdev fmt mbus_code: 2006 size: 720x240
    [  444.621224] vip2-s1: s_fmt vpdma data type: 0x07
    [  444.621230] video2: VIDIOC_S_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  444.621374] vip2-s1: g_fmt fourcc:YUYV code: 2006 size: 720x240 bpl:1440 img_size:345600
    [  444.621383] vip2-s1: g_fmt vpdma data type: 0x07
    [  444.621389] video2: VIDIOC_G_FMT: type=vid-cap, width=720, height=240, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=345600, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  444.621524] video2: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  444.621751] video2: VIDIOC_S_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  444.621777] video2: VIDIOC_G_PARM: type=vid-cap, capability=0x1000, capturemode=0x0, timeperframe=1/30, extendedmode=0, readbuffers=4
    [  444.621901] vip2-s1: get 8 buffer(s) of size 345600 each.
    [  444.624845] video2: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [  444.625121] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=345600
    [  444.625153] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.625408] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x55000, length=345600
    [  444.625437] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.625662] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xaa000, length=345600
    [  444.625690] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.625928] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xff000, length=345600
    [  444.625956] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.626179] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=4, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x154000, length=345600
    [  444.626207] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.626443] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=5, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1a9000, length=345600
    [  444.626470] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.626694] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=6, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1fe000, length=345600
    [  444.626722] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  444.626946] video2: VIDIOC_QUERYBUF: 00:00:00.00000000 index=7, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x253000, length=345600
    [  444.626974] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  445.132332] vip2-s1: vip_set_slice_path:
    [  445.132346] vip2-s1: vip_set_slice_path: DATA_PATH_SELECT(00000110): 00008000
    [  445.132630] vip2-s1: start_streaming: buf 0xed90b600 8
    [  445.132639] vip2-s1: start_streaming video2: index(1), mask(0x3)
    [  445.132652] vip2-s1: start_streaming: start_dma buf 0xed90b600
    [  445.132665] video2: VIDIOC_STREAMON: type=vid-cap

    Thank you for paying close attention to it.

    BR,

    vefone

  • Thanks vefone for running the test case using Yavta and sharing the observation along with logs. We will look into it and get back if more information required.
  • Hi,
    manisha, I will wait for your reply. I can no longer debug any more.It is too hard.

    Br,
    vefone
  • Hello,

    There will be a delay in response due the thanksgiving holidays.
    Sorry for the inconvenience.

    BR
    Margarita
  • From where did you get the TVP5158 driver? Did you do any modifications to the original driver that you received?
  • Hi,

    manisha , I am using from the link:

    I modify the driver tvp5158_enum_frame_size function only:

    fse->max_height = fse->min_height = std_list[std].height;  to fse->max_height = fse->min_height = std_list[std].height / 2;

    If I do not modify that,the image is not ok,which had described below:

    BR,

    vefone

  • Hi Vefone,

    We are investigating this. I shall update you when we make a progress.

    Regards,
    Manisha
  • Hi Vefone,

    Please try attached patch and let me know if this fixes the issue you are seeing. 

    tiL4.9-AD-media-ti-vpe-vip-Fix-multichannel-subdevice-start-stop.patch

    Regards,

    Manisha

  • Hi,

    Manisha, I had test the patch on the linux-4.9.41. It is work fine. I will merge it to SDK03.01 linux4.4.19.

    Thank you very much!

    vefone

  • Hi,

    Manisha,we should do more on the vip_stop_streaming function. If not add that, stop one channel,the other channel will not work fine.

  • Hi,
    Manisha,
    I use the patch,the start_stream operation is ok, the multichannel subdevice of one vport start operation independently,but if I stop one channel,the other channel is not ok.It is because of stop_dma function.

    I modify the vip_stop_streaming like that: 

    Only stop_dma when the last channel stop. It is ok,but  the second time I run the capture command.The kernel is not fine.

    the command that I use is "gst-launch-1.0 -v -e v4l2src device=/dev/video1 num-buffers=150 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)240' ! filesink location=/dev/null"

    Here are the log:

    root@am57xx-evm:~# gst-launch-1.0 -v -e v4l2src device=/dev/video1 num-buffers=150 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)240' ! filesink location=/dev/null
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    Got EOS from element "pipeline0".
    Execution ended after 0:00:03.408517975
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~# gst-launch-1.0 -v -e v4l2src device=/dev/video1 num-buffers=150 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)720, height=(int)240' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)240' ! filesink location=/dev/null
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)720\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    069] ------------[ cut here ]------------
    [ 67.242892] WARNING: CPU: 0 PID: 1150 at drivers/media/v4l2-core/videobuf2-core.c:1315 vb2_start_streaming+0xe0/0x15c()
    [ 67.253804] Modules linked in: tvp5158 bc_example(O) rpmsg_proto rpmsg_pru xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo bluetooth virtio_rpmsg_bus snd_soc_simple_card snd_soc_tvp5158_audio pwm_fan pwm_omap_dmtimer snd_soc_omap_hdmi_audio pvrsrvkm(O) pru_rproc pruss_intc c_can_platform c_can ti_vip can_dev ahci_platform libahci_platform pruss libahci omap_wdt libata gv7601 mt9t11x ti_vpe ti_sc ads7846 rtc_omap snd_soc_tlv320aic3x ti_vpdma extcon_palmas rtc_palmas omap_rng rng_core omap_remoteproc remoteproc virtio debugss_kmodule(O) virtio_ring sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) cmemk(O)
    [ 67.310225] CPU: 0 PID: 1150 Comm: v4l2src0:src Tainted: G O 4.4.19+ #4
    [ 67.317997] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 67.324110] Backtrace:
    [ 67.326579] [<c00130ec>] (dump_backtrace) from [<c00132e8>] (show_stack+0x18/0x1c)
    [ 67.334175] r7:c04ef944 r6:600f0013 r5:00000000 r4:c09aae4c
    [ 67.339885] [<c00132d0>] (show_stack) from [<c02b35a8>] (dump_stack+0x8c/0xa0)
    [ 67.347139] [<c02b351c>] (dump_stack) from [<c003499c>] (warn_slowpath_common+0x88/0xb8)
    [ 67.355259] r7:c04ef944 r6:00000523 r5:00000009 r4:00000000
    [ 67.360966] [<c0034914>] (warn_slowpath_common) from [<c0034a70>] (warn_slowpath_null+0x24/0x2c)
    [ 67.369783] r8:c09c9ae0 r7:fffffff0 r6:ec84dc68 r5:ec84debc r4:ec84ddc4
    [ 67.376546] [<c0034a4c>] (warn_slowpath_null) from [<c04ef944>] (vb2_start_streaming+0xe0/0x15c)
    [ 67.385366] [<c04ef864>] (vb2_start_streaming) from [<c04f1564>] (vb2_core_streamon+0x120/0x168)
    [ 67.394183] r7:c04dbfc0 r6:ee12c800 r5:ee0c3d80 r4:ec84dc68
    [ 67.399888] [<c04f1444>] (vb2_core_streamon) from [<c04f33a4>] (vb2_streamon+0x38/0x58)
    [ 67.407921] r5:ee0c3d80 r4:00000001
    [ 67.411521] [<c04f336c>] (vb2_streamon) from [<c04f3408>] (vb2_ioctl_streamon+0x44/0x48)
    [ 67.419645] [<c04f33c4>] (vb2_ioctl_streamon) from [<c04dbfe4>] (v4l_streamon+0x24/0x28)
    [ 67.427764] r5:40045612 r4:c04f33c4
    [ 67.431363] [<c04dbfc0>] (v4l_streamon) from [<c04dfdf8>] (__video_do_ioctl+0x298/0x30c)
    [ 67.439482] r5:40045612 r4:00000001
    [ 67.443083] [<c04dfb60>] (__video_do_ioctl) from [<c04df8a0>] (video_usercopy+0x21c/0x4c0)
    [ 67.451377] r10:ec5b7e30 r9:00159d24 r8:00000001 r7:00000000 r6:00000004 r5:00000004
    [ 67.459268] r4:40045612
    [ 67.461815] [<c04df684>] (video_usercopy) from [<c04dfb5c>] (video_ioctl2+0x18/0x1c)
    [ 67.469585] r10:00000000 r9:ec5b6000 r8:ee0d3ecc r7:00159d24 r6:40045612 r5:ee0c3d80
    [ 67.477472] r4:ee12c800
    [ 67.480018] [<c04dfb44>] (video_ioctl2) from [<c04daab0>] (v4l2_ioctl+0xa8/0xe0)
    [ 67.487443] [<c04daa08>] (v4l2_ioctl) from [<c013062c>] (do_vfs_ioctl+0x454/0x60c)
    [ 67.495038] r9:ec5b6000 r8:00159d24 r7:0000000b r6:ee0c3d80 r5:ec4b2648 r4:00159d24
    [ 67.502841] [<c01301d8>] (do_vfs_ioctl) from [<c0130820>] (SyS_ioctl+0x3c/0x64)
    [ 67.510175] r10:00000000 r9:ec5b6000 r8:00159d24 r7:40045612 r6:ee0c3d80 r5:0000000b
    [ 67.518064] r4:ee0c3d81
    [ 67.520611] [<c01307e4>] (SyS_ioctl) from [<c000fa60>] (ret_fast_syscall+0x0/0x34)
    [ 67.528207] r9:ec5b6000 r8:c000fc04 r7:00000036 r6:b6a593c8 r5:b4b061c0 r4:00000000
    [ 67.536100] ---[ end trace 6af34e5df5bf2a76 ]---
    REROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Culd not read from resource.
    Additional debug info:
    ../../../gst-plugins-good-1.6.3/sys/v4l2/gstv4l2bufferpool.c(1055): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    poll error 1: Device or resource busy (16)
    EOS on shutdown enabled -- waiting for EOS after Error
    Waiting for EOS...
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate a buffer
    Additional debug info:
    ../../../gst-plugins-good-1.6.3/sys/v4l2/gstv4l2src.c(848): gst_v4l2src_create (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)

    any suggestion?

    BR,

    vefone

  • Hi Vefone,

    Proper fix for stop streaming is involved effort. We expect to provide the fix for this in Proc SDK release in 1Q, 2018.