AnsweredAssumed Answered

/dev/video0: No Buffer Space Available error with mipi csi2

Question asked by srinivasaporam on Jan 12, 2016
Latest reply on Jan 12, 2016 by srinivasaporam

Hi,

We have got IMX6D custom designed board designed based on imx6Q reference board (Wandboard). in custom board we have 512 MB LPDDR2  where as reference board has 1GB/2GB DDR3 RAM.

 

Now we have connected mipi csi2 camera (Raspi camera (connector is also customized with 15 pin connector)).

 

 

When I am running the command for capturing image or video using avconv or gst-launch-1.0 then, image is not being captured.

 

When iam running the command as :

 

$ sudo avconv -f video4linux2 -r 30 -s 640x480 -i /dev/video0 out.avi (or)

 

$ sudo avconv -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:2 -frames 1 test.jpg

 

then it is giving error as ioctl VIDIOC_REQBUFs

and "/dev/video0: No buffer space available"

 

 

Since ov5647 has on board crystal which generates 25 MHz clock, we are using mipi_dphy_clk = <0x28> is this correct or not?? in some cases, it is been given that mipi_dphy_clk = <0x14>??? which one we should use ????

 

 

When we are running this command, we are getting CSI_D0M,CSI_D0P, CSI_D1M, CSI_D1P correctly and laos getting 25 MHz clock from the crystal.

 

But we are not observing CSI_CLK0M (CN), CSI_CLK0P (CP) are not coming???? what could be the reason.

 

 

    $gst-launch-1.0 v4l2src device="/dev/video0" num-buffers=1 ! video/x-bayer,width=640,height=480,framerate=1/1 ! bayer2rgb ! videoconvert ! jpegenc ! filesink location=sample_640_480.jpeg

 

then it is forming sample_640_480.jpeg file but it is not opening.

 

 

in all the above commands, when we are entering/running then led on the camera board is glowing and not when terminating the command, then led is going off.

 

 

Following are the findings:

 

 

1. camera sensor is being detecting in i2c by using i2c-tools (i2cdetect)

 

root@ubuntu:~# i2cdetect -y 2

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --  

 

 

2.

root@ubuntu:~# lsmod

Module                  Size  Used by

mxc_v4l2_capture       28532  1

ipu_bg_overlay_sdc      5401  1 mxc_v4l2_capture

ipu_still               2528  1 mxc_v4l2_capture

ipu_prp_enc             5943  1 mxc_v4l2_capture

ipu_csi_enc             3863  1 mxc_v4l2_capture

ipu_fg_overlay_sdc      6217  1 mxc_v4l2_capture

ov5647_camera_mipi     30906  0

 

 

which one we should use mipi_dphy_clock = <0x28> or mipi_dphy_clock = <0x14> if our camera sensor's clock is 25 MHz.

 

 

when iam dumping mipi csi2 regs by using devmem2 tool

 

 

[root@erez]# devmem 0x21dc000

0x3130302A

[root@erez]# devmem 0x21dc004

0x1

[root@erez]# devmem 0x21dc008

0x1

[root@erez]# devmem 0x21dc00c

0x1

[root@erez]# devmem 0x21dc010

0x1

[root@erez]# devmem 0x21dc014

0x200

[root@erez]# devmem 0x21dc018

0x0

[root@erez]# devmem 0x21dc020

0x00000000

[root@erez]# devmem 0x21dc024

0x0

[root@erez]# devmem 0x21dc02c

0x00000000

[root@erez]# devmem 0x21dc030

0x0

[root@erez]# devmem 0x21dc034

0x0

 

 

How resolve the issues????

Outcomes