diff options
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r-- | drivers/media/video/saa7115.c | 58 |
1 files changed, 9 insertions, 49 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index f4843bb45347..b59c11717273 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1090,48 +1090,6 @@ static void saa7115_decode_vbi_line(struct i2c_client *client, | |||
1090 | 1090 | ||
1091 | /* ============ SAA7115 AUDIO settings (end) ============= */ | 1091 | /* ============ SAA7115 AUDIO settings (end) ============= */ |
1092 | 1092 | ||
1093 | static struct v4l2_queryctrl saa7115_qctrl[] = { | ||
1094 | { | ||
1095 | .id = V4L2_CID_BRIGHTNESS, | ||
1096 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
1097 | .name = "Brightness", | ||
1098 | .minimum = 0, | ||
1099 | .maximum = 255, | ||
1100 | .step = 1, | ||
1101 | .default_value = 128, | ||
1102 | .flags = 0, | ||
1103 | }, { | ||
1104 | .id = V4L2_CID_CONTRAST, | ||
1105 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
1106 | .name = "Contrast", | ||
1107 | .minimum = 0, | ||
1108 | .maximum = 127, | ||
1109 | .step = 1, | ||
1110 | .default_value = 64, | ||
1111 | .flags = 0, | ||
1112 | }, { | ||
1113 | .id = V4L2_CID_SATURATION, | ||
1114 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
1115 | .name = "Saturation", | ||
1116 | .minimum = 0, | ||
1117 | .maximum = 127, | ||
1118 | .step = 1, | ||
1119 | .default_value = 64, | ||
1120 | .flags = 0, | ||
1121 | }, { | ||
1122 | .id = V4L2_CID_HUE, | ||
1123 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
1124 | .name = "Hue", | ||
1125 | .minimum = -128, | ||
1126 | .maximum = 127, | ||
1127 | .step = 1, | ||
1128 | .default_value = 0, | ||
1129 | .flags = 0, | ||
1130 | }, | ||
1131 | }; | ||
1132 | |||
1133 | /* ----------------------------------------------------------------------- */ | ||
1134 | |||
1135 | static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *arg) | 1093 | static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *arg) |
1136 | { | 1094 | { |
1137 | struct saa7115_state *state = i2c_get_clientdata(client); | 1095 | struct saa7115_state *state = i2c_get_clientdata(client); |
@@ -1175,14 +1133,16 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1175 | case VIDIOC_QUERYCTRL: | 1133 | case VIDIOC_QUERYCTRL: |
1176 | { | 1134 | { |
1177 | struct v4l2_queryctrl *qc = arg; | 1135 | struct v4l2_queryctrl *qc = arg; |
1178 | int i; | ||
1179 | 1136 | ||
1180 | for (i = 0; i < ARRAY_SIZE(saa7115_qctrl); i++) | 1137 | switch (qc->id) { |
1181 | if (qc->id && qc->id == saa7115_qctrl[i].id) { | 1138 | case V4L2_CID_BRIGHTNESS: |
1182 | memcpy(qc, &saa7115_qctrl[i], sizeof(*qc)); | 1139 | case V4L2_CID_CONTRAST: |
1183 | return 0; | 1140 | case V4L2_CID_SATURATION: |
1184 | } | 1141 | case V4L2_CID_HUE: |
1185 | return -EINVAL; | 1142 | return v4l2_ctrl_query_fill_std(qc); |
1143 | default: | ||
1144 | return -EINVAL; | ||
1145 | } | ||
1186 | } | 1146 | } |
1187 | 1147 | ||
1188 | case VIDIOC_G_STD: | 1148 | case VIDIOC_G_STD: |