diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-12-02 04:58:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:51 -0500 |
commit | bd088835c78bd402711b16940b80bb761a74fa75 (patch) | |
tree | cd96c9a8a3a0f60413cdaf1acbdf06e8b0298d7f /drivers/media | |
parent | d7bb7317d4caca55de72e5bd2229d68ed7cce7af (diff) |
V4L/DVB (9850): gspca: Bad color control in sonixj.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 698f200df233..1f94cfd32c00 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -1207,17 +1207,17 @@ static void setcolors(struct gspca_dev *gspca_dev) | |||
1207 | { | 1207 | { |
1208 | struct sd *sd = (struct sd *) gspca_dev; | 1208 | struct sd *sd = (struct sd *) gspca_dev; |
1209 | int i, v; | 1209 | int i, v; |
1210 | __u8 rega0[12]; /* U & V gains */ | 1210 | __u8 reg8a[12]; /* U & V gains */ |
1211 | static __s16 uv[6] = { /* same as reg84 in signed decimal */ | 1211 | static __s16 uv[6] = { /* same as reg84 in signed decimal */ |
1212 | -24, -38, 64, /* UR UG UB */ | 1212 | -24, -38, 64, /* UR UG UB */ |
1213 | 62, -51, -9 /* VR VG VB */ | 1213 | 62, -51, -9 /* VR VG VB */ |
1214 | }; | 1214 | }; |
1215 | for (i = 0; i < 6; i++) { | 1215 | for (i = 0; i < 6; i++) { |
1216 | v = uv[i] * sd->colors / COLOR_DEF; | 1216 | v = uv[i] * sd->colors / COLOR_DEF; |
1217 | rega0[i * 2] = v; | 1217 | reg8a[i * 2] = v; |
1218 | rega0[i * 2 + 1] = (v >> 8) & 0x0f; | 1218 | reg8a[i * 2 + 1] = (v >> 8) & 0x0f; |
1219 | } | 1219 | } |
1220 | reg_w(gspca_dev, 0x84, rega0, sizeof rega0); | 1220 | reg_w(gspca_dev, 0x8a, reg8a, sizeof reg8a); |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | static void setredblue(struct gspca_dev *gspca_dev) | 1223 | static void setredblue(struct gspca_dev *gspca_dev) |