VIDIOC_DQBUF failed

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

VIDIOC_DQBUF failed

1,407 Views
yanglv
Contributor I

Recently, I modified the driver of tvp5150 according to the driver of adc7180 for imx6q.

Amend as follows:

1、In tvp5150_probe fuction, I added like this :

tvin_plat = c->dev.platform_data;
if (tvin_plat->dvddio_reg) {
dvddio_regulator =
regulator_get(&c->dev, tvin_plat->dvddio_reg);
if (!IS_ERR_VALUE((unsigned long)dvddio_regulator)) {
regulator_set_voltage(dvddio_regulator, 3300000, 3300000);
if (regulator_enable(dvddio_regulator) != 0)
return -ENODEV;
}
}

if (tvin_plat->dvdd_reg) {
dvdd_regulator =
regulator_get(&c->dev, tvin_plat->dvdd_reg);
if (!IS_ERR_VALUE((unsigned long)dvdd_regulator)) {
regulator_set_voltage(dvdd_regulator, 1800000, 1800000);
if (regulator_enable(dvdd_regulator) != 0)
return -ENODEV;
}
}

if (tvin_plat->avdd_reg) {
avdd_regulator =
regulator_get(&c->dev, tvin_plat->avdd_reg);
if (!IS_ERR_VALUE((unsigned long)avdd_regulator)) {
regulator_set_voltage(avdd_regulator, 1800000, 1800000);
if (regulator_enable(avdd_regulator) != 0)
return -ENODEV;
}
}

if (tvin_plat->pvdd_reg) {
pvdd_regulator =
regulator_get(&c->dev, tvin_plat->pvdd_reg);
if (!IS_ERR_VALUE((unsigned long)pvdd_regulator)) {
regulator_set_voltage(pvdd_regulator, 1800000, 1800000);
if (regulator_enable(pvdd_regulator) != 0)
return -ENODEV;
}
}

if (tvin_plat->io_init)
tvin_plat->io_init();
msleep(1);
/* Set initial values for the sensor struct. */
memset(&tvp5150_data, 0, sizeof(tvp5150_data));
tvp5150_data.sen.i2c_client = c;
tvp5150_data.sen.streamcap.timeperframe.denominator = 30;
tvp5150_data.sen.streamcap.timeperframe.numerator = 1;
tvp5150_data.std_id = V4L2_STD_ALL;
video_idx = TVP5150_NOT_LOCKED;
tvp5150_data.sen.pix.width = video_fmts[video_idx].raw_width;
tvp5150_data.sen.pix.height = video_fmts[video_idx].raw_height;
tvp5150_data.sen.pix.pixelformat = V4L2_PIX_FMT_UYVY; /* YUV422 */
tvp5150_data.sen.pix.priv = 1; /* 1 is used to indicate TV in */
tvp5150_data.sen.on = true;
tvp5150_data.sen.csi = 0;
tvp5150_data.sen.mclk = 0;
tvp5150_data.sen.mclk_source = 0;

gpio_sensor_active();
tvp5150_int_device.priv = &tvp5150_data;
v4l2_int_device_register(&tvp5150_int_device);

2、

static struct v4l2_int_ioctl_desc tvp5150_ioctl_desc[] = {

{vidioc_int_dev_init_num, (v4l2_int_ioctl_func*)ioctl_dev_init},

{vidioc_int_g_ifparm_num, (v4l2_int_ioctl_func*)ioctl_g_ifparm},
{vidioc_int_init_num, (v4l2_int_ioctl_func*)ioctl_init},

{vidioc_int_g_fmt_cap_num, (v4l2_int_ioctl_func*)ioctl_g_fmt_cap},

{vidioc_int_g_fmt_cap_num, (v4l2_int_ioctl_func*)ioctl_g_fmt_cap},

{vidioc_int_enum_framesizes_num, (v4l2_int_ioctl_func *) ioctl_enum_framesizes},
{vidioc_int_g_chip_ident_num, (v4l2_int_ioctl_func *)ioctl_g_chip_ident},
};

Every fuction is same as adv7180 driver!

3、

static struct v4l2_int_slave tvp5150_slave = {
.ioctls = tvp5150_ioctl_desc,
.num_ioctls = ARRAY_SIZE(tvp5150_ioctl_desc),
};

static struct v4l2_int_device tvp5150_int_device = {
.module = THIS_MODULE,
.name = "tvp5150",
.type = v4l2_int_type_slave,
.u = {
.slave = &tvp5150_slave,
},
};

I am sure the tvp5150 chip is configured to output BT656 data.

As result, I run my image capture procedure, the print information as follow:

ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
VIDIOC_DQBUF failed

Labels (2)
0 Kudos
4 Replies

975 Views
vinodkumart
Contributor I

I'm also facing same issue. Could any one suggest any solution.

0 Kudos

975 Views
vinodkumart
Contributor I

I fixed this issue by removing all other pins(Like Data_En etc) except the 8-parallel lines from dts file and it worked.

0 Kudos

975 Views
umit_kayacik
Contributor II

Hi Yang,

Did you find a solution for:

[ 231.524060] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
VIDIOC_DQBUF failed.

Cheers,

Umit

0 Kudos

975 Views
igorpadykov
NXP Employee
NXP Employee

Hi Yang

for sensors with BT656 format there is special unit test program: mxc_v4l2_tvin,

first please try with it :

imx-test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos