[PATCH] UBUNTU: [Hardy SRU] LP#310760 Fix the MIC of the Lenovo webcam problem

Amit Kucheria amit.kucheria at canonical.com
Tue Sep 1 10:45:15 UTC 2009


On 09 Sep 01, AceLan Kao wrote:
> SRU JUSTIFICATION
> 
> IMPACT: The MIC of the Lenovo webcam doesn't work after launching the
> camera, because of the i2c command that turn on/off the LED for the
> camera is wrong and will impact the MIC function.
> 
> FIX: By snooping the USB traffic from Windows and extracting the correct
> i2c commands that turn on/off the LED. The patch goes to the V4L/DVB
> tree contains other bug fixes that introduced from the following two
> 2.6.29 commits
> 6af4e7a V4L/DVB (10424): gspca - vc032x: Add resolution 1280x1024 for
> sensor mi1310_soc.
> a92e906 V4L/DVB (10420): gspca - vc032x: Webcam 041e:405b added and
> mi1310_soc updated.
> I only merge back the LED part, since Hardy doesn't have that problem.
> The patch is already accepted by the V4L/DVB branch and will be merged
> into upstream kernel later.
> http://linuxtv.org/hg/v4l-dvb/rev/49966c5f2052
> 
> TEST: This patch work fine with the Lenovo webcam I have.
> 
> 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 |   14 ++++++++++++--
>  1 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/ubuntu/media/gspcav1/Vimicro/vc032x.h b/ubuntu/media/gspcav1/Vimicro/vc032x.h
> index 2bd1f67..7a1a02c 100644
> --- a/ubuntu/media/gspcav1/Vimicro/vc032x.h
> +++ b/ubuntu/media/gspcav1/Vimicro/vc032x.h
> @@ -509,6 +509,8 @@ static void vc0321_start(struct usb_spca50x *spca50x)
>  	    		/* 640x480 */
>  	   		 err = vc0321WriteVector(spca50x, mi1310_socinitVGA_JPG);
>  		}
> +		// turn on LED
> +		spca5xxRegWrite(spca50x->dev, 0x89, 0x058c, 0x0000, NULL, 0);
>  	break;
>  	default:
>  		PDEBUG(0, "Damned !! no sensor found Bye");
> @@ -554,7 +556,12 @@ 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);
> +
> +    if( spca50x->sensor == SENSOR_MI1310_SOC)
> +        spca5xxRegWrite(dev, 0x89, 0x058c, 0x00ff, NULL, 0);
> +    else
> +        spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
> +
>      spca5xxRegWrite(dev, 0xa0, 0x01, 0xb301, NULL, 0);
>      spca5xxRegWrite(dev, 0xa0, 0x09, 0xb003, NULL, 0);
>  }
> @@ -562,7 +569,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);
> +    if( spca50x->sensor == SENSOR_MI1310_SOC)
> +        spca5xxRegWrite(dev, 0x89, 0x058c, 0x00ff, NULL, 0);
> +    else
> +        spca5xxRegWrite(dev, 0x89, 0xffff, 0xffff, NULL, 0);
>  }
>  
>  static void vc0321_shutdown(struct usb_spca50x *spca50x)
> -- 
> 1.6.0.4

Patch will impact only SENSOR_MI1310_SOC and has been ACK'ed upstream.

ACK.


-- 
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || amit.kucheria at canonical.com
----------------------------------------------------------------------




More information about the kernel-team mailing list