Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219108
b: refs/heads/master
c: 47399d9
h: refs/heads/master
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 307078b commit 49f0504
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c67be3ccd7616ed828586d5d3f4b48b438c0a433
refs/heads/master: 47399d98e79c7fd4fac0e2457db26f3842ecb990
13 changes: 12 additions & 1 deletion trunk/drivers/media/video/gspca/cpia1.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static int sd_getilluminator2(struct gspca_dev *gspca_dev, __s32 *val);

static const struct ctrl sd_ctrls[] = {
{
#define BRIGHTNESS_IDX 0
{
.id = V4L2_CID_BRIGHTNESS,
.type = V4L2_CTRL_TYPE_INTEGER,
Expand All @@ -394,6 +395,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setbrightness,
.get = sd_getbrightness,
},
#define CONTRAST_IDX 1
{
{
.id = V4L2_CID_CONTRAST,
Expand All @@ -408,6 +410,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setcontrast,
.get = sd_getcontrast,
},
#define SATURATION_IDX 2
{
{
.id = V4L2_CID_SATURATION,
Expand All @@ -422,6 +425,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setsaturation,
.get = sd_getsaturation,
},
#define POWER_LINE_FREQUENCY_IDX 3
{
{
.id = V4L2_CID_POWER_LINE_FREQUENCY,
Expand All @@ -436,6 +440,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setfreq,
.get = sd_getfreq,
},
#define ILLUMINATORS_1_IDX 4
{
{
.id = V4L2_CID_ILLUMINATORS_1,
Expand All @@ -450,6 +455,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setilluminator1,
.get = sd_getilluminator1,
},
#define ILLUMINATORS_2_IDX 5
{
{
.id = V4L2_CID_ILLUMINATORS_2,
Expand All @@ -464,6 +470,7 @@ static const struct ctrl sd_ctrls[] = {
.set = sd_setilluminator2,
.get = sd_getilluminator2,
},
#define COMP_TARGET_IDX 6
{
{
#define V4L2_CID_COMP_TARGET V4L2_CID_PRIVATE_BASE
Expand Down Expand Up @@ -1756,9 +1763,13 @@ static int sd_init(struct gspca_dev *gspca_dev)
if (ret)
return ret;

/* Ensure the QX3 illuminators' states are restored upon resume */
/* Ensure the QX3 illuminators' states are restored upon resume,
or disable the illuminator controls, if this isn't a QX3 */
if (sd->params.qx3.qx3_detected)
command_setlights(gspca_dev);
else
gspca_dev->ctrl_dis |=
((1 << ILLUMINATORS_1_IDX) | (1 << ILLUMINATORS_2_IDX));

sd_stopN(gspca_dev);

Expand Down

0 comments on commit 49f0504

Please sign in to comment.