Nerdddd….

(suena la voz de Fercha cargándome, podría haber salido el sábado a despejarme un poquito pero me quedé hackeando un driver)

And now for something completely the same… A couple of weeks ago I bought a cheap 8-channel usb audio card based on the CM6206 because the one in my notebook was roast (ar$ 190, including shipping to my home). As expected it worked right out of the box, there were some rough edges, like missing control names and the headphone jack was silent,  but as I was running a somewhat old kernel (2.6.29) I didn’t care.

On another box with a newer kernel, 2.6.32-something, it worked better; the headphone jack mirrored the front channel and also spdif was enabled. Even so, it was managed as a generic usb device (wich is great, it means no specialized drivers) but some useful features described in the datasheet were missing.

I decided to implement the easier ones first, mainly because even I hacked the kernel before this was my first time with alsa. With the datasheet in hand I coded a quick app with libusb to poke registers. After a couple of hours I had a userspace app to select the headphone source (it lets you choose wich channel the headphone jack mirrors). Then I got the latest stable kernel, 2.6.34 at that time, and jumped into the code. A week passed and I had it implemented as another control from alsa.

You are doing it wrong.

Feeling great I made a series of shiny patches to send upstream. Lurking thru alsa-dev I glanced other patches that affect the usb-audio portion and they looked… different. Cloned the main git repo and really, it was different. Back to square one, or two.

Spent yesterday’s night merging the old changes at the new tree and got a working driver again. A couple of hours ago sent the patch to alsa-dev. This time I avoided the gmail interface because it really likes to mangle inline patches and used kmail; the bastard trimmed also everything to 80 columns. Still nobody complained but lets see how it is teared down this monday.

Sources and documentation:

http://tangopardo.com.ar/pub/src/cm6206_utils-0.0.0.tar.bz2

CM6206 datasheet: http://tangopardo.com.ar/pub/docs/CM6206+datasheet+1.7.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.