Commit d754a6ca authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13870): gspca - zc3xx: Bad detection of sensor HV7131R(c).



The webcam 0ac8:303b may have the sensors HV7131B or HV7131R(c).
This changeset checks the HV7131 type.

Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 658604ec
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -6672,9 +6672,22 @@ static int sd_config(struct gspca_dev *gspca_dev,
			}
			break;
		case 0:
			/* check the sensor type */
			sensor = i2c_read(gspca_dev, 0x00);
			PDEBUG(D_PROBE, "Sensor hv7131 type %d", sensor);
			switch (sensor) {
			case 0:			/* hv7131b */
			case 1:			/* hv7131e */
				PDEBUG(D_PROBE, "Find Sensor HV7131B");
				sd->sensor = SENSOR_HV7131B;
				break;
			default:
/*			case 2:			 * hv7131r */
				PDEBUG(D_PROBE, "Find Sensor HV7131R(c)");
				sd->sensor = SENSOR_HV7131C;
				break;
			}
			break;
		case 0x02:
			PDEBUG(D_PROBE, "Sensor TAS5130C");
			sd->sensor = SENSOR_TAS5130CXX;