UVC support soon in vanilla kernel?

multimedia
In a recent interview with the German IT online magazine Golem.de the kernel developer Greg Kroah-Hartman mentioned that the USB video device support will soon be merged into the vanilla kernel.

Many USB video devices (like Webcams, etc.) do work via the UVC standard. There is of course a Linux driver available, however this is not part of the vanilla kernel yet due to problems with the Video4Linux implementation. Therefore it has to be compiled manually or is added afterwards as a patch by the distributions. Fedora 9 and the new Ubuntu 8.04 for example do include the driver with their kernels.

Now in an interview with the German Golem.de Greg Kroah-Hartman mentioned that it is planned to merge that device driver in the near future into the mainline kernel:

There is a standard for USB video devices and the corresponding driver will soon be merged into the kernel.

If this really happens than video devices on Linux will make a big step forward: first of all a huge set of devices will be supported out of the box. Second, the support can be expected - therefore application developers can rely on it and can develop applications incorporating such video devices. Third, the developers behind the driver finally get credit for their great work and can continue the development on a stable base and with a clear future. And last but not least, the distributions have one patch less to worry.

Besides this information GKH identifies two big problematic fields in the current Linux device driver world: WLAN and video devices. WLAN just became much more sane and easy due to the new stack, but Broadcom devices are still a problem due to lacking support from Broadcam. And while video graphic cards support is getting better due to published specifications (NVIDIA, you are the only one missing!) many devices like video cameras and similar are still a problem and not well supported yet.

It is good to see that the kernel device developers have a clear picture of which device drivers are missing. And btw., it is nice to see that these drivers are for average desktop devices for normal users. So in this regard the kernel developers have an eye on the desktop.

KDE SOC projects published

kde-logo-official
The list of the Google Summer of Code projects for KDE was published. The list has several interesting entries to make the life for KDE users much easier.

The results for this year’s Google Summer of Code are out, and several KDE ideas were picked up.

Going through the list I found some items which immediately rouse my interest:

Of course this is just a small list of the accepted applications - and an accepted application doesn’t necessarily mean that the project will be a success. Additionally, this year the process around the applications and slots wasn’t perfect, but maybe the KDE e.V. can step up there to make the rejected projects possible nevertheless?
An idea would be to collect money through the KDE e.V. to sponsor other applicants, given that KDE finds their applications worth a try. I would be willing to donate some money for a stand-alone, KDE integrated browser based on WebKit, for general video input device support in Phonon or for a full featured Sonnet.

Qt, Trolltech and Nokia

Qt, Trolltech and Nokia
Nokia acquired Trolltech - some thoughts about that move.

The news is already some days old: Nokia acquired Trolltech. Surprising since Nokia’s focus is mainly on hardware while Trolltech focusses on software almost exclusively. Additionally, Nokia’s Open Source involvements so far most often dealt with Gnome.

Anyway, it is done now. The question remains what that means for the Free Software world, especially KDE. First of all not that much: Of course Qt development will be continued, at least for the near future. Even if the worst case would happen and Nokia would drop Qt to get rid of a competitor for their Symbian OS, Qt would automatically be released under some BSD styled licenc - and is already GPL-free. Nothing to worry there.
Additionally, it is unlikely that Nokia drops Qt because than they would not have acquired Trolltech in the first place.

However, since Nokia is specialized on mobile technology it is likely that they will use Qt to spread software among their devices. Since Qt already works cross platform the hope is that Nokia wants to use Qt to develop cross platform tools for PCs and mobile devices at the same time. This is a realistic aim since Qt already has strong cross platform abilities. In reverse this would mean that maybe some day KDE tools would become available on mobile devices without much of a hassle.
Another aim for Nokia could be that they are searching for a way to unify their software in general: parts of their software (the PC Suite) are already using Qt, and it can only be in Nokias interest to make all their applications look and behave in similar ways.

Of course, the fear that not everything works out perfectly well for the FLOSS community is there: it could be that Nokia just neglects the Linux part of Qt (or even the entire PC part) as far as possible without releasing Qt under a BSD-style licence. Additionally, buying Trolltech is just a piece of a larger puzzle: recently Nokia acquired several other companies as well. The main task for Nokia now is to bring all these pieces together to form a decent, appealing and working platform. If that strategy fails, Trolltech could fall down as well and could be sold to somewhere else.

