Skip to content

Commit

Permalink
V4L/DVB (8356): gspca: 352x288 mode fix and source clean-up for Sonix…
Browse files Browse the repository at this point in the history
… bridges.

sonixb:   Bad initialization of sensor for 352x288 mode.
                (from Hans de Goede)
sonixj:   Clean-up source.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jul 20, 2008
1 parent ad5ef80 commit 3647fea
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 96 deletions.
4 changes: 2 additions & 2 deletions Documentation/video4linux/gspca.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ vc032x 0ac8:c002 Sony embedded vimicro
spca508 0af9:0010 Hama USB Sightcam 100
spca508 0af9:0011 Hama USB Sightcam 100
sonixb 0c45:6001 Genius VideoCAM NB
sonixb 0c45:6005 Sweex Tas5110
sonixb 0c45:6005 Microdia Sweex Mini Webcam
sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
sonixb 0c45:6009 spcaCam@120
sonixb 0c45:600d spcaCam@120
sonixb 0c45:6011 MAX Webcam (Microdia - OV6650 - SN9C101G)
sonixb 0c45:6011 Microdia PC Camera (SN9C102)
sonixb 0c45:6019 Generic Sonix OV7630
sonixb 0c45:6024 Generic Sonix Tas5130c
sonixb 0c45:6025 Xcam Shanga
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void isoc_irq(struct urb *urb
{
struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;

PDEBUG(D_PACK, "isoc irq mmap");
PDEBUG(D_PACK, "isoc irq");
if (!gspca_dev->streaming)
return;
fill_frame(gspca_dev, urb);
Expand Down
7 changes: 3 additions & 4 deletions drivers/media/video/gspca/sonixb.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static const __u8 initOv7630_3[] = {
0x44, 0x44, 0x00, 0x1a, 0x20, 0x20, 0x20, 0x80, /* r01 .. r08 */
0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, /* r09 .. r10 */
0x00, 0x01, 0x01, 0x0a, /* r11 .. r14 */
0x16, 0x12, /* H & V sizes r15 .. r16 */
0x28, 0x1e, /* H & V sizes r15 .. r16 */
0x68, 0x8f, MCK_INIT1, /* r17 .. r19 */
0x1d, 0x10, 0x02, 0x03, 0x0f, 0x0c, 0x00, /* r1a .. r20 */
0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, /* r21 .. r28 */
Expand Down Expand Up @@ -785,7 +785,6 @@ static void sd_start(struct gspca_dev *gspca_dev)
const __u8 *sn9c10x;
__u8 reg01, reg17;
__u8 reg17_19[3];
static const __u8 reg15[2] = { 0x28, 0x1e };

mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
switch (sd->sensor) {
Expand Down Expand Up @@ -905,8 +904,8 @@ static void sd_start(struct gspca_dev *gspca_dev)
sizeof tas5130_sensor_init);
break;
}
/* H_size V_size 0x28, 0x1e maybe 640x480 */
reg_w(gspca_dev, 0x15, reg15, 2);
/* H_size V_size 0x28, 0x1e -> 640x480. 0x16, 0x12 -> 352x288 */
reg_w(gspca_dev, 0x15, &sn9c10x[0x15 - 1], 2);
/* compression register */
reg_w(gspca_dev, 0x18, &reg17_19[1], 1);
if (sd->sensor != SENSOR_OV7630_3) {
Expand Down
Loading

0 comments on commit 3647fea

Please sign in to comment.