Commit 9165ba16 authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Mauro Carvalho Chehab

[media] usbtv: add sharpness control

Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 3f190e3a
...@@ -757,6 +757,12 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -757,6 +757,12 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl)
data[1] = -ctrl->val & 0xff; data[1] = -ctrl->val & 0xff;
} }
break; break;
case V4L2_CID_SHARPNESS:
index = USBTV_BASE + 0x0239;
data[0] = 0;
data[1] = ctrl->val;
size = 2;
break;
default: default:
kfree(data); kfree(data);
return -EINVAL; return -EINVAL;
...@@ -825,6 +831,8 @@ int usbtv_video_init(struct usbtv *usbtv) ...@@ -825,6 +831,8 @@ int usbtv_video_init(struct usbtv *usbtv)
V4L2_CID_SATURATION, 0, 0x3ff, 1, 0x200); V4L2_CID_SATURATION, 0, 0x3ff, 1, 0x200);
v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops, v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops,
V4L2_CID_HUE, -0xdff, 0xdff, 1, 0x000); 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; ret = usbtv->ctrl.error;
if (ret < 0) { if (ret < 0) {
dev_warn(usbtv->dev, "Could not initialize controls\n"); dev_warn(usbtv->dev, "Could not initialize controls\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment