Commit f1a4f9ea authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

V4L/DVB: v4l2-common: add ability to use v4l2_ctrl_query_fill for chroma gain

Add the ability to use the v4l2_ctrl_query_fill() function for the newly
introduced chroma gain control.

Also, make use of the centralized function by the one caller.

This work was sponsored by EyeMagnet Limited.
Signed-off-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 87a6fe4a
...@@ -1234,16 +1234,7 @@ static int saa711x_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) ...@@ -1234,16 +1234,7 @@ static int saa711x_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
case V4L2_CID_CHROMA_AGC: case V4L2_CID_CHROMA_AGC:
return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1); return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
case V4L2_CID_CHROMA_GAIN: case V4L2_CID_CHROMA_GAIN:
qc->type = V4L2_CTRL_TYPE_INTEGER; return v4l2_ctrl_query_fill(qc, 0, 127, 1, 48);
qc->flags = V4L2_CTRL_FLAG_SLIDER;
qc->minimum = 0;
qc->maximum = 127;
qc->step = 1;
qc->default_value = 0x30;
qc->reserved[0] = 0;
qc->reserved[1] = 0;
strlcpy(qc->name, "chroma_gain", sizeof(qc->name));
return 0;
default: default:
return -EINVAL; return -EINVAL;
} }
......
...@@ -429,6 +429,7 @@ const char *v4l2_ctrl_get_name(u32 id) ...@@ -429,6 +429,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_SHARPNESS: return "Sharpness"; case V4L2_CID_SHARPNESS: return "Sharpness";
case V4L2_CID_BACKLIGHT_COMPENSATION: return "Backlight Compensation"; case V4L2_CID_BACKLIGHT_COMPENSATION: return "Backlight Compensation";
case V4L2_CID_CHROMA_AGC: return "Chroma AGC"; case V4L2_CID_CHROMA_AGC: return "Chroma AGC";
case V4L2_CID_CHROMA_GAIN: return "Chroma Gain";
case V4L2_CID_COLOR_KILLER: return "Color Killer"; case V4L2_CID_COLOR_KILLER: return "Color Killer";
case V4L2_CID_COLORFX: return "Color Effects"; case V4L2_CID_COLORFX: return "Color Effects";
case V4L2_CID_AUTOBRIGHTNESS: return "Brightness, Automatic"; case V4L2_CID_AUTOBRIGHTNESS: return "Brightness, Automatic";
...@@ -622,6 +623,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste ...@@ -622,6 +623,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_BLUE_BALANCE: case V4L2_CID_BLUE_BALANCE:
case V4L2_CID_GAMMA: case V4L2_CID_GAMMA:
case V4L2_CID_SHARPNESS: case V4L2_CID_SHARPNESS:
case V4L2_CID_CHROMA_GAIN:
case V4L2_CID_RDS_TX_DEVIATION: case V4L2_CID_RDS_TX_DEVIATION:
case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME: case V4L2_CID_AUDIO_LIMITER_RELEASE_TIME:
case V4L2_CID_AUDIO_LIMITER_DEVIATION: case V4L2_CID_AUDIO_LIMITER_DEVIATION:
......
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