anybody tried usb interface with linux yet?

Ingo

Inspired
Hi there,

my Axe-Fx II is finally ready for shipping! Unfortunately, I still haven't seen any reports of using the USB interface with linux (i.e.: sending the soft firmware to the Axe-Fx II, per udev rule or even manually, and then being able to use all audio and Midi connections).

Here are some technical facts, but has anybody really tried it?
http://forum.fractalaudio.com/axe-edit-software-editor/37984-axe-fx-ii-linux.html

Alternatively (though far less likely), has anybody managed to get the windows driver working with Wine?

I would be really grateful for any more recent information---I kind of depend on it, because at the moment, I travel a lot and have only limited possibilities to take gear with me. An official confirmation would be even better, of course!

Thanks, and regards,
Ingo
 
I'm also expecting my Axe-FX II soon. A lot to do at work ATM but will have a look into using the USB interface with Linux ASAP.
 
I'm interested as well- don't have an Axe 2 yet, but will be experimenting with axe-edit and wine when I get one...
 
FWIW, I have AxeEdit USB working on Ubuntu in a Virtualbox WinXP guest. There is a wrinkle though - when saving a patch back to the hardware, the MIDI transfer pauses for a few seconds just before it completes. It flys thru maybe 90% of the transfer, then hangs - only for a few seconds. Then completes normally. As a result I have not tried using the audio interface functionality. I figure it just won't work.
 
So I received my Axe-Fx II last week and wrote a little bash script to setup a Linux system to recognize the Axe-Fx II each time it is connected to a USB port and then upload the USB firmware (this is not the Axe-Fx II firmware you can download from Fractals support page but a dedicated bootloader).

This is done by a udev rule running fxload which does the upload. The script creates the udev rule and copies the USB firmware file to an approriate location on Linux systems. The script features as well an uninstall function.

After executing the script and then switching on or rebooting the connected Axe-Fx II lsusb will report a new USB device with VID 2466 for Fractal Audio Systems and PID 8003 for the Axe-Fx II. If you like to have a named output you can add adequate entries to the file called usb.ids which is usually located under /usr/share.

It is important to know that all this only prepares the USB interface of the Axe-Fx II to be recognized as a generic USB audio device. It depends on the Linux sound system if the audio and MIDI interface are initialized correctly. On my Linux system (openSUSE 11.4, 64bit, with ALSA and PulseAudio) the Axe-Fx II currently works as a MIDI interface only whereas the audio part fails with these messages:

ALSA format.c:287: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 40)
ALSA format.c:287: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)

Regarding to an information I got from Fractal this could be, because the USB firmware does not support the GetSampleFrequencyRange request.

Up to now I did not have the time to investigate if there is a chance to create a dedicated configuration for the Axe-Fx II to work around. Any suggestions are much appreciated.


P.S. I would like to attach a ZIP file containing the script and some files associated with it but saw that these file types are not allowed.

Here you can download the mentioned ZIP file: https://smartdrive.web.de/qxclient/?path=Axe-Fx%20II%20von%20jem_7&token=3B284CF5E424BCE8&mandant=03&locale=de_DE&viewType=0&lang=de&username=@nonymous&incarnation=web_de

Password: linuxsetup
 
Last edited:
Awesome man! :) this really excites me LOL

What will you be using to record tho? There are not that many Linux based DAWs out there :(
 
Since the Axe-Fx II is a USB audio device it is handled by the snd-usb-audio module. But as described in the post above the audio interface does not get initialized correctly. During the last days I tried to work around this issue.

I saw that there is a file on Linux systems called quirks-table.h. This file contains code for special handling of usb audio devices which (partially) do not work out of the box with the snd-usb-audio module. So I thought about making an appropriate quirk for the Axe-Fx II. I examined the output of lsusb -v regarding the Axe-Fx II and added the following lines to the file quirks-table.h:

Code:
/*
 * Fractal Audio Systems devices
 */
{
	USB_DEVICE(0x2466, 0x8003),
	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
		.vendor_name = "Fractal Audio Systems",
		.product_name = "AXE-FX II",
		.ifnum = QUIRK_ANY_INTERFACE,
		.type = QUIRK_COMPOSITE,
		.data = & (const struct snd_usb_audio_quirk[]) {
			{
				.ifnum = 0,
				.type = QUIRK_AUDIO_STANDARD_INTERFACE
			},
			{
				.ifnum = 1,
				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
				.data = & (const struct audioformat) {
					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
					.channels = 2,
					.iface = 1,
					.altsetting = 1,
					.altset_idx = 1,
					.attributes = 0,
					.endpoint = 0x02,
					.ep_attr = 0x05,
					.maxpacksize = 0x002a,
					.rates = SNDRV_PCM_RATE_48000,
					.rate_min = 48000,
					.rate_max = 48000,
					.nr_rates = 1,
					.rate_table = (unsigned int[]) {
						48000
					}
				}
			},
			{
				.ifnum = 2,
				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
				.data = & (const struct audioformat) {
					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
					.channels = 4,
					.iface = 2,
					.altsetting = 1,
					.altset_idx = 1,
					.attributes = 0,
					.endpoint = 0x86,
					.ep_attr = 0x05,
					.maxpacksize = 0x0054,
					.rates = SNDRV_PCM_RATE_48000,
					.rate_min = 48000,
					.rate_max = 48000,
					.nr_rates = 1,
					.rate_table = (unsigned int[]) {
						48000
					}
				}
			},
			{
				.ifnum = 3,
				.type = QUIRK_MIDI_STANDARD_INTERFACE
			},
			{
				.ifnum = -1
			}
		}
	}
},

