Issues while collecting raw dumps using ov5645 in kernel-4.14

Hi,

@Loic
@todortomov

I am facing issues while collecting raw dumps using ov5645 in kernel-4.14.

As per this post by @todortomov Broken pipe error when trying to develop a driver for OV4689 MIPI sensor for APQ8016 using CAMSS & CCI - #30 by todortomov
In ov5645.c , I have changed
code->code = MEDIA_BUS_FMT_SBGGR8_1X8;
fse->code != MEDIA_BUS_FMT_SBGGR8_1X8
__format->code = MEDIA_BUS_FMT_SBGGR8_1X8

and changed 0x4300 register to 0xf8

configured media controller pipeline,
sudo media-ctl -d /dev/media0 -l ‘“msm_csiphy0”:1->“msm_csid0”:0[1],“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_rdi0”:0[1]’

sudo media-ctl -d /dev/media0 ‘“ov5645 4-003c”:0[fmt:SBGGR8_1X8/1920x1080
field:none],“msm_csiphy0”:0[fmt:SBGGR8_1X8/1920x1080
field:none],“msm_csid0”:0[fmt:SBGGR8_1X8/1920x1080
field:none],“msm_ispif0”:0[fmt:SBGGR8_1X8/1920x1080
field:none],“msm_vfe0_rdi0”:0[fmt:SBGGR8_1X8/1920x1080 field:none]’

./yavta -B capture-mplane -c1 -I -n 5 --requeue-last -f SBGGR8 -s 1920x1080 /dev/video0 -F

After collecting dumps, i am using ffmpeg
ffmpeg -s 1920x1080 -pix_fmt bayer_bggr8 -i frame-000000.rgb -f image2 -pix_fmt rgb24 frame1.png

frame1.png is attached here,

How to capture the raw dumps using ov5645? please let me know if i made any mistake in collecting the raw dumps

Thanks,
Arun

I am able to collects raw dumps.

Thanks,
Arun

@Loic
@todortomov

Able to capture the image but the captured image is in grey scale(black and white format). Is there anything i missed to change in the register values?

Do you have an example of raw image?

@Loic
@todortomov
captured image(original image is coloured),

I have used these commands to capture the image:
sudo media-ctl -d /dev/media0 -l ‘“msm_csiphy0”:1->“msm_csid0”:0[1],“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_rdi0”:0[1]’

sudo media-ctl -d /dev/media0 -V ‘“ov5645 5-003c”:0[fmt:SBGGR8_1X8/1920x1080 field:none],“msm_csiphy0”:0[fmt:SBGGR8_1X8/1920x1080 field:none],“msm_csid0”:0[fmt:SBGGR8_1X8/1920x1080 field:none],“msm_ispif0”:0[fmt:SBGGR8_1X8/1920x1080 field:none],“msm_vfe0_rdi0”:0[fmt:SBGGR8_1X8/1920x1080 field:none]’

#image capture
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! ‘video/x-bayer,format=bggr,width=1920,height=1080’ ! bayer2rgb ! jpegenc ! filesink location=image.jpg

Thanks,
Arun

I mean a link to the captured raw bayer data.