i.MX6 adv7180 testing with gstreamer with Mainline Linux

Jagan Teki jagan at amarulasolutions.com
Wed May 23 11:45:35 UTC 2018


Hi Philipp,

On Thu, May 3, 2018 at 4:37 PM, Philipp Zabel <p.zabel at pengutronix.de> wrote:
> Hi Jagan,
>
> On Thu, 2018-05-03 at 16:13 +0530, Jagan Teki wrote:
>> Hi,
>>
>> I'm trying to use gstreamer for ADV7180 camera on i.MX6DL board with
>> Mainline Linux. look like I was able to probe the adv7180 where I can
>> see dev/media0
>>
>> I'm using latest buildroot to enable gstreamer 1.x, but couldn't find
>> proper plugin to test the camera.
>
> Just v4l2src should do.
>
> You also need media-ctl from v4l-utils to configure the pipeline as
> documented in Documentation/media/v4l-drivers/imx.rst [1].

Thanks for the inputs.

I've setup the links and configured the pads based on the information
from Documentation/media/v4l-drivers/imx.rst and adv7180 probing
details from dmesg[2]

media-ctl -l "'adv7180 2-0020':0 -> 'ipu1_csi0_mux':4[1]"
media-ctl -l "'ipu1_csi0_mux':5 -> 'ipu1_csi0':0[1]"
media-ctl -l "'ipu1_csi0':1 -> 'ipu1_vdic':0[1]"
media-ctl -l "'ipu1_vdic':2 -> 'ipu1_ic_prp':0[1]"
media-ctl -l "'ipu1_ic_prp':2 -> 'ipu1_ic_prpvf':0[1]"
media-ctl -l "'ipu1_ic_prpvf':1 -> 'ipu1_ic_prpvf capture':0[1]"

media-ctl -V "'adv7180 2-0020':0 [fmt:UYVY2X8/720x480]"
media-ctl -V "'ipu1_csi0_mux':5 [fmt:UYVY2X8/720x480 field:interlaced]"
media-ctl -V "'ipu1_csi0':1 [fmt:AYUV32/720x480 field:interlaced]"
media-ctl -V "'ipu1_vdic':2 [fmt:AYUV32/720x480 field:none]"
media-ctl -V "'ipu1_ic_prp':2 [fmt:AYUV32/720x480 field:none]"
media-ctl -V "'ipu1_ic_prpvf':1 [fmt:AYUV32/720x480 field:none]"

And launched gstreamer with v4l2src with ipu1_ic_prpvf capture device
file /dev/video1 based on media-ctrl[3] information, but can't see
anything on display.

# GST_DEBUG=v4l2src:5 gst-launch-1.0 -v v4l2src device=/dev/video1 ! autovideosi
nk
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.351053667   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:300:gst_v4l2src_negotiate:<v4l2src0> caps of src:
video/x-raw, format=(string)YUY2, framerat
e=(fraction)30000/1001, width=(int)720, height=(int)480,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }; video/x-raw
, format=(string)UYVY, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry
=(string){ bt601 }; video/x-raw, format=(string)Y42B,
framerate=(fraction)30000/1001, width=(int)720, height=(int)480,
interlace-mode=(string)progressive, pixel-aspect-r
atio=(fraction)1/1, colorimetry=(string){ bt601 }; video/x-raw,
format=(string)I420, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480, interlace-mode=(str
ing)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }; video/x-raw, format=(string)YV12,
framerate=(fraction)30000/1001, width=(int)720, heigh
t=(int)480, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string){ bt601 };
video/x-raw, format=(string)NV16, framerate=(fraction)30
000/1001, width=(int)720, height=(int)480,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }; video/x-raw, format=(stri
ng)NV12, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string){ bt6
01 }
0:00:00.353194334   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:308:gst_v4l2src_negotiate:<v4l2src0> caps of peer:
video/x-raw, format=(string){ BGRA, BGRx,
 RGBA, RGBx, UYVY, YUY2, YVYU, I420, YV12, Y42B, NV12, NV16 },
width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(fraction)[
0/1, 2147483647/1 ]
0:00:00.355088667   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:316:gst_v4l2src_negotiate:<v4l2src0> intersect:
video/x-raw, format=(string)YUY2, width=(int
)720, height=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }; video/x-raw,
format=(string)UYVY, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(
string){ bt601 }; video/x-raw, format=(string)Y42B, width=(int)720,
height=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-rat
io=(fraction)1/1, colorimetry=(string){ bt601 }; video/x-raw,
format=(string)I420, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, interlace-mode=(strin
g)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string){
bt601 }; video/x-raw, format=(string)YV12, width=(int)720,
height=(int)480, framerate=(fraction)30
000/1001, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string){ bt601 };
video/x-raw, format=(string)NV16, width=(int)720, height=(
int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }; video/x-raw, format=(string
)NV12, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string){ bt601
 }
0:00:00.356888667   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:256:gst_v4l2src_fixate:<v4l2src0> fixating caps
video/x-raw, format=(string)YUY2, width=(int
)720, height=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }
0:00:00.358130667   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:282:gst_v4l2src_fixate:<v4l2src0> fixated caps
video/x-raw, format=(string)YUY2, width=(int)
720, height=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string){ bt601 }
0:00:00.692675334   214  0x158c580 DEBUG                v4l2src
gstv4l2src.c:367:gst_v4l2src_negotiate:<v4l2src0> fixated to:
video/x-raw, format=(string)YUY2, width=(in
t)720, height=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)bt601
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
video/x-raw, format=(string)YUY2, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, interlac
e-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = video/x-raw, format=(string)YUY2, width=(int)720,
height=(int)480,
framerate=(fraction)30000/1001, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms.GstPad:sink:
caps = video/x-raw, format=(string)YUY2, width=(int)720, he
ight=(int)480, framerate=(fraction)30000/1001,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink:
caps = video/x-raw, format=(string)YUY2, width=(int)720,
height=(int)480, framerate=(fraction)30
000/1001, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt601
[  718.646275] ipu1_ic_prpvf: EOF timeout
0:00:01.770313000   214  0x158c580 WARN                 v4l2src
gstv4l2src.c:866:gst_v4l2src_create:<v4l2src0> error: Failed to
allocate a buffer
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
not read from resource.
Additional debug info:
gstv4l2bufferpool.c(1064): gst_v4l2_buffer_pool_poll ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Success (0)
Execution ended after 0:00:01.421747666
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
[  719.686516] ipu1_ic_prpvf: wait last EOF timeout
Setting pipeline to NULL ...
Freeing pipeline ...

Please let me know if missing anything, here is my dts changes[4]

[2] https://paste.ubuntu.com/p/Q6gNhgWWpr/
[3] https://paste.ubuntu.com/p/YGPFrFq29X/
[4] https://paste.ubuntu.com/p/bKVHVcQNSK/

Jagan.

-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.


More information about the gstreamer-devel mailing list