V4L/DVB (4240): Various V4L control enhancements in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 72f28a8..9fefcdf 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -520,12 +520,19 @@
ret = 0;
cptr = pvr2_hdw_get_ctrl_v4l(hdw,vc->id);
if (!cptr) {
+ pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+ "QUERYCTRL id=0x%x not implemented here",
+ vc->id);
ret = -EINVAL;
break;
}
- strlcpy(vc->name,pvr2_ctrl_get_name(cptr),sizeof(vc->name));
- vc->flags = 0;
+ pvr2_trace(PVR2_TRACE_V4LIOCTL,
+ "QUERYCTRL id=0x%x mapping name=%s (%s)",
+ vc->id,pvr2_ctrl_get_name(cptr),
+ pvr2_ctrl_get_desc(cptr));
+ strlcpy(vc->name,pvr2_ctrl_get_desc(cptr),sizeof(vc->name));
+ vc->flags = pvr2_ctrl_get_v4lflags(cptr);
vc->default_value = pvr2_ctrl_get_def(cptr);
switch (pvr2_ctrl_get_type(cptr)) {
case pvr2_ctl_enum:
@@ -547,6 +554,9 @@
vc->step = 1;
break;
default:
+ pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+ "QUERYCTRL id=0x%x name=%s not mappable",
+ vc->id,pvr2_ctrl_get_name(cptr));
ret = -EINVAL;
break;
}