[-]

Kinect linux kernel driver

It looks like Santa came early this year.

KernelLabs sponsored me for a Kinect sensor device unit so I can experiment writing a Linux kernel driver for it.

So in the next weeks I'll be working on a gspca driver for this device. For now the code is going to be hosted in the gspca_kinect repository, as an out of kernel module, this will ease compile/test cycle; if it comes out that changes are needed to gspca itself, then I'll decide whether hosting these changes as patches, or switching to a kernel clone repository; suggestions will be welcome. The driver is working already, but currently you can just use the sensor as a normal WebCam.


[-]

Write a wav header, in C and python

I had this raw audio stream in a file, with no header, just the encoded data, but I knew the data properties from somewhere else than the file; in order to make any media player to recognize and play the audio data I decided to rebuild a WAV header for it, that worked fine, even for a compressed audio format.


[-]

Bug hunting in Linux kernel land: an unpretentious primer

Lately I've been fixing some defects in the hidraw interface in the Linux kernel (commits d20d5ff and e42dee9), simple issues like these NULL pointer dereference are a good example to show how to analyze a Linux bug trace in order to spot the defective code. So let's take a look.


[-]

drush grep, search raw content in drupal with regular expressions

I was looking for a way to search raw content (before input filters are applied) in my Drupal blog using regular expressions, à la grep; I googled to see what other people had come up with to solve the same problem and I found an article about Searching the Drupal Database by Regular Expression, which pointed also to the scanner module, however those solutions have both some limitations: ad-hoc Drupal scripting, only MySQL supported, and I didn't want to have a module installed for that anyways; so I tried the Drush way and I found it the most convenient one.


[-]

List header files first in a patch with git

When submitting a patch for review we want our readers/reviewers to be able to read it as easily as possible, and when you make changes to code involving some definitions in a header file you definitely want header files to be listed first in the patch, so that the reader can follow the changes to the code logic knowing already the new definitions.

Changing the order of files in a patch can be done very easily using the -Oorderfile option offered by some git commands.


[-]

AO2 runs into autorun.inf

Some days ago I bought this USB Hard Drive and when I first plugged it in, the mounted filesystem showed up in the File Manager with a custom icon, so I thought I could use my own custom icon instead and it turned out to be quite easy.

Custom icon for a USB drive on GNOME
Custom icon for a USB drive in the Nautilus file manager

[-]

User-aware scheduling

Recently both OSnews and Slashdot pointed out some experiments about context-aware UIs done by Christian Giordano at Canonical (the company behind Ubuntu GNU/Linux), and the first results are somewhat interesting. As you can see in the good video demo from the original article the effects are nothing mind blowing, but they serve greatly to illustrate the concept, and by building on that something more useful would come out eventually.

That reminds me of another (never realized) old idea of mine from when I was attending the Operating System course at the university, I wanted to bind system responsiveness —at a lower level— to user presence, by tuning scheduler parameters according to the user being at his/her computer or not.


[-]

Misc Links of August 2010

I am cleaning up the bookmarks in the web browser and reading some things I had on hold since quite some time, here are some links I'd like to propose you:


[-]

Supercool Linux

We all know linux is cool, don't we?

SuperFreddo plastic bag
SuperFreddo plastic bag - detail