Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int ioctl_g_parm ( struct v4l2_int_device *  s,
struct v4l2_streamparm *  a 
) [static]

ioctl_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl : pointer to standard V4L2 device structure : pointer to standard V4L2 VIDIOC_G_PARM ioctl structure

Returns the sensor's video CAPTURE parameters.

Definition at line 358 of file adv7180.c.

References adv7180_data, sensor::i2c_client, and sensor::streamcap.

{
      struct sensor *sensor = s->priv;
      struct v4l2_captureparm *cparm = &a->parm.capture;

      dev_dbg(&adv7180_data.i2c_client->dev, "In adv7180:ioctl_g_parm\n");

      switch (a->type) {
      /* These are all the possible cases. */
      case V4L2_BUF_TYPE_VIDEO_CAPTURE:
            pr_debug("   type is V4L2_BUF_TYPE_VIDEO_CAPTURE\n");
            memset(a, 0, sizeof(*a));
            a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
            cparm->capability = sensor->streamcap.capability;
            cparm->timeperframe = sensor->streamcap.timeperframe;
            cparm->capturemode = sensor->streamcap.capturemode;
            break;

      case V4L2_BUF_TYPE_VIDEO_OUTPUT:
      case V4L2_BUF_TYPE_VIDEO_OVERLAY:
      case V4L2_BUF_TYPE_VBI_CAPTURE:
      case V4L2_BUF_TYPE_VBI_OUTPUT:
      case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
      case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
            break;

      default:
            pr_debug("ioctl_g_parm:type is unknown %d\n", a->type);
            break;
      }

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index