AnsweredAssumed Answered

v4l2 capture: slave not found

Question asked by mert can ergun on Oct 2, 2016
Latest reply on Oct 15, 2016 by mert can ergun

I am developing a driver for our custom in house sensor. The sensor only supports grayscale color formatting and I somehow managed to get CSI port start pumping data into /dev/video0.

But the problem is when I try to use V4L with say gstreamer command

gst-launch-1.0 imxv4l2src num-buffers=1 device=/dev/video0 ! filesink location=/home/root/sample.raw

The answer is as below:

MT6415CA: ioctl_g_ifparm()
clock=mclk=40000000
MT6415CA: ioctl_g_fmt_cap()
MT6415CA: ioctl_s_power(2130787148, 1)
MT6415CA: ioctl_init()
MT6415CA: ioctl_dev_init()
Sending CMD = e1 to slave = 0a
Error Notifier: received but ignored 0
MT6415CA: ioctl_g_chip_indent()
MT6415CA: ioctl_s_power(2130787148, 0)
ERROR: v4l2 capture: slave not found!
Can't get caps from capture device, use the default setting.
Perhaps haven't capture device.
====== IMXV4L2SRC: 4.0.9 build on Jul 11 2016 15:47:15. ======
Setting pipeline to PAUSED ...
MT6415CA: ioctl_g_ifparm()
clock=mclk=40000000
MT6415CA: ioctl_g_fmt_cap()
MT6415CA: ioctl_s_power(2130787148, 1)
MT6415CA: ioctl_init()
MT6415CA: ioctl_dev_init()
Sending CMD = e1 to slave = 0a
Error Notifier: received but ignored 0
MT6415CA: ioctl_g_chip_indent()
MT6415CA: ioctl_s_power(2130787148, 0)
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...

Most of the messages are my debug messages. I am making sure that I register my device with v4l2_int_device_register and result is not negative when the function is called within my _probe function.

 

I changed mxc_v4l_open in order to see which of the statement below returns true.

if(cam->sensor==NULL|| cam->sensor->type!=v4l2_int_type_slave)

and it seems cam->sensor is NULL and that's why mxc_v4l_open function prints slave not found message. 

I am now digging to see where this struct is registered to see what's wrong. Any ideas are welcome.

Outcomes