Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17359
b: refs/heads/master
c: da4ae5a
h: refs/heads/master
i:
  17357: 49c3549
  17355: e171c35
  17351: f8ef7c0
  17343: 6380f3a
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jan 9, 2006
1 parent dac15e6 commit 8a328c5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d92c20e0a5b560bbe46d7e68bb47df2366cddf8f
refs/heads/master: da4ae5a72b2a9de351ec8f98543b7c666ec97005
55 changes: 55 additions & 0 deletions trunk/drivers/media/video/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,48 @@ static void saa7115_decode_vbi_line(struct i2c_client *client,

/* ============ SAA7115 AUDIO settings (end) ============= */

static struct v4l2_queryctrl saa7115_qctrl[] = {
{
.id = V4L2_CID_BRIGHTNESS,
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "Brightness",
.minimum = 0,
.maximum = 255,
.step = 1,
.default_value = 128,
.flags = 0,
}, {
.id = V4L2_CID_CONTRAST,
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "Contrast",
.minimum = 0,
.maximum = 255,
.step = 1,
.default_value = 64,
.flags = 0,
}, {
.id = V4L2_CID_SATURATION,
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "Saturation",
.minimum = 0,
.maximum = 255,
.step = 1,
.default_value = 64,
.flags = 0,
}, {
.id = V4L2_CID_HUE,
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "Hue",
.minimum = -128,
.maximum = 127,
.step = 1,
.default_value = 0,
.flags = 0,
},
};

/* ----------------------------------------------------------------------- */

static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *arg)
{
struct saa7115_state *state = i2c_get_clientdata(client);
Expand Down Expand Up @@ -1052,6 +1094,19 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar
case VIDIOC_S_CTRL:
return saa7115_set_v4lctrl(client, (struct v4l2_control *)arg);

case VIDIOC_QUERYCTRL:
{
struct v4l2_queryctrl *qc = arg;
int i;

for (i = 0; i < ARRAY_SIZE(saa7115_qctrl); i++)
if (qc->id && qc->id == saa7115_qctrl[i].id) {
memcpy(qc, &saa7115_qctrl[i], sizeof(*qc));
return 0;
}
return -EINVAL;
}

case VIDIOC_G_STD:
*(v4l2_std_id *)arg = saa7115_get_v4lstd(client);
break;
Expand Down

0 comments on commit 8a328c5

Please sign in to comment.