Line6 POD X3 linux driver (2016)

A few years ago I bought a guitar effect, USB-sound-card like device - thinking the support for it will be easy to do in linux... Long story short - it wasn't.

So I had to start the usual way - gathering USB binary transfer logs, and trying to make sense of it. Normally this part would be reasonably complicated, but:

  • you have to have a hardware with non-broken USB ports (unlike the HP notebook I had at the time - it just refused to talk to some devices via some USB ports, and/or reset them at random)
  • you cannot do this via VirtualBox, because the USB 2.0 implementation drops some data and/or adds latencies due to which the Windows device driver refuses to work. Also it couldn't handle isochronous stuff, so no audio.

After a few years of hiding the device under a rag, I finally found some time (let's call it a few days :) ) to dive into this - and reverse engineered the binary protocol to configure the device. That was the easy part.

However, it turned out that doing USB audio I/O from userspace (isochronous transfers via libusb) is not that easy - and what was worse, the device has a quirk which requires also bulk I/O to work simultaneously. But sending garbage to the device made noise in the headphones - so that was good news.

The only thing that could be done was diving deep, approximately like this:

  1. Figure out the audio format used by the device - turned out the same format (S24_3LE) as podhd-driver-supported devices was used, yay!
  2. ...except for there was a different number of channels
  3. ...and hi-speed USB wasn't really supported in the driver
  4. ...and the device requires initialization that the other devices don't
  5. ...and there were a few bugs in the original driver :-)
  6. A proof-of-concept driver hacked together, able to playback some audio
  7. Audio recording hacked in too
  8. A few months of reworking the patches to be upstream-worthy (using the right interfaces, rebasing to have a sane patch-order)
  9. Sent & accepted upstream (eventually, after a few more iterations :) )

Kernel 4.9 contains the updated podhd driver, supporting POD X3. Now let's sit and wait how many regressions there will be :-)

The audio works now, but the device configuration is not yet done - it should be quite easy, only someone needs to find the will to prepare the utilities. The basic binary message parser (Bulk USB transfers) is available at github.