media: vidioc_cropcap -> vidioc_g_pixelaspect
Now vidioc_cropcap is only used to return the pixelaspect, so rename it accordingly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

vanhempi
ed3e2749ff
commit
5200ab6a32
@@ -1616,19 +1616,19 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vidioc_cropcap(struct file *file, void *priv,
|
||||
struct v4l2_cropcap *cc)
|
||||
static int vidioc_g_pixelaspect(struct file *file, void *priv,
|
||||
int type, struct v4l2_fract *f)
|
||||
{
|
||||
struct au0828_dev *dev = video_drvdata(file);
|
||||
|
||||
if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
dprintk(1, "%s called std_set %d dev_state %ld\n", __func__,
|
||||
dev->std_set_in_tuner_core, dev->dev_state);
|
||||
|
||||
cc->pixelaspect.numerator = 54;
|
||||
cc->pixelaspect.denominator = 59;
|
||||
f->numerator = 54;
|
||||
f->denominator = 59;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1777,7 +1777,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_enumaudio = vidioc_enumaudio,
|
||||
.vidioc_g_audio = vidioc_g_audio,
|
||||
.vidioc_s_audio = vidioc_s_audio,
|
||||
.vidioc_cropcap = vidioc_cropcap,
|
||||
.vidioc_g_pixelaspect = vidioc_g_pixelaspect,
|
||||
.vidioc_g_selection = vidioc_g_selection,
|
||||
|
||||
.vidioc_reqbufs = vb2_ioctl_reqbufs,
|
||||
|
@@ -1500,18 +1500,18 @@ static const struct videobuf_queue_ops cx231xx_qops = {
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int vidioc_cropcap(struct file *file, void *priv,
|
||||
struct v4l2_cropcap *cc)
|
||||
static int vidioc_g_pixelaspect(struct file *file, void *priv,
|
||||
int type, struct v4l2_fract *f)
|
||||
{
|
||||
struct cx231xx_fh *fh = priv;
|
||||
struct cx231xx *dev = fh->dev;
|
||||
bool is_50hz = dev->encodernorm.id & V4L2_STD_625_50;
|
||||
|
||||
if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
cc->pixelaspect.numerator = is_50hz ? 54 : 11;
|
||||
cc->pixelaspect.denominator = is_50hz ? 59 : 10;
|
||||
f->numerator = is_50hz ? 54 : 11;
|
||||
f->denominator = is_50hz ? 59 : 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1883,7 +1883,7 @@ static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
|
||||
.vidioc_g_input = cx231xx_g_input,
|
||||
.vidioc_s_input = cx231xx_s_input,
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
.vidioc_cropcap = vidioc_cropcap,
|
||||
.vidioc_g_pixelaspect = vidioc_g_pixelaspect,
|
||||
.vidioc_g_selection = vidioc_g_selection,
|
||||
.vidioc_querycap = cx231xx_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
|
@@ -1482,18 +1482,18 @@ int cx231xx_s_register(struct file *file, void *priv,
|
||||
}
|
||||
#endif
|
||||
|
||||
static int vidioc_cropcap(struct file *file, void *priv,
|
||||
struct v4l2_cropcap *cc)
|
||||
static int vidioc_g_pixelaspect(struct file *file, void *priv,
|
||||
int type, struct v4l2_fract *f)
|
||||
{
|
||||
struct cx231xx_fh *fh = priv;
|
||||
struct cx231xx *dev = fh->dev;
|
||||
bool is_50hz = dev->norm & V4L2_STD_625_50;
|
||||
|
||||
if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
cc->pixelaspect.numerator = is_50hz ? 54 : 11;
|
||||
cc->pixelaspect.denominator = is_50hz ? 59 : 10;
|
||||
f->numerator = is_50hz ? 54 : 11;
|
||||
f->denominator = is_50hz ? 59 : 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2111,7 +2111,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_g_fmt_vbi_cap = vidioc_g_fmt_vbi_cap,
|
||||
.vidioc_try_fmt_vbi_cap = vidioc_try_fmt_vbi_cap,
|
||||
.vidioc_s_fmt_vbi_cap = vidioc_s_fmt_vbi_cap,
|
||||
.vidioc_cropcap = vidioc_cropcap,
|
||||
.vidioc_g_pixelaspect = vidioc_g_pixelaspect,
|
||||
.vidioc_g_selection = vidioc_g_selection,
|
||||
.vidioc_reqbufs = vidioc_reqbufs,
|
||||
.vidioc_querybuf = vidioc_querybuf,
|
||||
|
@@ -703,16 +703,19 @@ static int pvr2_try_ext_ctrls(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pvr2_cropcap(struct file *file, void *priv, struct v4l2_cropcap *cap)
|
||||
static int pvr2_g_pixelaspect(struct file *file, void *priv,
|
||||
int type, struct v4l2_fract *f)
|
||||
{
|
||||
struct pvr2_v4l2_fh *fh = file->private_data;
|
||||
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
|
||||
struct v4l2_cropcap cap = { .type = type };
|
||||
int ret;
|
||||
|
||||
if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
ret = pvr2_hdw_get_cropcap(hdw, cap);
|
||||
cap->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; /* paranoia */
|
||||
ret = pvr2_hdw_get_cropcap(hdw, &cap);
|
||||
if (!ret)
|
||||
*f = cap.pixelaspect;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -815,7 +818,7 @@ static const struct v4l2_ioctl_ops pvr2_ioctl_ops = {
|
||||
.vidioc_g_audio = pvr2_g_audio,
|
||||
.vidioc_enumaudio = pvr2_enumaudio,
|
||||
.vidioc_enum_input = pvr2_enum_input,
|
||||
.vidioc_cropcap = pvr2_cropcap,
|
||||
.vidioc_g_pixelaspect = pvr2_g_pixelaspect,
|
||||
.vidioc_s_selection = pvr2_s_selection,
|
||||
.vidioc_g_selection = pvr2_g_selection,
|
||||
.vidioc_g_input = pvr2_g_input,
|
||||
|
Viittaa uudesa ongelmassa
Block a user