ov5642 camera + gstreamer = VIDIOC_DQBUF error

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

ov5642 camera + gstreamer = VIDIOC_DQBUF error

3,796 Views
ivannikolaenko
Contributor IV

Hi all,

I am trying to connect ov5642 camera to i.MX6Q-based custom board (3.14.28 kernel).

I successfully boot kernel with camera ov5642 is found message,

but when I try gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform ! imxipuvideosink I get:

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data flow error.

Additional debug info:

/home/i_nikolaenko/devel/freescale/fsl-community-bsp/build-rootfs/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.4.5-r0/gstreamer-1.4.5/libs/gst/base/gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:

streaming task paused, reason error (-5)

Execution ended after 0:00:10.037558668

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

GST_DEBUG=2,*imx*:9 gst-launch-1.0  imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform ! imxipuvideosink shows next error message:

New clock: GstSystemClock

0:00:01.620390667   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:292:gst_imx_v4l2_buffer_pool_start:<imxv4l2bufferpool0> start

0:00:01.620532667   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 0 0xbff650

0:00:01.620788000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 0 0xbff650

0:00:01.620883000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 1 0xbff6f0

0:00:01.620995000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 1 0xbff6f0

0:00:01.621070000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 2 0x76008828

0:00:01.621168667   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 2 0x76008828

0:00:01.621250000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 3 0x760088c8

0:00:01.621362333   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 3 0x760088c8

0:00:01.621439667   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 4 0x76008968

0:00:01.621540667   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 4 0x76008968

0:00:01.621617333   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:148:gst_imx_v4l2_buffer_pool_alloc_buffer:<imxv4l2bufferpool0> alloc 5 0x76008a08

0:00:01.621723000   715   0xbf70f0 DEBUG      imxv4l2bufferpool v4l2_buffer_pool.c:276:gst_imx_v4l2_buffer_pool_release_buffer:<imxv4l2bufferpool0> qbuf 5 0x76008a08

0:00:11.626324334   715   0xbf70f0 ERROR      imxv4l2bufferpool v4l2_buffer_pool.c:238:gst_imx_v4l2_buffer_pool_acquire_buffer:<imxv4l2bufferpool0> VIDIOC_DQBUF failed: Timer expired

0:00:11.626649668   715   0xbf70f0 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<imxv4l2videosrc0> error: Internal data flow error.

0:00:11.626860001   715   0xbf70f0 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<imxv4l2videosrc0> error: streaming task paused, reason error (-5)

ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data flow error.

Please help me to find the way to solve this problem!

Tags (2)
6 Replies

1,292 Views
sydneymorin
Contributor I

Savvy blog post . Speaking of which , if your company has been searching for a a form , my family filled a sample form here Gst secure execution nxp form Fill Online, Printable, Fillable, Blank - PDFfiller

0 Kudos

1,292 Views
ivannikolaenko
Contributor IV

I've got both cameras working at the imx_3.10.53_1.1.1_ga kernel with the next devicetree entries:

v4l2_cap_0 {
        compatible = "fsl,imx6q-v4l2-capture";
        ipu_id = <0>;
        csi_id = <0>;
        mclk_source = <0>;
        status = "okay";
};

v4l2_cap_1 {
        compatible = "fsl,imx6q-v4l2-capture";
        ipu_id = <0>;
        csi_id = <1>;
        mclk_source = <0>;
        mipi_camera = <1>;
        status = "okay";
};

&i2c1 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c1_2>;

    status = "okay";

    ov5642: ov5642@3d {

        compatible = "ovti,ov5642";

        reg = <0x3d>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ipu1_2>;

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

        DOVDD-supply = <&reg_1p8v>;

        AVDD-supply = <&reg_2p5v>;

        DVDD-supply = <&reg_1p8v>;

        pwn-gpios = <&gpio3 12 1>;

        rst-gpios = <&gpio5 0 0>;

        ipu_id = <0>;

        csi_id = <0>;

        mclk = <24000000>;

        mclk_source = <0>;

    };

    ov5640_mipi: ov5640_mipi@3e {

        compatible = "ovti,ov5640_mipi";

        reg = <0x3e>;

        clocks = <&clks 201>;

        clock-names = "csi_mclk";

        DOVDD-supply = <&reg_1p8v>;

        AVDD-supply = <&reg_2p5v>;

        DVDD-supply = <&reg_1p8v>;

        pwn-gpios = <&gpio3 8 1>;

        rst-gpios = <&gpio3 7 0>;

        ipu_id = <0>;

        csi_id = <1>;

        mclk = <24000000>;

        mclk_source = <0>;

    };

};

&mipi_csi {

    ipu_id = <0>;

    csi_id = <1>;

    v_channel = <1>;

    lanes = <2>;

    status = "okay";

};

But the question is why cameras don't work properly at the imx_3.14.28 kernel? Is it possible to get them both working at the same i2c bus at the 3.14.28 kernel?

0 Kudos

1,292 Views
saurabh206
Senior Contributor III

Hi

Can you try following pipeline?

gst-launch imxv4l2src ! imxv4l2sink

Thanks

Saurabh

0 Kudos

1,292 Views
ivannikolaenko
Contributor IV

Hi Saurabh,

There is the result of gst-launch-1.0 imxv4l2src ! imxv4l2sink:

ERROR: pipeline could not be constructed: no element "imxv4l2src".

Same error for "imxv4l2sink".

There is my gst-imx plugins:

root@imx6qsabresd:~# gst-inspect-1.0 | grep imx

imxv4l2videosrc:  imxv4l2videosrc: V4L2 CSI Video Source

imxvpu:  imxvpudec: Freescale VPU video decoder

imxvpu:  imxvpuenc_h263: Freescale VPU h.263 video encoder

imxvpu:  imxvpuenc_h264: Freescale VPU h.264 video encoder

imxvpu:  imxvpuenc_mpeg4: Freescale VPU MPEG-4 video encoder

imxvpu:  imxvpuenc_mjpeg: Freescale VPU motion JPEG video encoder

imxpxp:  imxpxpvideosink: Freescale PxP video sink

imxpxp:  imxpxpvideotransform: Freescale PxP video transform

imxipu:  imxipuvideotransform: Freescale IPU video transform

imxipu:  imxipuvideosink: Freescale IPU video sink

imxipu:  imxipucompositor: Freescale IPU video compositor

imxeglvivsink:  imxeglvivsink: Freescale EGL video sink

imxg2d:  imxg2dvideosink: Freescale G2D video sink

imxg2d:  imxg2dvideotransform: Freescale G2D video transform

imxg2d:  imxg2dcompositor: Freescale G2D video compositor

imxaudio:  imxuniaudiodec: Freescale i.MX uniaudio decoder

imxaudio:  imxmp3audioenc: Freescale i.MX MP3 encoder

Thanks

0 Kudos

1,292 Views
joanxie
NXP TechSupport
NXP TechSupport

pls try to use autovideosrc and autovideosink to replace yours.

0 Kudos

1,292 Views
ivannikolaenko
Contributor IV

I've got the same error.

I did some research and came up with interesting results:

(I have both cameras at one i2c bus)

1. I have only one camera was found by the imx_3.14.28_1.0.0_ga kernel - with an i2c address of 0x3c. No matter ov5640_mipi or ov5642. But works fine only ov5640_mipi.

2. I have both cameras were found by the imx_3.10.53_1.1.1_ga kernel, but works fine only ov5642!!!

So, there is no gstreamer error, no pinmux error. The same Devicetree file in both cases.

Does anyone have this cameras working simultaneously with the 3.14.28 kernel?

0 Kudos