15/02/2007 à 17h22 : My first contribution to the Linux kernel, step 1

I have been working for some time on the zr364xx project, which is a driver for the Linux kernel to bring support for some cameras in webcam mode.
These webcams send JPEG images to the computer via USB.
Until recently, my driver was only compatible with the V4L1 API, which does not support the JPEG format, so I had to include a JPEG decoder inside the driver.
I took the JPEG decoder from the bootsplash project, so I was able to decompress the JPEG data inside the kernel, and send uncompressed frames to the applications (RGB24).
This was a huge work to do inside the kernel, and the driver code was very big since it had to include a JPEG decoder just for it.
But at least it worked and with V4L1 API it was the only solution I found [1] ...
Now V4L1 is deprecated, and V4L2 has got JPEG support (it is the application job to decompress the frames).
So now I have a nicer driver, very small compared to the previous versions, and using a recent API.
Last week, someone from Suse [2] sent me an email to know if I tried to include my driver to the official kernel.
Of course I already thought about it before, but I did not even try since the driver was only V4L1 compatible and was including a JPEG decoder... I knew I had no chances...
But now, why not? And receiving this email from this Suse employee contributing to the LKML gave me more will to try the process.
So I started reading the HOWTOs on KernelNewbies and the documentation folder of the Linux kernel source code: respecting the kernel coding style, submitting drivers, submitting patches, etc.
Thanks the documentation is very complete and helpful.
So after some time trying to write the *perfect* email (you don't want to miss this one), I finally sent my first patch: http://thread.gmane.org/gmane.linux.usb.devel/50772
I already had some useful feedbacks, so I started working on another version of my patch, I will do other posts on my blog to keep you updated :)
It is just strange to have a response from Alan and others in your thread!

[1] If you want to have a look at the history of this driver, you can take a look here.
[2] I am not sure if he would be happy to have his name on my blog ;) Thanks to him for providing me some good advices too.
[3] Sorry for my French readers, I prefer to do this sequence of messages in English, maybe it will help others kernel newbies?


Pseudo :
Site : (facultatif)
Email : (facultatif, pour votre avatar)
Message :
(pas de HTML)
: (recopiez le texte)
Se souvenir de mes informations

Royale [ 19/02 - 01:45 ] : Next step is available here: http://royale.zerezo.com/blog/337-my-first-contribution-to-the-linux-kernel-step-2.html

Nono [ 16/02 - 09:45 ] : Cool, Royale t'es maintenant un "Kernel Hacker". la classe :D

NoMan [ 15/02 - 23:03 ] : Yep ça c vraiment chouette ;-) Félicitations !

Royale [ 15/02 - 20:58 ] : Hey, je sens qu'on se moque de moi là :p

Linus [ 15/02 - 20:35 ] : Oh My God ! This is the nicest kernel driver I've ever seen in my life !

huats [ 15/02 - 18:23 ] : Classe...