M-Audio FastTrack Ultra and Jack/ALSA

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

User avatar
raboof
Established Member
Posts: 1726
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by raboof »

dArAzAc wrote:Hmm, so ALSA is at least recognizing both cards?
Looks to me like ALSA is recognising the card, and for example recognises some midi capability there, but fails to recognise the PCM (audio) functionality.

As for how to fix that, i'm going to have to refer you to the alsa folks again :).

dArAzAc
Established Member
Posts: 43
Joined: Sat Jun 27, 2009 7:14 am
Location: Atlanta, Ga
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by dArAzAc »

Alright, thanks for all of your (and everyone elses) help, I'll be sure to upload a How-To to the Wiki once I get the issue resolved.
Listen to my audio!@http://dArAzAc.bandcamp.com
Current Rig: Dell Vostro 1520, Arch Linux, Novation Remote25SL, and my trusty guitar.
<3 ZynAddSubFX

dArAzAc
Established Member
Posts: 43
Joined: Sat Jun 27, 2009 7:14 am
Location: Atlanta, Ga
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by dArAzAc »

Is there a better way of requesting support from ALSA other than IRC?
Listen to my audio!@http://dArAzAc.bandcamp.com
Current Rig: Dell Vostro 1520, Arch Linux, Novation Remote25SL, and my trusty guitar.
<3 ZynAddSubFX

User avatar
raboof
Established Member
Posts: 1726
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by raboof »

dArAzAc wrote:Is there a better way of requesting support from ALSA other than IRC?
http://www.alsa-project.org/main/index. ... eforge.net ?

dArAzAc
Established Member
Posts: 43
Joined: Sat Jun 27, 2009 7:14 am
Location: Atlanta, Ga
Contact:

For those who are interested--

Post by dArAzAc »

Here's the solution that I ended up getting from the good people at ALSA, I've got quite a journey ahead of me...

Code: Select all

The MIDI interface is class compliant, and this is what's shown by Jack.
The audio interfaces are marked as vendor specific, so the driver needs
to be changed to support them.

Please try recompiling your kernel with the patch below.

Some M-Audio devices use big-endian samples, so beware of speaker-
killing noise.

It's possible that playback synchronization doesn't work completely.

Please check what happens when you try to play and record with different
sample rates.


HTH
Clemens

--- linux/sound/usb/usbaudio.c
+++ linux/sound/usb/usbaudio.c
@@ -2235,6 +2235,10 @@ static void init_substream(struct snd_us
                case USB_ID(0x041e, 0x3f0a): /* E-Mu Tracker Pre */
                        subs->ops.retire_sync = retire_playback_sync_urb_hs_emu;
                        break;
+               case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+                       subs->ops.prepare_sync = prepare_playback_sync_urb;
+                       subs->ops.retire_sync = retire_playback_sync_urb;
+                       break;
                }
        }
        snd_pcm_set_ops(as->pcm, stream,
@@ -2786,6 +2790,7 @@ static int parse_audio_endpoints(struct 
                        break;
                case USB_ID(0x041e, 0x3020): /* Creative SB Audigy 2 NX */
                case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
+               case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
                        /* doesn't set the sample rate attribute, but supports it */
                        fp->attributes |= EP_CS_ATTR_SAMPLE_RATE;
                        break;
--- linux/sound/usb/usbquirks.h
+++ linux/sound/usb/usbquirks.h
@@ -1864,6 +1864,33 @@
                }
        }
 },