But if Nokia gets the idea of FLOSS properly - and there are several hints that they do - it could work out pretty well. I hope that will be the case!

KDE 4.0 is out - a look back

KDE 4.0 - a look back
KDE 4.0 is out. While I won’t have the time to give it a rough test today I do have some minutes to look back.

It’s done: KDE 4.0.0 is out.
KDE 4.0
There is a great Visual guide available, and release parties are going on or will be taking place the next days. Also, don’t miss the clearing words about expectations, features and reality Aaron has posted recently.

For me, unfortunately, KDE 4.0.0 has to wait some more weeks since I am in the final weeks of finishing my diploma thesis, and I cannot risk to alter any of the basic things on my machine. My distribution of choice, Fedora, only delivers KDE 4.0.0 packages for the devel branch, and that is too risky for me atm. Also, as regular readers might have noticed already, I simply have no time at the moment for non-study-related things, I don’t even have the time to blog.

Anyway, KDE 4.0.0 is out now, but it is “just” the final climax of a process started years ago. So here is a short retrospect:

It all started long, long ago. It was in a time when the future of Windows was still called Longhorn; it was a time when Pluto was still a planet; it was a time when I still blogged in German - and for the KDE project it was a time of wild dreams and exciting phantasies:

i’d like kicker to look nicer in general. which is why in KDE4 it will receive a new theme engine

Erm…right, that was just a bit too early. But it shows where to look at: 2005. In these days first bits about the possible KDE future were mentioned in the public for the first time. Around summer things became concrete: Qt 4.0 was released and Plasma was introduced. Some weeks later KDE 4 was already a topic at the annual KDE Conferece: talks were given about Oxygen and Phonon (which was still namend KDEMM at that time).

During fall 2005 the main KDE topic was not KDE 4 but KDE 3.5, which was released at the end of November. But in the background the developers continued their work on porting to Qt4 as well as designing concepts and libraries.

2006 Was the year of the basis: the new foundations for the future KDE found their way into live and were shaped up to become usable for developers. Solid and Decibel were introduced, KDEMM was renamed to Phonon and the first specialiced meeting, the KDE Multimedia Meeting took place. The KDE Four Core meetings followed shortly after, and in the middle of 2006 the kdelibs were finally in a state so that they were merged into the regular directory structure instead of being published as snapshots. And if that wouldn’t be enough the developers got rollicking and released a first pre-Alpha version, Krash.
During the second half of 2006 the KDE conference Akademy 2006 dominated the KDE land. Of course KDE 4 was the major topic (available as slides and videos) and numerous talks were about the new APIs and libraries.
At the end of 2006 the basic foundations for KDE 4 were laid, and it was clear what KDE 4 would leave behind.

The beginning of 2007 brought a pleasant surprise for most users: Troy Unrau started his famous “Road to KDE 4″ series and kept everyone informed about the development around KDE 4. This was one of the most important KDE 4 related PR moves and showed everyone how much development was going on and what really could be expected. This series was great. And indeed, the year 2007 was the year of polishing, shaping up - and showing! 2007 was the year of the screenshots, screencasts and reviews. But of course it was alos the year of Alphas, Betas, cooperation with Trolltech and another conference. 2007 was the year which prepared the world for the launch.

And the launch just happend - the future is now.

Howto: Logitech QuickCam Pro 9000 with Fedora 8

Logitech QuickCam Pro 9000 with Fedora 8
This howto shows how to install the Logitech QuickCam Pro 9000 under Linux. While the howto is focussed on Fedora 8 it should work on all distributions.

I recently got the Logitech QuickCam Pro 9000. It is a higher class webcam with a 2MP sensor and a Carl Zeiss lens - and, according to Logitech’s Linux page it is supported by the uvcvideo driver.

Kernel module installation

The problem is however that the uvcvideo driver is not yet part of the mainline Linux kernel. I fyou plug in a uvcvideo device, the kernel cannot load the right driver:


