mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
V4L/DVB (11688): gspca - m5602-s5k4aa: Fixup SXGA resolution.
The SXGA resolution doesn't work unless you first force the VGA resolution. More investigation is needed in order to fix this the "right" way. Signed-off-by: Grégory Lardière <spmf2004-m560x@yahoo.fr> Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
4db120bc07
commit
60d52ceced
2 changed files with 23 additions and 9 deletions
|
@ -74,6 +74,17 @@ static struct v4l2_pix_format s5k4aa_modes[] = {
|
|||
.bytesperline = 640,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.priv = 0
|
||||
},
|
||||
{
|
||||
1280,
|
||||
1024,
|
||||
V4L2_PIX_FMT_SBGGR8,
|
||||
V4L2_FIELD_NONE,
|
||||
.sizeimage =
|
||||
1280 * 1024,
|
||||
.bytesperline = 1280,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.priv = 0
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -288,6 +299,10 @@ int s5k4aa_start(struct sd *sd)
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
err = s5k4aa_set_noise(&sd->gspca_dev, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
break;
|
||||
|
||||
case 640:
|
||||
PDEBUG(D_V4L2, "Configuring camera for VGA mode");
|
||||
|
@ -320,6 +335,10 @@ int s5k4aa_start(struct sd *sd)
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
err = s5k4aa_set_noise(&sd->gspca_dev, 1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
@ -374,10 +393,6 @@ int s5k4aa_init(struct sd *sd)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = s5k4aa_set_noise(&sd->gspca_dev, sensor_settings[NOISE_SUPP_IDX]);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = s5k4aa_set_vflip(&sd->gspca_dev, sensor_settings[VFLIP_IDX]);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
|
@ -265,18 +265,17 @@ static const unsigned char SXGA_s5k4aa[][4] =
|
|||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */
|
||||
|
||||
{SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00},
|
||||
{SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP | S5K4AA_RM_ROW_SKIP_2X
|
||||
| S5K4AA_RM_COL_SKIP_2X, 0x00},
|
||||
{SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP, 0x00},
|
||||
{SENSOR, 0x37, 0x01, 0x00},
|
||||
{SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00},
|
||||
{SENSOR, S5K4AA_ROWSTART_LO, 0x0a, 0x00},
|
||||
{SENSOR, S5K4AA_ROWSTART_LO, 0x09, 0x00},
|
||||
{SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00},
|
||||
{SENSOR, S5K4AA_COLSTART_LO, 0x0b, 0x00},
|
||||
{SENSOR, S5K4AA_COLSTART_LO, 0x0a, 0x00},
|
||||
{SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x04, 0x00},
|
||||
{SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0x00, 0x00},
|
||||
{SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00},
|
||||
{SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00},
|
||||
{SENSOR, S5K4AA_H_BLANK_HI__, 0x00, 0x00},
|
||||
{SENSOR, S5K4AA_H_BLANK_HI__, 0x01, 0x00},
|
||||
{SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00},
|
||||
{SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00},
|
||||
{SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00},
|
||||
|
|
Loading…
Reference in a new issue