Microsoft LifeCam VX-1000 Linux GSPCA Patch

Update: See the linked comment for more details.

I’ve been in talks with the GSPCA maintainer for a week now discussing possible issues that the Microsoft LifeCam VX-1000 was having in Linux. In case you don’t know (which I didn’t at first either), GSPCA stands for “Generic Software Package for Camera Adapters.”

Microsoft LifeCam VX-1000

This software package contains drivers to a wealth of webcams and other video input devices, the Microsoft LifeCam VX-1000 included. The problem I had was that the built in microphone would stop working as soon as you turned on the camera. If you never used the camera and only opened a sound recording application then the microphone would work perfectly. In the long mailing list discussions that let me to this post, we discovered that the bug was is in setting a GPIO register that instantly breaks communication with the microphone. I’ve worked up a patch that I would like to get tested by others. Basically, the patch just includes conditionals that tell the driver not to apply this GPIO register change if the camera is using the OV7660 sensor. What I would like to test is, does disabling for this sensor affect other OV7660 devices? If not, then this patch will likely go into the main Linux kernel. If you’re using the Microsoft LifeCam VX-1000 or VX-3000 and are having trouble with your microphone, could you please do the following?

Testing the Patch

  1. Download my patched GSPCA: gspca-2.9.51-vx1000-patch-20100712.zip
    Download the latest version of GSPCA which now includes my patch: http://moinejf.free.fr/
  2. Extract the zip file on your Desktop (so you have the folder “gspca-2.9.51-vx1000-patch-20100712”).
  3. Open a terminal window and enter the following commands:
    cd Desktop/gspca-2.9.51-vx1000-patch-20100712/
    make
    sudo make install
  4. Reboot your computer and test your webcam in an application such as Cheese (which can easily be found in the Ubuntu Software Center).

Make sure that when you start your webcam in Cheese that the microphone continues to work. You can verify this in the Sound Preferences window if you click on the Input tab (make sure you have selected “LifeCam VX-1000”  as your input device). Let me know in the comments below or in the Ubuntu thread regarding this issue how it works for you! In case anyone is interested, here is the “diff -uNr” for the original sonixj.c against my modified version:

--- sonixj-original.c	2010-07-10 05:03:02.000000000 -0400
+++ sonixj-patch.c	2010-07-12 17:52:20.000000000 -0400
@@ -1749,7 +1749,8 @@
 		reg_w1(gspca_dev, 0x01, 0x62);
 		reg_w1(gspca_dev, 0x01, 0x42);
 		msleep(100);
-		reg_w1(gspca_dev, 0x02, 0x62);
+		if (sd->sensor != SENSOR_OV7660)
+			reg_w1(gspca_dev, 0x02, 0x62);
 		break;
 	default:
 /*	case SENSOR_HV7131R: */
@@ -2317,8 +2318,10 @@
 		reg2 = 0x40;
 		break;
 	}
-	reg_w1(gspca_dev, 0x02, reg2);
-	reg_w1(gspca_dev, 0x02, reg2);
+	if (sd->sensor != SENSOR_OV7660) {
+		reg_w1(gspca_dev, 0x02, reg2);
+		reg_w1(gspca_dev, 0x02, reg2);
+	}

 	reg_w1(gspca_dev, 0x15, sn9c1xx[0x15]);
 	reg_w1(gspca_dev, 0x16, sn9c1xx[0x16]);

UPDATE 2010-07-13: As of today this patch is included in GSPCA v2.9.52+! It looks like my hard work paid off after all and now all Linux users, not just Ubuntu users, will be able to enjoy the fruit of my labor since GSPCA is merged into the official Linux Kernel. 😉

Ubuntu 10.04 and LifeCam VX-1000

If you’re using the same web cam that I’m using, the Microsoft LifeCam VX-1000, then you may already be familiar with the difficulties involved in the process of getting this web cam to work in Ubuntu…or rather, the difficulties that were involved.

After countless days spent and hours wasted over the past 4 months that I’ve owned this web cam, I had not been able to find a solution to see it work even once.

The problems I ran into were that the few solutions for this camera were specifically for 32-bit Ubuntu, while I’m using 64-bit Ubuntu.

Typically these days, this type of problem isn’t architecture specific in Linux, which means that fewer people have to battle the problems that are unique to x86_64 platforms. In my experience with Ubuntu, x86_64 application/firmware support 4 years ago was a joke. Today, x86_64 support is commonplace and practically a standard.

After upgrading to Ubuntu 10.04, I was able to see this support change yet again! Without configuring anything in Ubuntu 10.04 x86_64 the video feed from my web cam was working flawlessly (I tested using Cheese 2.29.90)!

There is the small matter of getting the mic on the web cam to work, but for now I’ve got an old mic that plugs into the ports from the motherboard. So I will have sound, just not through the web cam just yet. Hopefully I can find a solution to this as well, in which case I will be sure to link you to. 😉

In the future, I’d also like to submit a patch or hack to enable the LifeCam Call Button like I did previously in Windows 7 so that you can configure what the button should do…take a picture, video, start a call or chat, etc.

LifeCam Button Config v1.0.0.0

I’ve just written a tool that lets you bypass the default Windows Live Messenger prompt when you press you LifeCam’s button on top.

It can be a little annoy, but the good news is that now you can open or focus any application you want with the click of that button.

2009-10-20_0031

As you can see from the image above, I’ve made a simple browse option so you can easily find the file you want. When you open this tool it will automatically display the path to the program that is currently set to open.

2009-10-20_0031_001

If you later decide that you want to just use the default application (the one set before you change anything) then it’s only a couple of clicks away!

Currently the implementation used could be error prone. I have written the application to “assume” that the default application should be installed to “C:\Program Files\Microsoft LifeCam\icepick.exe” for 32-bit computers and to “C:\Program Files (x86)\Microsoft LifeCam\icepick.exe” for 64-bit computers.

If problems are experienced with this then please let me know. It may be better to scan for the application rather than to assume it’s in that location, but typically it should always be in that location.

2009-10-20_0032

Thanks for checking out this little tool! I hope you find it helpful. If you’re curious about the source code just fire off an email! It’s currently written in Visual Basic 2008, but could easily be ported to another language especially since I overly document code so others know what I’m doing. 😉

Download163kb