[PATCH] UBUNTU: SAUCE: [Hardy SRU] LP#310760 Fix the MIC of the Lenovo webcam doesn't work after launching the camera
Tim Gardner
tim.gardner at canonical.com
Mon Jul 13 12:44:38 UTC 2009
AceLan Kao wrote:
> 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: The test kernl in
> http://people.ubuntu.com/~lexical/archive/lp310760/ was tested by the
> originator of the bug and reported to work.
>
> git://kernel.ubuntu.com/acelan/ubuntu-hardy-lum.git lp310760
>
> Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
> ---
> ubuntu/media/gspcav1/Vimicro/vc032x.h | 17 +++++++++++++----
> 1 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/ubuntu/media/gspcav1/Vimicro/vc032x.h b/ubuntu/media/gspcav1/Vimicro/vc032x.h
> index 2bd1f67..c2e9b20 100644
> --- a/ubuntu/media/gspcav1/Vimicro/vc032x.h
> +++ b/ubuntu/media/gspcav1/Vimicro/vc032x.h
> @@ -543,8 +543,11 @@ static void vc0321_start(struct usb_spca50x *spca50x)
> spca5xxRegWrite(spca50x->dev, 0xa0, 0x23, 0xb800, NULL, 0); // ISP CTRL_BAS
> */
> // set the led on 0x0892 0x0896
> - spca5xxRegWrite(spca50x->dev, 0x89, 0xffff, 0xfdff, NULL, 0);
> - msleep(100);
> + if( sd->sensor != SENSOR_MI1310_SOC)
> + {
> + spca5xxRegWrite(spca50x->dev, 0x89, 0xffff, 0xfdff, NULL, 0);
> + msleep(100);
> + }
> vc0321_setbrightness(spca50x);
> vc0321_setquality(spca50x);
> vc0321_setAutobright(spca50x);
> @@ -554,7 +557,10 @@ static void vc0321_start(struct usb_spca50x *spca50x)
> static void vc0321_stopN(struct usb_spca50x *spca50x)
> {
> struct usb_device *dev = spca50x->dev;
> - spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
> + struct sd *sd = (struct sd *) gspca_dev;
> +
> + if( sd->sensor != SENSOR_MI1310_SOC)
> + spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
> spca5xxRegWrite(dev, 0xa0, 0x01, 0xb301, NULL, 0);
> spca5xxRegWrite(dev, 0xa0, 0x09, 0xb003, NULL, 0);
> }
> @@ -562,7 +568,10 @@ static void vc0321_stopN(struct usb_spca50x *spca50x)
> static void vc0321_stop0(struct usb_spca50x *spca50x)
> {
> struct usb_device *dev = spca50x->dev;
> - spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
> + struct sd *sd = (struct sd *) gspca_dev;
> +
> + if( sd->sensor != SENSOR_MI1310_SOC)
> + spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
> }
>
> static void vc0321_shutdown(struct usb_spca50x *spca50x)
NAK - I don't believe this qualifies for an SRU. Furthermore, I'd like
to see it working in the upstream kernel first.
--
Tim Gardner tim.gardner at canonical.com
More information about the kernel-team
mailing list