|
@@ -165,8 +165,6 @@ static int cx18_g_fmt_vbi_cap(struct file *file, void *fh,
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct v4l2_vbi_format *vbifmt = &fmt->fmt.vbi;
|
|
struct v4l2_vbi_format *vbifmt = &fmt->fmt.vbi;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_FMT: V4L2_BUF_TYPE_VBI_CAPTURE\n");
|
|
|
|
-
|
|
|
|
vbifmt->sampling_rate = 27000000;
|
|
vbifmt->sampling_rate = 27000000;
|
|
vbifmt->offset = 248;
|
|
vbifmt->offset = 248;
|
|
vbifmt->samples_per_line = cx->vbi.raw_decoder_line_size - 4;
|
|
vbifmt->samples_per_line = cx->vbi.raw_decoder_line_size - 4;
|
|
@@ -195,8 +193,6 @@ static int cx18_try_fmt_vid_cap(struct file *file, void *fh,
|
|
int w = fmt->fmt.pix.width;
|
|
int w = fmt->fmt.pix.width;
|
|
int h = fmt->fmt.pix.height;
|
|
int h = fmt->fmt.pix.height;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_TRY_FMT: V4L2_BUF_TYPE_VIDEO_CAPTURE\n");
|
|
|
|
-
|
|
|
|
w = min(w, 720);
|
|
w = min(w, 720);
|
|
w = max(w, 1);
|
|
w = max(w, 1);
|
|
h = min(h, cx->is_50hz ? 576 : 480);
|
|
h = min(h, cx->is_50hz ? 576 : 480);
|
|
@@ -210,10 +206,6 @@ static int cx18_try_fmt_vid_cap(struct file *file, void *fh,
|
|
static int cx18_try_fmt_vbi_cap(struct file *file, void *fh,
|
|
static int cx18_try_fmt_vbi_cap(struct file *file, void *fh,
|
|
struct v4l2_format *fmt)
|
|
struct v4l2_format *fmt)
|
|
{
|
|
{
|
|
- struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
-
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_TRY_FMT: V4L2_BUF_TYPE_VBI_CAPTURE\n");
|
|
|
|
-
|
|
|
|
return cx18_g_fmt_vbi_cap(file, fh, fmt);
|
|
return cx18_g_fmt_vbi_cap(file, fh, fmt);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -236,8 +228,6 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_FMT: V4L2_BUF_TYPE_VIDEO_CAPTURE\n");
|
|
|
|
-
|
|
|
|
ret = cx18_try_fmt_vid_cap(file, fh, fmt);
|
|
ret = cx18_try_fmt_vid_cap(file, fh, fmt);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
@@ -265,8 +255,6 @@ static int cx18_s_fmt_vbi_cap(struct file *file, void *fh,
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_FMT: V4L2_BUF_TYPE_VBI_CAPTURE\n");
|
|
|
|
-
|
|
|
|
if (id->type == CX18_ENC_STREAM_TYPE_VBI &&
|
|
if (id->type == CX18_ENC_STREAM_TYPE_VBI &&
|
|
cx->vbi.sliced_in->service_set &&
|
|
cx->vbi.sliced_in->service_set &&
|
|
atomic_read(&cx->ana_capturing) > 0)
|
|
atomic_read(&cx->ana_capturing) > 0)
|
|
@@ -288,8 +276,6 @@ static int cx18_g_chip_ident(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_CHIP_IDENT\n");
|
|
|
|
-
|
|
|
|
chip->ident = V4L2_IDENT_NONE;
|
|
chip->ident = V4L2_IDENT_NONE;
|
|
chip->revision = 0;
|
|
chip->revision = 0;
|
|
if (chip->match_type == V4L2_CHIP_MATCH_HOST) {
|
|
if (chip->match_type == V4L2_CHIP_MATCH_HOST) {
|
|
@@ -311,8 +297,6 @@ static int cx18_g_register(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_DBG_G_REGISTER\n");
|
|
|
|
-
|
|
|
|
if (v4l2_chip_match_host(reg->match_type, reg->match_chip))
|
|
if (v4l2_chip_match_host(reg->match_type, reg->match_chip))
|
|
return cx18_cxc(cx, VIDIOC_DBG_G_REGISTER, reg);
|
|
return cx18_cxc(cx, VIDIOC_DBG_G_REGISTER, reg);
|
|
if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
|
|
if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
|
|
@@ -327,8 +311,6 @@ static int cx18_s_register(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_DBG_S_REGISTER\n");
|
|
|
|
-
|
|
|
|
if (v4l2_chip_match_host(reg->match_type, reg->match_chip))
|
|
if (v4l2_chip_match_host(reg->match_type, reg->match_chip))
|
|
return cx18_cxc(cx, VIDIOC_DBG_S_REGISTER, reg);
|
|
return cx18_cxc(cx, VIDIOC_DBG_S_REGISTER, reg);
|
|
if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
|
|
if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
|
|
@@ -342,8 +324,6 @@ static int cx18_g_priority(struct file *file, void *fh, enum v4l2_priority *p)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_PRIORITY\n");
|
|
|
|
-
|
|
|
|
*p = v4l2_prio_max(&cx->prio);
|
|
*p = v4l2_prio_max(&cx->prio);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -353,8 +333,6 @@ static int cx18_s_priority(struct file *file, void *fh, enum v4l2_priority prio)
|
|
struct cx18_open_id *id = fh;
|
|
struct cx18_open_id *id = fh;
|
|
struct cx18 *cx = id->cx;
|
|
struct cx18 *cx = id->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_PRIORITY\n");
|
|
|
|
-
|
|
|
|
return v4l2_prio_change(&cx->prio, &id->prio, prio);
|
|
return v4l2_prio_change(&cx->prio, &id->prio, prio);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -363,8 +341,6 @@ static int cx18_querycap(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_QUERYCAP\n");
|
|
|
|
-
|
|
|
|
strlcpy(vcap->driver, CX18_DRIVER_NAME, sizeof(vcap->driver));
|
|
strlcpy(vcap->driver, CX18_DRIVER_NAME, sizeof(vcap->driver));
|
|
strlcpy(vcap->card, cx->card_name, sizeof(vcap->card));
|
|
strlcpy(vcap->card, cx->card_name, sizeof(vcap->card));
|
|
strlcpy(vcap->bus_info, pci_name(cx->dev), sizeof(vcap->bus_info));
|
|
strlcpy(vcap->bus_info, pci_name(cx->dev), sizeof(vcap->bus_info));
|
|
@@ -377,8 +353,6 @@ static int cx18_enumaudio(struct file *file, void *fh, struct v4l2_audio *vin)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_ENUMAUDIO\n");
|
|
|
|
-
|
|
|
|
return cx18_get_audio_input(cx, vin->index, vin);
|
|
return cx18_get_audio_input(cx, vin->index, vin);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -386,8 +360,6 @@ static int cx18_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_AUDIO\n");
|
|
|
|
-
|
|
|
|
vin->index = cx->audio_input;
|
|
vin->index = cx->audio_input;
|
|
return cx18_get_audio_input(cx, vin->index, vin);
|
|
return cx18_get_audio_input(cx, vin->index, vin);
|
|
}
|
|
}
|
|
@@ -396,8 +368,6 @@ static int cx18_s_audio(struct file *file, void *fh, struct v4l2_audio *vout)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_AUDIO\n");
|
|
|
|
-
|
|
|
|
if (vout->index >= cx->nof_audio_inputs)
|
|
if (vout->index >= cx->nof_audio_inputs)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
cx->audio_input = vout->index;
|
|
cx->audio_input = vout->index;
|
|
@@ -409,8 +379,6 @@ static int cx18_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_ENUMINPUT\n");
|
|
|
|
-
|
|
|
|
/* set it to defaults from our table */
|
|
/* set it to defaults from our table */
|
|
return cx18_get_input(cx, vin->index, vin);
|
|
return cx18_get_input(cx, vin->index, vin);
|
|
}
|
|
}
|
|
@@ -420,8 +388,6 @@ static int cx18_cropcap(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_CROPCAP\n");
|
|
|
|
-
|
|
|
|
if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
cropcap->bounds.top = cropcap->bounds.left = 0;
|
|
cropcap->bounds.top = cropcap->bounds.left = 0;
|
|
@@ -443,8 +409,6 @@ static int cx18_s_crop(struct file *file, void *fh, struct v4l2_crop *crop)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_CROP\n");
|
|
|
|
-
|
|
|
|
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
return cx18_av_cmd(cx, VIDIOC_S_CROP, crop);
|
|
return cx18_av_cmd(cx, VIDIOC_S_CROP, crop);
|
|
@@ -454,8 +418,6 @@ static int cx18_g_crop(struct file *file, void *fh, struct v4l2_crop *crop)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_CROP\n");
|
|
|
|
-
|
|
|
|
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
return cx18_av_cmd(cx, VIDIOC_G_CROP, crop);
|
|
return cx18_av_cmd(cx, VIDIOC_G_CROP, crop);
|
|
@@ -473,10 +435,6 @@ static int cx18_enum_fmt_vid_cap(struct file *file, void *fh,
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
-
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_ENUM_FMT: V4L2_BUF_TYPE_VIDEO_CAPTURE\n");
|
|
|
|
-
|
|
|
|
if (fmt->index > 1)
|
|
if (fmt->index > 1)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
*fmt = formats[fmt->index];
|
|
*fmt = formats[fmt->index];
|
|
@@ -487,8 +445,6 @@ static int cx18_g_input(struct file *file, void *fh, unsigned int *i)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_INPUT\n");
|
|
|
|
-
|
|
|
|
*i = cx->active_input;
|
|
*i = cx->active_input;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -503,8 +459,6 @@ int cx18_s_input(struct file *file, void *fh, unsigned int inp)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_INPUT\n");
|
|
|
|
-
|
|
|
|
if (inp < 0 || inp >= cx->nof_inputs)
|
|
if (inp < 0 || inp >= cx->nof_inputs)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -534,8 +488,6 @@ static int cx18_g_frequency(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_FREQUENCY\n");
|
|
|
|
-
|
|
|
|
if (vf->tuner != 0)
|
|
if (vf->tuner != 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -553,8 +505,6 @@ int cx18_s_frequency(struct file *file, void *fh, struct v4l2_frequency *vf)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_FREQUENCY\n");
|
|
|
|
-
|
|
|
|
if (vf->tuner != 0)
|
|
if (vf->tuner != 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -569,8 +519,6 @@ static int cx18_g_std(struct file *file, void *fh, v4l2_std_id *std)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_STD\n");
|
|
|
|
-
|
|
|
|
*std = cx->std;
|
|
*std = cx->std;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -585,8 +533,6 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_STD\n");
|
|
|
|
-
|
|
|
|
if ((*std & V4L2_STD_ALL) == 0)
|
|
if ((*std & V4L2_STD_ALL) == 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -628,8 +574,6 @@ static int cx18_s_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_S_TUNER\n");
|
|
|
|
-
|
|
|
|
if (vt->index != 0)
|
|
if (vt->index != 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -643,8 +587,6 @@ static int cx18_g_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_G_TUNER\n");
|
|
|
|
-
|
|
|
|
if (vt->index != 0)
|
|
if (vt->index != 0)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
@@ -679,8 +621,6 @@ static int cx18_encoder_cmd(struct file *file, void *fh,
|
|
struct cx18_open_id *id = fh;
|
|
struct cx18_open_id *id = fh;
|
|
struct cx18 *cx = id->cx;
|
|
struct cx18 *cx = id->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_ENCODER_CMD:\n");
|
|
|
|
-
|
|
|
|
switch (enc->cmd) {
|
|
switch (enc->cmd) {
|
|
case V4L2_ENC_CMD_START:
|
|
case V4L2_ENC_CMD_START:
|
|
CX18_DEBUG_IOCTL("V4L2_ENC_CMD_START\n");
|
|
CX18_DEBUG_IOCTL("V4L2_ENC_CMD_START\n");
|
|
@@ -728,8 +668,6 @@ static int cx18_try_encoder_cmd(struct file *file, void *fh,
|
|
{
|
|
{
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
struct cx18 *cx = ((struct cx18_open_id *)fh)->cx;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_TRY_ENCDOER_CMD:\n");
|
|
|
|
-
|
|
|
|
switch (enc->cmd) {
|
|
switch (enc->cmd) {
|
|
case V4L2_ENC_CMD_START:
|
|
case V4L2_ENC_CMD_START:
|
|
CX18_DEBUG_IOCTL("V4L2_ENC_CMD_START\n");
|
|
CX18_DEBUG_IOCTL("V4L2_ENC_CMD_START\n");
|
|
@@ -765,7 +703,6 @@ static int cx18_log_status(struct file *file, void *fh)
|
|
struct v4l2_audio audin;
|
|
struct v4l2_audio audin;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_LOG_STATUS\n");
|
|
|
|
CX18_INFO("================= START STATUS CARD #%d =================\n", cx->num);
|
|
CX18_INFO("================= START STATUS CARD #%d =================\n", cx->num);
|
|
if (cx->hw_flags & CX18_HW_TVEEPROM) {
|
|
if (cx->hw_flags & CX18_HW_TVEEPROM) {
|
|
struct tveeprom tv;
|
|
struct tveeprom tv;
|
|
@@ -807,26 +744,13 @@ static int cx18_default(struct file *file, void *fh, int cmd, void *arg)
|
|
switch (cmd) {
|
|
switch (cmd) {
|
|
case VIDIOC_INT_S_AUDIO_ROUTING: {
|
|
case VIDIOC_INT_S_AUDIO_ROUTING: {
|
|
struct v4l2_routing *route = arg;
|
|
struct v4l2_routing *route = arg;
|
|
- CX18_DEBUG_IOCTL("VIDIOC_INT_S_AUDIO_ROUTING (%d, %d)\n",
|
|
|
|
- route->input, route->output);
|
|
|
|
|
|
+
|
|
|
|
+ CX18_DEBUG_IOCTL("VIDIOC_INT_S_AUDIO_ROUTING(%d, %d)\n",
|
|
|
|
+ route->input, route->output);
|
|
cx18_audio_set_route(cx, route);
|
|
cx18_audio_set_route(cx, route);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- case VIDIOC_INT_RESET: {
|
|
|
|
- u32 val = *(u32 *)arg;
|
|
|
|
- CX18_DEBUG_IOCTL("VIDIOC_INT_RESET (%#10x)\n", val);
|
|
|
|
- /* No op right now */
|
|
|
|
- /* cx18_av_cmd(cx, cmd, arg) */
|
|
|
|
- /* cx18_call_i2c_clients(cx, cmd, arg) */
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
default:
|
|
default:
|
|
- if (cx18_debug & CX18_DBGFLG_IOCTL) {
|
|
|
|
- printk(KERN_INFO "cx18%d ioctl: unsupported cmd: ",
|
|
|
|
- cx->num);
|
|
|
|
- v4l_printk_ioctl(cmd);
|
|
|
|
- printk("\n");
|
|
|
|
- }
|
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|
|
@@ -835,12 +759,17 @@ static int cx18_default(struct file *file, void *fh, int cmd, void *arg)
|
|
int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
|
|
int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
|
|
unsigned long arg)
|
|
unsigned long arg)
|
|
{
|
|
{
|
|
|
|
+ struct video_device *vfd = video_devdata(filp);
|
|
struct cx18_open_id *id = (struct cx18_open_id *)filp->private_data;
|
|
struct cx18_open_id *id = (struct cx18_open_id *)filp->private_data;
|
|
struct cx18 *cx = id->cx;
|
|
struct cx18 *cx = id->cx;
|
|
int res;
|
|
int res;
|
|
|
|
|
|
mutex_lock(&cx->serialize_lock);
|
|
mutex_lock(&cx->serialize_lock);
|
|
|
|
+
|
|
|
|
+ if (cx18_debug & CX18_DBGFLG_IOCTL)
|
|
|
|
+ vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;
|
|
res = video_ioctl2(inode, filp, cmd, arg);
|
|
res = video_ioctl2(inode, filp, cmd, arg);
|
|
|
|
+ vfd->debug = 0;
|
|
mutex_unlock(&cx->serialize_lock);
|
|
mutex_unlock(&cx->serialize_lock);
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|