Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114044
b: refs/heads/master
c: 803f9cc
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 6e42216 commit 1792669
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 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: eeb00c604ad203a51a0b92e124bcc4f98ba7e2c0
refs/heads/master: 803f9ccf50178af6cde7aec86db2d78db3d069e7
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/gspca/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-$(CONFIG_USB_GSPCA_OV519) += gspca_ov519.o
obj-$(CONFIG_USB_GSPCA_PAC207) += gspca_pac207.o
obj-$(CONFIG_USB_GSPCA_PAC7311) += gspca_pac7311.o
obj-$(CONFIG_USB_GSPCA_SONIXB) += gspca_sonixb.o
obj-$(CONFIG_USB_GSPCA_SONXIJ) += gspca_sonixj.o
obj-$(CONFIG_USB_GSPCA_SONIXJ) += gspca_sonixj.o
obj-$(CONFIG_USB_GSPCA_SPCA500) += gspca_spca500.o
obj-$(CONFIG_USB_GSPCA_SPCA501) += gspca_spca501.o
obj-$(CONFIG_USB_GSPCA_SPCA505) += gspca_spca505.o
Expand Down
27 changes: 13 additions & 14 deletions trunk/drivers/media/video/gspca/sonixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,12 @@ static const __u8 gamma_def[] = {
0xa6, 0xb2, 0xbf, 0xca, 0xd5, 0xe0, 0xeb, 0xf5, 0xff
};

/* color matrix and offsets */
static const __u8 reg84[] = {
0x14, 0x00, 0x27, 0x00, 0x07, 0x00, 0xe5, 0x0f,
0xe4, 0x0f, 0x38, 0x00, 0x3e, 0x00, 0xc3, 0x0f,
0xf7, 0x0f, 0x00, 0x00, 0x00
0x14, 0x00, 0x27, 0x00, 0x07, 0x00, /* YR YG YB gains */
0xe8, 0x0f, 0xda, 0x0f, 0x40, 0x00, /* UR UG UB */
0x3e, 0x00, 0xcd, 0x0f, 0xf7, 0x0f, /* VR VG VB */
0x00, 0x00, 0x00 /* YUV offsets */
};
static const __u8 hv7131r_sensor_init[][8] = {
{0xC1, 0x11, 0x01, 0x08, 0x01, 0x00, 0x00, 0x10},
Expand Down Expand Up @@ -1102,20 +1104,17 @@ static unsigned int setexposure(struct gspca_dev *gspca_dev,
static void setbrightcont(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
unsigned val;
int val;
__u8 reg84_full[0x15];

memset(reg84_full, 0, sizeof reg84_full);
val = sd->contrast * 0x20 / CONTRAST_MAX + 0x10; /* 10..30 */
reg84_full[2] = val;
reg84_full[0] = (val + 1) / 2;
reg84_full[4] = (val + 1) / 5;
if (val > BRIGHTNESS_DEF)
val = (sd->brightness - BRIGHTNESS_DEF) * 0x20
memcpy(reg84_full, reg84, sizeof reg84_full);
val = sd->contrast * 0x30 / CONTRAST_MAX + 0x10; /* 10..40 */
reg84_full[0] = (val + 1) / 2; /* red */
reg84_full[2] = val; /* green */
reg84_full[4] = (val + 1) / 5; /* blue */
val = (sd->brightness - BRIGHTNESS_DEF) * 0x10
/ BRIGHTNESS_MAX;
else
val = 0;
reg84_full[0x12] = val; /* 00..1f */
reg84_full[0x12] = val & 0x1f; /* 5:0 signed value */
reg_w(gspca_dev, 0x84, reg84_full, sizeof reg84_full);
}

Expand Down

0 comments on commit 1792669

Please sign in to comment.