Skip to content

Commit

Permalink
[media] usbtv: add sharpness control
Browse files Browse the repository at this point in the history
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Lubomir Rintel authored and Mauro Carvalho Chehab committed Feb 8, 2017
1 parent 3f190e3 commit 9165ba1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/usb/usbtv/usbtv-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,12 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl)
data[1] = -ctrl->val & 0xff;
}
break;
case V4L2_CID_SHARPNESS:
index = USBTV_BASE + 0x0239;
data[0] = 0;
data[1] = ctrl->val;
size = 2;
break;
default:
kfree(data);
return -EINVAL;
Expand Down Expand Up @@ -825,6 +831,8 @@ int usbtv_video_init(struct usbtv *usbtv)
V4L2_CID_SATURATION, 0, 0x3ff, 1, 0x200);
v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops,
V4L2_CID_HUE, -0xdff, 0xdff, 1, 0x000);
v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops,
V4L2_CID_SHARPNESS, 0x0, 0xff, 1, 0x60);
ret = usbtv->ctrl.error;
if (ret < 0) {
dev_warn(usbtv->dev, "Could not initialize controls\n");
Expand Down

0 comments on commit 9165ba1

Please sign in to comment.