After that I removed the snd-usb-audio module with rmmod from the kernel, (re)compiled the module and added it back to the kernel with modprobe - sadly to no avail.

If anyone has experience with this please chime in. Any help is much appreciated.

EDIT: code above was updated, see post #13
 
Last edited:
A big "Thank You" for your work, volt!

Tested AxeEdit, which works smoothly. I will have a closer look at the audio functionality soon, but have no experience on that level yet.
 
A little progress has been made so I want to report on my latest findings. Those are basically limited to the functionality of quirks in the file quirks-table.h:

At first I changed the content of ".product_name" to "AXE-FX II" because the output of cat /proc/asound/cards shows "AXE-FX II", too, and Linux is case sensitive...

Furthermore I found out that the quirk doesn't get recognized with the beginning "USB_DEVICE_VENDOR_SPEC(0x2466, 0x8003)" but with "USB_DEVICE(0x2466, 0x8003)".

In addition it seems that every single interface has to be handled by the quirk, not only the Audio In and Audio Out as I did first. Otherwise the quirk crashes with "BUG: unable to handle kernel NULL pointer dereference at ..."

The configuration descriptor shown by lsusb -v displays a number of four interfaces: Audio Control (.ifum=0), Audio Out (.ifum=1), Audio In (.ifum=2) and MIDI (.ifum=3). As the Audio Control and MIDI interface would also work without a quirk I added them as "QUIRK_AUDIO_STANDARD_INTERFACE" respectively as "QUIRK_MIDI_STANDARD_INTERFACE" which actually don't modify the handling of these interfaces.

I also corrected the endpoint address of the Audio Out interface to "0x02".

The last version of the quirk has been put into the code section of post #11. As long as the lines regarding the entries ".type" and ".data" below ".ifnum = 1," and ".ifnum = 2," are commented out the quirk shows no error. Unfortunately if these lines are not commented out the quirk still does not work due to the configuration of the Audio Out and Audio In interfaces.
 
Last edited:
Hi volt,

The last version of the quirk has been put into the code section of post #11. As long as the lines regarding the entries ".type" and ".data" below ".ifnum = 1," and ".ifnum = 2," are commented out the quirk shows no error. Unfortunately if these lines are not commented out the quirk still does not work due to the configuration of the Audio Out and Audio In interfaces.

What exactly do you mean by the last sentence? I take it the module compiles and can be loaded without any complaints. Am I correct what you are saying is that it does not help with the audio interface part working?

I hope to be able to work on this over the weekend, but I am already trying to follow closely at this point.
 
Could not help but browsing through the standard quirks-table.h (online)... Just a hunch without any deeper understanding: Could it be that for interface 0 we need

.type = QUIRK_AUDIO_STANDARD_MIXER

instead, as found in the quirk for the M-Audio Fast Track Ultra interface? At least that seems reasonable at first sight. Gotta stop now, but I will set up everything for compiling the stuff myself, probably Friday night.. ;)
 
Hi volt,



What exactly do you mean by the last sentence? I take it the module compiles and can be loaded without any complaints. Am I correct what you are saying is that it does not help with the audio interface part working?

I hope to be able to work on this over the weekend, but I am already trying to follow closely at this point.

Sorry for not being clear. What I tried to say was that the lines which should do the configuration of the audio interfaces prevent the quirk to work. At least on my system I get "BUG: unable to handle kernel NULL pointer dereference at 0000000000000028" every time when the Axe-Fx II is connected.
 
Hi Ingo,

I looked for the QUIRK_AUDIO_STANDARD_MIXER but did not found it on my system. It emerged that my kernel sources (openSUSE 11.4, Kernel 2.6.37.6-0.9) were too old. So I started openSUSE 12.1 from a live CD with kernel 3.1.0 and recompiled the modified quirks-table.h with .type = QUIRK_AUDIO_STANDARD_MIXER for interface 0. I had no time for further testing but after adding the new snd-usb-audio.ko to the kernel a playback and a capture device for the Axe-Fx II showed up, too (besides control and MIDI). :D
 
Last edited:
YAY!

That sounds very promising. Indeed, my kernel is the 3.0 series, and that's the source code I looked up online. Looking forward to the weekend and doing this myself :) Thanks again for all your efforts.
 
Ok, that was too optimistic. I also got the module to compile and the interfaces are recognized accordingly. However, neither direct ALSA access or using PulseAudio or JACK (which work on top of ALSA) worked. Basically the problem was that ALSA could not set the hardware parameters.

The greatest thing would be if FractalAudio helped us linux guys/gals out. I suspect (by analogy with other situations) the "problem" is that Windows and Mac OS are fairly lenient when it comes to what constitutes a "class-compliant" USB audio interface, and that linux is usually very strict in these matters. Since some of the features it tries to use are not implemented by the soft firmware, using the interface fails.
 
Back
Top Bottom