+{
+       USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               /* .vendor_name = "M-Audio", */
+               /* .product_name = "Fast Track Ultra", */
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_COMPOSITE,
+               .data = & (const struct snd_usb_audio_quirk[]) {
+                       {
+                               .ifnum = 0,
+                               .type = QUIRK_IGNORE_INTERFACE
+                       },
+                       {
+                               .ifnum = 1,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       {
+                               .ifnum = 2,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       /* interface 3 (MIDI) is standard compliant */
+                       {
+                               .ifnum = -1
+                       }
+               }
+       }
+},
 
 /* Casio devices */
 {
Listen to my audio!@http://dArAzAc.bandcamp.com
Current Rig: Dell Vostro 1520, Arch Linux, Novation Remote25SL, and my trusty guitar.
<3 ZynAddSubFX

_pedro_
Posts: 2
Joined: Wed Aug 26, 2009 8:50 pm
Location: Prague, CZ
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by _pedro_ »

Excellent! Thank you, dArAzAc. My FT Ultra 8R now works. And what about the internal monitoring mixes ? I thing, default setting of the internal mixers is 1:1 - signal from input 1 is sent to output 1 etc. I w'd like to mute all internal routes (if i can't control them). But, near zero latency is important for musicians ...

I`m running Ardour and Jack with --hwmon parameter, but i see nothing to control the internal paths.

dArAzAc
Established Member
Posts: 43
Joined: Sat Jun 27, 2009 7:14 am
Location: Atlanta, Ga
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by dArAzAc »

Very interesting, I can't help you ATM since I've yet to recompile my kernel with the code -- I'm away at college, I've only one computer and Arch seems to be running flawlessly, I'd be screwed if I messed up my system right now. But keep us informed! :D
Listen to my audio!@http://dArAzAc.bandcamp.com
Current Rig: Dell Vostro 1520, Arch Linux, Novation Remote25SL, and my trusty guitar.
<3 ZynAddSubFX

guillermo machado
Posts: 2
Joined: Sat Nov 14, 2009 12:08 am

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by guillermo machado »

I followed this guide

http://www.joegiampaoli.com/blog/?p=462

with this patch..... but it didnt worked :(

I got this mesage:

patching file sound/usb/usbaudio.c
Hunk #1 FAILED at 2235.
Hunk #2 FAILED at 2790.
2 out of 2 hunks FAILED -- saving rejects to file sound/usb/usbaudio.c.rej
patching file sound/usb/usbquirks.h
patch: **** malformed patch at line 28: },

can you explain how to patch and compile the kernel to able the fast-Track Ultra?

Thanks

dArAzAc
Established Member
Posts: 43
Joined: Sat Jun 27, 2009 7:14 am
Location: Atlanta, Ga
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by dArAzAc »

Gah, I recently attempted the guide above (which is really well put together and easy to follow), but when I compile my kernel, I don't end up with a .deb file. :x

Kernel compilation is so far beyond me. :(
Listen to my audio!@http://dArAzAc.bandcamp.com
Current Rig: Dell Vostro 1520, Arch Linux, Novation Remote25SL, and my trusty guitar.
<3 ZynAddSubFX

User avatar
raboof
Established Member
Posts: 1726
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by raboof »

Isn't that patch for the FastTrack Pro, not the Ultra?

Looking at the patch, looks like it only has any effect when the connected device is 0763:2012 - looks like neither the pro nor the ultra are listed at http://www.qbik.ch/usb/devices/ though.

guillermo machado
Posts: 2
Joined: Sat Nov 14, 2009 12:08 am

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by guillermo machado »

raboof wrote:
Isn't that patch for the FastTrack Pro, not the Ultra?
Yes, this guide is for FastTrack Pro, but I used it to try to compile a kernel but using the Fast Track Ultra Patch that "_pedro_ " used. He said his FT 8r is now working.

salvoinzk
Established Member
Posts: 5
Joined: Mon Jan 11, 2010 6:31 pm
Location: Italy
Contact:

Re:For those who are interested- M-Audio FastTrackUltra and

Post by salvoinzk »

dArAzAc wrote:Here's the solution that I ended up getting from the good people at ALSA, I've got quite a journey ahead of me...

Code: Select all

The MIDI interface is class compliant, and this is what's shown by Jack.
The audio interfaces are marked as vendor specific, so the driver needs
to be changed to support them.

Please try recompiling your kernel with the patch below.

Some M-Audio devices use big-endian samples, so beware of speaker-
killing noise.

It's possible that playback synchronization doesn't work completely.

Please check what happens when you try to play and record with different
sample rates.


HTH
Clemens

--- linux/sound/usb/usbaudio.c
+++ linux/sound/usb/usbaudio.c
@@ -2235,6 +2235,10 @@ static void init_substream(struct snd_us
                case USB_ID(0x041e, 0x3f0a): /* E-Mu Tracker Pre */
                        subs->ops.retire_sync = retire_playback_sync_urb_hs_emu;
                        break;
+               case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
+                       subs->ops.prepare_sync = prepare_playback_sync_urb;
+                       subs->ops.retire_sync = retire_playback_sync_urb;
+                       break;
                }
        }
        snd_pcm_set_ops(as->pcm, stream,
@@ -2786,6 +2790,7 @@ static int parse_audio_endpoints(struct 
                        break;
                case USB_ID(0x041e, 0x3020): /* Creative SB Audigy 2 NX */
                case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
+               case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */
                        /* doesn't set the sample rate attribute, but supports it */
                        fp->attributes |= EP_CS_ATTR_SAMPLE_RATE;
                        break;
--- linux/sound/usb/usbquirks.h
+++ linux/sound/usb/usbquirks.h
@@ -1864,6 +1864,33 @@
                }
        }
 },
+{
+       USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               /* .vendor_name = "M-Audio", */
+               /* .product_name = "Fast Track Ultra", */
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_COMPOSITE,
+               .data = & (const struct snd_usb_audio_quirk[]) {
+                       {
+                               .ifnum = 0,
+                               .type = QUIRK_IGNORE_INTERFACE
+                       },
+                       {
+                               .ifnum = 1,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       {
+                               .ifnum = 2,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       /* interface 3 (MIDI) is standard compliant */
+                       {
+                               .ifnum = -1
+                       }
+               }
+       }
+},
 
 /* Casio devices */
 {
Great job dArAzAc !

But, is there the possibility of getting the driver already patched, because I'm not able to recompile the kernel? To be honest I had 2 not good experiences time ago, about recompiling!

For sure if the ALSA guys could give us the sound-driver already patched, it would be much better!

Greetings to all
Salvo
Last edited by salvoinzk on Wed Jan 13, 2010 8:57 pm, edited 1 time in total.

salvoinzk
Established Member
Posts: 5
Joined: Mon Jan 11, 2010 6:31 pm
Location: Italy
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by salvoinzk »

guillermo machado wrote:I followed this guide

http://www.joegiampaoli.com/blog/?p=462

with this patch..... but it didnt worked :(

I got this mesage:

patching file sound/usb/usbaudio.c
Hunk #1 FAILED at 2235.
Hunk #2 FAILED at 2790.
2 out of 2 hunks FAILED -- saving rejects to file sound/usb/usbaudio.c.rej
patching file sound/usb/usbquirks.h
patch: **** malformed patch at line 28: },

can you explain how to patch and compile the kernel to able the fast-Track Ultra?

Thanks

Yes me too,

When I have tried to patch the ALSA driver, (for working the FT Ultra ..... I know not Pro) I have got the same error

I did not followed the "joegiampaoli tutorial".


It should be enough download the last stable release of alsa driver from here:

http://www.alsa-project.org/main/index.php/Download

now it is : alsa-driver-1.0.22.1.tar.bz2

then patch it,
and then compile only the driver, not the whole kernel.

But as I said before I got the error on the patch step...

So helps are very welcome!!!

Well, the way seems the following: only apply the patch to the ALSA driver and then compile it (not the whole kernel only the driver!).


ps: here is a tutorial for upgrading (/compiling) the ALSA driver (remember, do it after paching the driver!):
http://monespaceperso.org/blog-en/2009/ ... oala-9-10/

and here, too:
https://help.ubuntu.com/community/HdaIntelSoundHowto


hope this help!
Last edited by salvoinzk on Wed Jan 13, 2010 8:59 pm, edited 4 times in total.

salvoinzk
Established Member
Posts: 5
Joined: Mon Jan 11, 2010 6:31 pm
Location: Italy
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by salvoinzk »

dArAzAc wrote:Gah, I recently attempted the guide above (which is really well put together and easy to follow), but when I compile my kernel, I don't end up with a .deb file. :x

Kernel compilation is so far beyond me. :(

Try to download the ALSA driver from here:

http://www.alsa-project.org/main/index.php/Download

(the following files : alsa-driver-1.0.22.1.tar.bz2 ; alsa-lib-1.0.22 ; alsa-utils-1.0.22 should be enough)


unpackage the zipped files in /usr/src/ should be good
then apply the patch to "usbaudio.c" and "usbquirks.h" files inside /alsa-driver-1.0.22.1/sound/usb folder.

And then try to compile the sound-driver only (not the whole kernel)

I found a totorial for compiling the alsa driver here:

http://forum.masterdrive.it/blogs/maste ... driver-55/

It's in italian language but if you need I can translate it.

I'll be honest I failed trying to patching the driver ..... so good luck!


ps: here is a tutorial, in english language, for upgrading (/compiling) the ALSA driver (remember, do it after paching the driver!):
http://monespaceperso.org/blog-en/2009/ ... oala-9-10/

and here, too:
https://help.ubuntu.com/community/HdaIntelSoundHowto


hope this help!

salvoinzk
Established Member
Posts: 5
Joined: Mon Jan 11, 2010 6:31 pm
Location: Italy
Contact:

Re: M-Audio FastTrack Ultra and Jack/ALSA

Post by salvoinzk »

Hi guys

I have patched the ALSA driver for the Fast Track Ultra support, (I hope, I did it right, but I think so), It's too big for attaching it here in this post, it is 4,0MiB, while maximum size allowed is256 KiB .
So let me know, if someone want it I can sent it in some way.
(but only alsa-driver, the other files: alsa-lib and alsa-utils, please download from ALSA web-page : http://www.alsa-project.org/main/index.php/Download )

Then you have only to compile it, by following this short tutorial taken at the ubuntu official site:

https://help.ubuntu.com/community/HdaIntelSoundHowto

* Install the required tools and kernelheaders

# sudo aptitude install build-essential libncurses-dev gettext xmlto xmltoman linux-headers-`uname -r`

* Install your kernel headers
* Download the latest version of alsa from Alsa project (driver, lib, and utils) to a directory (eg. ~/downloads). In the following we assume that the latest version is 1.0.22. Please change this in accordance with the one you downloaded from the Alsa project site.
- alsa-driver
- alsa-lib
- alsa-utils
* Setup installation directories

# sudo mkdir -p /usr/src/alsa
# cd /usr/src/alsa
# sudo cp ~/downloads/alsa
# sudo tar xjf alsa-driver-1.0.22.1.tar.gz
# sudo tar xjf alsa-lib-1.0.22.tar.bz2
# sudo tar xjf alsa-utils-1.0.21a.tar.bz2

*save your current configuration for recalling it at the end of installation

# sudo alsactl -f old-configuration.txt store

* Compile and install alsa-driver

# cd alsa-driver-1.0.22.1.tar.gz
# sudo ./configure --with-cards=all
# sudo make
# sudo make install

-- The configure step fails in Ubuntu 8.10 with the kernel 2.6.27-7. The configure script is unable to find the autoconf.h file and complains that it wants the full kernel sources. Aditya

-- The configure step will work on Ubuntu 8.10 if the --with-kernel option is removed. After installing the linux-source package, the ALSA driver can be configured for Ubuntu 8.10 with this command: sudo ./configure --with-cards=all

* Compile and install alsa-lib

# cd ../alsa-lib-1.0.22.tar.bz2
# sudo ./configure
# sudo make
# sudo make install

* Compile and install alsa-utils

# cd ../alsa-utils-1.0.22.tar.bz2
# sudo ./configure
# sudo make
# sudo make install

Note that you must have the curses library installed to be able to compile alsa-utils. You can install it with this command from a terminal: sudo apt-get install libncurses5-dev

* Reboot


Hope this help.

I have never done it so, I don't know if it will works, I hope yes!

Post Reply