提交 c9ff1b68 编写于 作者: J Jean-Francois Moine 提交者: Mauro Carvalho Chehab

V4L/DVB (9557): gspca: Small changes for the sensor HV7131B in zc3xx.

- touch only one register for brightness change
- no quality control
- don't probe again at streamon time.
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 03bf7565
...@@ -2290,7 +2290,7 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */ ...@@ -2290,7 +2290,7 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */
{0xaa, 0x14, 0x0001}, {0xaa, 0x14, 0x0001},
{0xaa, 0x15, 0x00e8}, {0xaa, 0x15, 0x00e8},
{0xaa, 0x16, 0x0002}, {0xaa, 0x16, 0x0002},
{0xaa, 0x17, 0x0086}, {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */
{0xaa, 0x31, 0x0038}, {0xaa, 0x31, 0x0038},
{0xaa, 0x32, 0x0038}, {0xaa, 0x32, 0x0038},
{0xaa, 0x33, 0x0038}, {0xaa, 0x33, 0x0038},
...@@ -2309,7 +2309,7 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */ ...@@ -2309,7 +2309,7 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */
{0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
{0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
{0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
{0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}; */ {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */
{0xa1, 0x01, 0x0002}, {0xa1, 0x01, 0x0002},
{0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT},
{0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND},
...@@ -6388,6 +6388,8 @@ static void setbrightness(struct gspca_dev *gspca_dev) ...@@ -6388,6 +6388,8 @@ static void setbrightness(struct gspca_dev *gspca_dev)
/*fixme: is it really write to 011d and 018d for all other sensors? */ /*fixme: is it really write to 011d and 018d for all other sensors? */
brightness = sd->brightness; brightness = sd->brightness;
reg_w(gspca_dev->dev, brightness, 0x011d); reg_w(gspca_dev->dev, brightness, 0x011d);
if (sd->sensor == SENSOR_HV7131B)
return;
if (brightness < 0x70) if (brightness < 0x70)
brightness += 0x10; brightness += 0x10;
else else
...@@ -6529,6 +6531,7 @@ static void setquality(struct gspca_dev *gspca_dev) ...@@ -6529,6 +6531,7 @@ static void setquality(struct gspca_dev *gspca_dev)
switch (sd->sensor) { switch (sd->sensor) {
case SENSOR_GC0305: case SENSOR_GC0305:
case SENSOR_HV7131B:
case SENSOR_OV7620: case SENSOR_OV7620:
case SENSOR_PO2030: case SENSOR_PO2030:
return; return;
...@@ -7209,7 +7212,6 @@ static int sd_start(struct gspca_dev *gspca_dev) ...@@ -7209,7 +7212,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
zc3_init = init_tb[(int) sd->sensor][mode]; zc3_init = init_tb[(int) sd->sensor][mode];
switch (sd->sensor) { switch (sd->sensor) {
case SENSOR_HV7131B:
case SENSOR_HV7131C: case SENSOR_HV7131C:
zcxx_probeSensor(gspca_dev); zcxx_probeSensor(gspca_dev);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册