Dec  7 02:14:06 machine kernel: usb 1-5: new high speed USB device using ehci_hcd and address 4
Dec  7 02:14:06 machine kernel: usb 1-5: configuration #1 chosen from 1 choice
Dec  7 02:14:06 machine kernel: Linux video capture interface: v2.00
Dec  7 02:14:07 machine kernel: usbcore: registered new interface driver snd-usb-audio

The kernel module must be compiled manually. The fastest way to do that is:


$ mkdir linux-uvc;cd linux-uvc; svn checkout http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk
A    trunk/uvc_ctrl.c
A    trunk/uvc_queue.c
A    trunk/uvc_video.c
A    trunk/uvc_v4l2.c
A    trunk/uvc_compat.h
A    trunk/uvc_driver.c
A    trunk/uvcvideo.h
A    trunk/Makefile
A    trunk/dynctrl.txt
Ausgecheckt, Revision 148.
$ cd trunk
$ make
Building USB Video Class driver...
make[1]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-i686'
  CC [M]  /home/liquidat/tmp/linux-uvc/trunk/uvc_driver.o
  CC [M]  /home/liquidat/tmp/linux-uvc/trunk/uvc_queue.o
  CC [M]  /home/liquidat/tmp/linux-uvc/trunk/uvc_v4l2.o
  CC [M]  /home/liquidat/tmp/linux-uvc/trunk/uvc_video.o
  CC [M]  /home/liquidat/tmp/linux-uvc/trunk/uvc_ctrl.o
  LD [M]  /home/liquidat/tmp/linux-uvc/trunk/uvcvideo.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/liquidat/tmp/linux-uvc/trunk/uvcvideo.mod.o
  LD [M]  /home/liquidat/tmp/linux-uvc/trunk/uvcvideo.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-i686'
$ cd ../..
$ su
Passwort:
# mv linux-uvc /opt
# cd /opt/linux-uvc/trunk
# make install
Installing USB Video Class driver…
make[1]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-i686'
  INSTALL /opt/linux-uvc/trunk/uvcvideo.ko
  DEPMOD  2.6.23.8-63.fc8
make[1]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-i686'
depmod -ae

Of course this requires installed kernel development packages and other general development packages (compiler, etc.). Also, on Ubuntu based distributions you want to enter sudo su instead of the plain su.

A working webcam

After all this is done, the webcam is detected properly:


Dec  7 02:26:19 machine kernel: usb 1-5: new high speed USB device using ehci_hcd and address 7
Dec  7 02:26:19 machine kernel: usb 1-5: configuration #1 chosen from 1 choice
Dec  7 02:26:19 machine kernel: uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
Dec  7 02:26:19 machine kernel: usbcore: registered new interface driver uvcvideo
Dec  7 02:26:19 machine kernel: USB Video Class driver (v0.1.0)

The next step is to test the webcam video input. The easiest way is to test this with an application which is known to work with Video4LinuxV2 (uvc mainly supports v4lv2 afaik). The best example is Kopete, which delivered acceptable results for me (although the colours are a bit mixed up):

Kopete showing the webcam input

Skype 2Beta also worked for me with a slightly better video quality, however the screenshot of the Sykpe interface with an embedded video showed just a blank image.

However, if you want to examine the features of your camera in combination with the uvcvideo driver in more detail you need to install luvcview. luvcview can list the possible frame rates and resolutions and also has a display where you can set saturation and similar values live.
In case of QuickCam Pro 9000 I was able to set the resolution to 960×720, and the quality was very good!

Closing words

While this howto explains how to get the uvcvideo driver up and running it does not cover all the fancy features many cameras today come with: additional speakers, microphone, auto-focus and whatnot.

But the main problem is anyway that the module has to be compiled manually. While it worked without any problems this is a task which certainly cannot be done by average computer users. Unfortunately I failed to find any further information why the uvcvideo driver is not part of the kernel yet. I would appreciate any comment which sheds more light on that topic.
It was often mentioned at the uvcvideo driver devel-list that the module will be merged “soon” into the mainline kernel, but that didn’t happen.
However, if the driver is merged at some day it will drastically improve the webcam experience of many Linux users out there since many webcams would be supported out of the box suddenly. I just hope that there are no licence problems keeping uvcvideo out of the kernel atm.

Thanks to Jun’s tech blog for some of the commands used in this howto.