[PATCH] UBUNTU: SAUCE: [Jaunty SRU] LP#310760 Fix the MIC of the Lenovo webcam doesn't workafter launching the camera

AceLan Kao acelan.kao at canonical.com
Mon Jul 13 07:32:38 UTC 2009


OriginalAuthor: AceLan Kao <acelan.kao at canonical.com>, Keng-Yu Lin <keng-yu.lin at canonical.com>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/310760

SRU JUSTIFICATION

IMPACT: The MIC of the Lenovo webcam doesn't work after launching the
camera, because of the i2c command of the turn on/off the LED on the
camera is wrong and will impact the MIC function.

FIX: A simple patch to avoid sending out the LED i2c command if detected
the webcam model is Lenovo. The upstream kernel has problem with this
model of webcam, will try to fix the problem and send the patch to
upstream.

TEST: This patch is the same as Hardy SRU, the originator had reported
the patch is work on Hardy, so it sould also work on Jaunty
http://people.ubuntu.com/~lexical/archive/lp310760/

git://kernel.ubuntu.com/acelan/ubuntu-jaunty.git lp310760

Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
---
 drivers/media/video/gspca/vc032x.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index 17af353..705e0ed 100644
--- a/drivers/media/video/gspca/vc032x.c
+++ b/drivers/media/video/gspca/vc032x.c
@@ -1615,8 +1615,11 @@ static int sd_start(struct gspca_dev *gspca_dev)
 		reg_w(gspca_dev->dev, 0xa0, 0x23, 0xb800); * ISP CTRL_BAS
 		*/
 		/* set the led on 0x0892 0x0896 */
-		reg_w(gspca_dev->dev, 0x89, 0xffff, 0xfdff);
-		msleep(100);
+		if( sd->sensor != SENSOR_MI1310_SOC)
+		{
+			reg_w(gspca_dev->dev, 0x89, 0xffff, 0xfdff);
+			msleep(100);
+		}
 		setquality(gspca_dev);
 		setautogain(gspca_dev);
 		setlightfreq(gspca_dev);
@@ -1627,8 +1630,10 @@ static int sd_start(struct gspca_dev *gspca_dev)
 static void sd_stopN(struct gspca_dev *gspca_dev)
 {
 	struct usb_device *dev = gspca_dev->dev;
+	struct sd *sd = (struct sd *) gspca_dev;
 
-	reg_w(dev, 0x89, 0xffff, 0xffff);
+	if( sd->sensor != SENSOR_MI1310_SOC)
+		reg_w(dev, 0x89, 0xffff, 0xffff);
 	reg_w(dev, 0xa0, 0x01, 0xb301);
 	reg_w(dev, 0xa0, 0x09, 0xb003);
 }
@@ -1637,10 +1642,12 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
 static void sd_stop0(struct gspca_dev *gspca_dev)
 {
 	struct usb_device *dev = gspca_dev->dev;
+	struct sd *sd = (struct sd *) gspca_dev;
 
 	if (!gspca_dev->present)
 		return;
-	reg_w(dev, 0x89, 0xffff, 0xffff);
+	if( sd->sensor != SENSOR_MI1310_SOC)
+		reg_w(dev, 0x89, 0xffff, 0xffff);
 }
 
 static void sd_pkt_scan(struct gspca_dev *gspca_dev,
-- 
1.6.0.4





More information about the kernel-team mailing list