Skip to main content

Line6 PodXT Linux Driver 0.7.2 is incompatible with kernel >= 2.6.22

I have updated my Ubuntu Feisty to Gutsy some weeks ago because of a problem booting up from raid. Upgrade solved the issue but brought some others. One of the most serious to me was that the Linux Line6 PodXt driver
could not be compiled anymore. The error I got was:

make default

make -C /lib/modules/2.6.22-12-generic/build
SUBDIRS=/home/user1/workspace/line6usb-0.7.2 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-12-generic'
CC [M] /home/user1/workspace/line6usb-0.7.2/pcm.o
/home/user1/workspace/line6usb-0.7.2/pcm.c: In function
‘snd_pod_trigger’:
/home/user1/workspace/line6usb-0.7.2/pcm.c:40: warning: implicit
declaration of function ‘snd_pcm_group_for_each’
/home/user1/workspace/line6usb-0.7.2/pcm.c:40: error: expected ‘;’
before ‘{’ token
/home/user1/workspace/line6usb-0.7.2/pcm.c:33: warning: unused variable
‘err’
/home/user1/workspace/line6usb-0.7.2/pcm.c:32: warning: unused variable
‘s’
make[2]: *** [/home/user1/workspace/line6usb-0.7.2/pcm.o] Error 1
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-12-generic'
make[1]: *** [_module_/home/user1/workspace/line6usb-0.7.2] Error 2
make: *** [default] Error 2

So I investigated this a bit and found that some macro calls were obsoleted which is why pcm.c can not be compiled on 2.6.22 - actually neither on 2.6.21 and 2.6.20 is the latest working.
Fortunately this was very easy to correct this error. OK first I had to check kernel changelog and also Linux Cross Reference helped me a lot.
So here is the required modification in pcm.c of the driver to be able to compile the source again.

/* trigger callback */
int snd_pod_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_pod_pcm *chip = snd_pcm_substream_chip(substream);
struct list_head *pos;
struct snd_pcm_substream *s;
int err;
unsigned long flags;

printk(KERN_INFO "*** Entering snd_pod_trigger\n");
spin_lock_irqsave(&chip->lock_trigger, flags);
clear_bit(BIT_PREPARED, &chip->flags);

//snd_pcm_group_for_each(pos, substream) {
list_for_each(pos,&substream->group->substreams) {
//s = snd_pcm_group_substream_entry(pos);
s = list_entry(pos,struct snd_pcm_substream,link_list);

switch(s->stream) {
case SNDRV_PCM_STREAM_PLAYBACK:

Just change the lines so old ones are commented out and below are the new ones:

//snd_pcm_group_for_each(pos, substream) {
list_for_each(pos,&substream->group->substreams) {
//s = snd_pcm_group_substream_entry(pos);
s = list_entry(pos,struct snd_pcm_substream,link_list);


As soon as I have a bit more free time I will make a patch - a diff - to apply.

This error was reported via sourceforge and I am pretty sure we can see a corrected version soon officially from Marcus Grabner. But till then you can do it on your own easily.

P.S. : I would like to say thanks to Marcus Grabner for the driver.

[Update] The patch can be downloaded from here or from here. First save it into your home directory. Download the driver also into your home than execute the following commands (I suppose that line6usb-0.7.2.tar.bz2 and line6usb-0.7.2_patch.diff are saved into your home) :
$ cd ~
$ bzip2 -dc line6usb-0.7.2.tar.bz2 | tar xfv -
$ cd ~/line
6usb-0.7.2
$ patch -p1 <~/line6usb-0.7.2_patch.diff That is all. Hope it works.

Comments

Popular posts from this blog

Insufficient Disk Space reported under wine

Did you try to install/setup any Windows Application - actually a Game what else could be necessary - and got a message that you do not have enough free space on your drive meanwhile you had lot of free space on the chosen mounted partition? You will learn the problem and hopefully the solution too. (Of course I suppose it is not the real situation you have no enough space. If so do not read ahead.) The problem is that wine does not check the amount of free space on the mounted partition corresponds to the selected directory but reports the free on the root of the directory the partition mounted to . ;( Probably it is not clean so here is an example: Let say you have / only and something is mounted as /mnt/part1 If you directly select /mnt/part1 during installation wine will check free space in fact on / and does not calculate free on the partition mounted under /mnt/part1. How to solve it you may ask? It is easy. Start winecfg and create a new drive with the directory you want to use.

Ansible: Using multiple tags and untagged tag together

I have lots of Ansible playbooks with many roles in each. However when you are installing different minor version of the same software stack, there are only minor differences between the steps. In this case it does not make much sense to "copy paste" the whole role so I just wanted to use tags. I wanted to use untagged tasks as common tasks and tagged tasks for version specific tasks. To make it clear here is an example. If you have a long os related role which does ssh config, web config, database install and creation and many more but sometimes you need java-6 or java-7 it is easy to add task and tag those according to this. Than my theory was that I can run ansible-playbook --tags=untagged,java6 to install the stack with java6 and ansible-playbook --tags=untagged,java7 to install same stack with java7. However this does not work. I have checked the Ansible source code and found why it is not working. Since I was not sure if this is a bug or by design I have opened a

Python Azure ML SDK issue on Ubuntu 22.04

It has been quite a while since I posted last time. Why? Because simply I did not run into any issue worth to share. But now! I did.  Recently we are doing some Machine Learning on Azure using Azure Machine Learning Python SDK. No problem you might think. Well. As it turned out Ubuntu 22.04 is not supported. And this is clearly said in a message. Which is in fact a lie. The Error message: NotImplementedError: Linux distribution ubuntu 22.04 does not have automatic support. Missing packages: {'liblttng-ust.so.0'} .NET Core 3.1 can still be used via `dotnetcore2` if the required dependencies are installed. Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions. Follow your distro specific instructions to install `dotnet-runtime-*` and replace `*` with `3.1.23`. Ok but what is this? And why? So as the error mentions dotnetcore2==3.1.23 Python package uses .NET Core 3.1 but Ubuntu 22.04 has only dotnet6 packages. And also Micro