Re: ADV7180 Capture with i.MX53

Steve Longerbeam
2019-10-08T00:37:24Z

Hi Fabio,

On 10/7/19 5:15 PM, Fabio Estevam wrote:
> Hi Steve,
>
> Are you still able to capture from the camera on the imx53-smd board
> with kernel 5.3.x?

I haven't tried the SMD board in a while, it's possible something broke,
but see below...

>
> I have a custom board with a ADV7180 and it gets detected like this:
>
> [ 2.970246] ipu1_csi0: Registered ipu1_csi0 capture as /dev/video0
> [ 2.979741] ipu1_ic_prpenc: Registered ipu1_ic_prpenc capture as /dev/video1
> [ 2.988930] ipu1_ic_prpvf: Registered ipu1_ic_prpvf capture as /dev/video2
> [ 2.996264] imx-media: ipu1_csi0:1 -> ipu1_ic_prp:0
> [ 3.001685] mmc0: host does not support reading read-only switch,
> assuming write-enable
> [ 3.009925] imx-media: ipu1_csi0:1 -> ipu1_vdic:0
> [ 3.014659] imx-media: ipu1_vdic:2 -> ipu1_ic_prp:0
> [ 3.019929] imx-media: ipu1_ic_prp:1 -> ipu1_ic_prpenc:0
> [ 3.025305] imx-media: ipu1_ic_prp:2 -> ipu1_ic_prpvf:0
> [ 3.032039] mmc0: new high speed SDHC card at address aaaa
> [ 3.038252] imx-media: subdev ipu1_csi0 bound
> ...
> [ 24.974982] adv7180 1-0021: chip found @ 0x21 (63fc4000.i2c)
> [ 25.324516] imx-media: adv7180 1-0021:0 -> ipu1_csi0:0
>
> Then I setup the pipelines:
>
> # media-ctl -l "'adv7180 1-0021':0 -> 'ipu1_csi0':[1]"
> # media-ctl -l "'ipu1_csi0':2 -> 'ipu1_csi0 capture':0[1]"
> # media-ctl -V "'adv7180 1-0021':0 [fmt:UYVY2X8/720x480 field:seq-bt]"

The adv7180 driver in 5.3.x doesn't support seq-bt, only alternate. So
pad format should be "[fmt:UYVY2X8/720x240 field:alternate]".

> # media-ctl -V "'ipu1_csi0':2 [fmt:AYUV32/720x480]"
>
> # gst-launch-1.0 v4l2src ! fakesink
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> [ 929.317827] ipu1_csi0: pipeline start failed with -32

This probably means there was a pad format mismatch. Try enabling
dynamic debug.

Steve

> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed
> to allocate required memory.
> Additional debug info:
> ../../../gst-plugins-good-1.14.4/sys/v4l2/gstv4l2src.c(658):
> gst_v4l2src_decide_allocation ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Buffer pool activation failed
> Execution ended after 0:00:00.035375819
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> My device tree changes to add the ADV7180 are listed here:
> http://code.bulix.org/ez8yax-901750
>
> Am I calling the correct media-ctl commands?
>
> Any ideas, please?
>
> Thanks,
>
> Fabio Estevam