diff options
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-ioctl.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c index a5560abd3..f8107e337 100644 --- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c @@ -554,7 +554,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, return 0; } - // set window size + /* set window size */ if (fmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { int w = fmt->fmt.pix.width; int h = fmt->fmt.pix.height; @@ -588,7 +588,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, return ivtv_get_fmt(itv, streamtype, fmt); } - // set raw VBI format + /* set raw VBI format */ if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { if (set_fmt && streamtype == IVTV_ENC_STREAM_TYPE_VBI && itv->vbi.sliced_in->service_set && @@ -602,22 +602,22 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, return ivtv_get_fmt(itv, streamtype, fmt); } - // set sliced VBI output - // In principle the user could request that only certain - // VBI types are output and that the others are ignored. - // I.e., suppress CC in the even fields or only output - // WSS and no VPS. Currently though there is no choice. + /* set sliced VBI output + In principle the user could request that only certain + VBI types are output and that the others are ignored. + I.e., suppress CC in the even fields or only output + WSS and no VPS. Currently though there is no choice. */ if (fmt->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) return ivtv_get_fmt(itv, streamtype, fmt); - // any else but sliced VBI capture is an error + /* any else but sliced VBI capture is an error */ if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) return -EINVAL; if (streamtype == IVTV_DEC_STREAM_TYPE_VBI) return ivtv_get_fmt(itv, streamtype, fmt); - // set sliced VBI capture format + /* set sliced VBI capture format */ vbifmt->io_size = sizeof(struct v4l2_sliced_vbi_data) * 36; memset(vbifmt->reserved, 0, sizeof(vbifmt->reserved)); @@ -662,18 +662,26 @@ static int ivtv_internal_ioctls(struct file *filp, unsigned int cmd, void *arg) return ivtv_i2c_id(itv, reg->match_chip, cmd, arg); return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); - case VIDIOC_G_CHIP_IDENT: + case VIDIOC_G_CHIP_IDENT: { + struct v4l2_chip_ident *chip = arg; + IVTV_DEBUG_IOCTL("VIDIOC_G_CHIP_IDENT\n"); - if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) { - struct v4l2_chip_ident *chip = arg; + chip->ident = V4L2_IDENT_NONE; + chip->revision = 0; + if (reg->match_type == V4L2_CHIP_MATCH_HOST) { + if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) { + struct v4l2_chip_ident *chip = arg; - chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; - chip->revision = 0; + chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; + } return 0; } if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER) return ivtv_i2c_id(itv, reg->match_chip, cmd, arg); - return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); + if (reg->match_type == V4L2_CHIP_MATCH_I2C_ADDR) + return ivtv_call_i2c_client(itv, reg->match_chip, cmd, arg); + return -EINVAL; + } case VIDIOC_INT_S_AUDIO_ROUTING: { struct v4l2_routing *route = arg; @@ -689,7 +697,6 @@ static int ivtv_internal_ioctls(struct file *filp, unsigned int cmd, void *arg) break; default: - IVTV_DEBUG_IOCTL( "Unknown internal IVTV command %08x\n", cmd); return -EINVAL; } return 0; @@ -1160,7 +1167,6 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void } default: - IVTV_DEBUG_WARN("unknown VIDIOC command %08x\n", cmd); return -EINVAL; } return 0; @@ -1433,7 +1439,6 @@ static int ivtv_ivtv_ioctls(struct file *filp, unsigned int cmd, void *arg) } default: - IVTV_DEBUG_WARN("unknown IVTV command %08x\n", cmd); return -EINVAL; } return 0; |