You are not logged in.

#1 2020-06-04 05:13:29

stefano
Member
Registered: 2011-04-09
Posts: 268

Setting up M-Audio Fast Track Pro audio interface with alsa [SOLVED]

I am trying to get the M-Audio Fast Track Pro audio interface to be properly recognized by alsa, but failing.

The Fast track Pro is an old 4x4 Usb 1.1 audio interface which can be configured in various ways with the proper device_setup instructions (a parameter list is given here for a similar M-Audio product). With the default configuration, the interface is seen by alsa but not by jack.

According the kernel page just mentioned, reconfiguring the card, should be as simple as stopping the snd_usb_audio module and reloading it with the desired option, e.g.: 

$ modprobe -r snd_usb_audio
$ modprobe snd_usb_audio index=1 device_setup=0x09

Unfortunately this does not work---the snd_usb_audio module comes out in use

modprobe: FATAL: Module snd_usb_audio is in use.

even though lsmod does not list any other module using it:

stefano@gorgias $ lsmod | grep audio
snd_usb_audio         299008  3
snd_usbmidi_lib        40960  1 snd_usb_audio
mc                     61440  5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               147456  6 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd                   114688  35 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi

Perhaps modules' unloading has not been enabled in the stock kernel?

So I tried the other tack, this one suggested by linuxmusicians, which was for a 2013 Linux Mint distribution.  The recommended steps are:
1. create  in /etc/modprobe.d/fast-track-pro.conf with the configuration option:

options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x09 index=0 enable=1

2. comment out all the snd_usb_audio lines in /etc/modprobe/alsa_base.conf

3.  set the order of the audio cards in /etc/modprobe.d/sound-cards-order with

options snd_usb_audio index=0
options snd_hda_intel index=1

Leaving aside the last dubious step (isn't the index parameter supposed to take care of the ordering issue?), I tried the first two steps. Arch apparently does not have alsa_base.conf as default, so I created it and simply added the following two lines, in the hope they would assign the right indices to the interface and the onboard sound card:

options snd_usb_audio index=0
options snd_hda_intel index=1

 
Unfortunately, I get this error when I turn the interface on:

[  169.390050] usb 2-2: New USB device found, idVendor=0763, idProduct=2012, bcdDevice= 1.00
[  169.390053] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  169.390054] usb 2-2: Product: FastTrack Pro
[  169.390055] usb 2-2: Manufacturer: M-Audio
[  169.402075] usb 2-2: Fast Track Pro switching to config #2
[  169.408085] usb 2-2: Fast Track Pro switching to config #2
[  169.423074] usb 2-2: Fast Track Pro config OK
[  169.423079] snd-usb-audio 2-2:2.0: cannot find the slot for index 0 (range 0-2), error: -16
[  169.423082] usb 2-2: cannot create card instance 0
[  169.423086] snd-usb-audio: probe of 2-2:2.0 failed with error -16
[  169.429064] usb 2-2: Fast Track Pro config OK
[  169.429066] snd-usb-audio 2-2:2.1: cannot find the slot for index 0 (range 0-2), error: -16
[  169.429068] usb 2-2: cannot create card instance 0
[  169.429071] snd-usb-audio: probe of 2-2:2.1 failed with error -16

I could not find any help for the "error: -16", but I am guessing the alsa module is not finding a card corresponding to the vendor and product id at index 0, which means my alsa_base.conf file failed, I guess.
I would really like suggestions on how to get the module to talk to the proper card/interface.

Here is the content of /proc/asound/cards after a reboot without the offending commands/files (alsa_base.conf and /etc/modprobe.d/fast-track-pro.conf):

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xfb320000 irq 44
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfb080000 irq 45
 2 [C920           ]: USB-Audio - HD Pro Webcam C920
                      HD Pro Webcam C920 at usb-0000:00:1d.0-1.2, high speed
 3 [Pro            ]: USB-Audio - FastTrack Pro
                      M-Audio FastTrack Pro at usb-0000:07:00.0-2, full speed

and here are aplay and arecord (also after a reboot):

stefano@gorgias ~ $ aplay -l && arecord -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: C920 [HD Pro Webcam C920], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Last edited by stefano (2020-06-06 04:50:04)

Offline

#2 2020-06-04 08:31:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,289

Re: Setting up M-Audio Fast Track Pro audio interface with alsa [SOLVED]

It seems you are already going at this from a wrong outset. It's not really possible for ALSA to see it but jack not. If ALSA sees it and enumerates it properly it should be accessible and configurable by jack, regardless of what the chosen initial index is.

If you really want to change the index ordering in addition to that, what you need to know is that the index parameter doesn't actually influence the order in which devices are detected. If you want to use index parameters to properly assign the indices as you want them you have to account for all cards you expect to be in use at any given time, to ensure the index is correct or give negative indices to leave room for unaccounted devices (negative indices lead to the minimum possible index position -(index+1) and if occupied count upwards: the default index  value is -1 so, try from 0 upwards until we have a free slot)). So in your case what you'd want is, if we are going with your intial approach

#That 1 here should move your webcam out of the way, to be sure add the vid and pid of the webcam to the vid= and pid= argument, also from reading that kernel doc I'm not convinced that you actually want that device_setup nr.
options snd-usb-audio index=0,1  device_setup=0x09 vid=0x2012 pid=0x2012
#Move integrated and hdmi card to their own slots
options snd-hda-intel index=2,3

or with the less hard coded approach but rhe logical same end effect, assuming we really only care about getting the fast track on track ( tongue )

options snd-usb-audio index=-1,-2  device_setup=0x09 vid=0x2012 pid=0x2012
#Move integrated and hdmi card to their own slots, note how we just reuse the -2 here, because we don't particularly care whether hdmi or integrated or the webcam is first in the race for index 1 to 3
options snd-hda-intel index=-2,-2

In the first case, if you add another USB card that you don't explicitly mention you are again in the danger that depending on how device enumeration happens that that unaccounted for device grabs index 0 and the fast track card not loading due to the hardcoded index 0 being occupied. In the second case, that danger is still present, but the device will still be loaded, just not necessarily with the index 0, but it will load and be enumerated regardless.

Last edited by V1del (2020-06-04 08:40:13)

Offline

#3 2020-06-04 16:59:33

stefano
Member
Registered: 2011-04-09
Posts: 268

Re: Setting up M-Audio Fast Track Pro audio interface with alsa [SOLVED]

V1del wrote:

It seems you are already going at this from a wrong outset. It's not really possible for ALSA to see it but jack not. If ALSA sees it and enumerates it properly it should be accessible and configurable by jack, regardless of what the chosen initial index is.

It is certainly possible I am doing this wrong---I had never messed up with alsa until 3 days ago...
However, with the default configuration, jack sees just a bare minimum of the interface capabilities. I can't find a way to access the 4 inputs and 4 output channels---I only see the Midi ports, 1 stereo out and 2 channels in which may be a stereo in or the two mono in (I haven't tested that yet). Moreover, I can only get sound out on the headphone jack (although that may be a different issue)
That is why I was trying to change the configuration options as suggested by that kernel page.   


I am trying out your second suggestion, with no appreciable differences so far. That is, I no longer get kernel errors as before, but the interface exposed to jack is the same as per the default configuration mentioned above, Midi in/out, 1 audio stereo out, 1 stereo (or 1+1 mono) audio in, no sound out 9as before--- only on the headphone jack).

Your fix seems to have put the interface on the correct slot, yet i see no difference, alas. Any other suggestion?


Here are the outputs from the usual commands:

 
$ less /etc/modprobe.d/alsa_base.conf 
options snd-usb-audio index=-1,-2  device_setup=0x09 vid=0x2012 pid=0x2012
options snd-hda-intel index=-2,-2

$ aplay  -l
**** List of PLAYBACK Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Pro [FastTrack Pro], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ less /proc/asound/cards
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xfb320000 irq 44
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfb080000 irq 45
 3 [Pro            ]: USB-Audio - FastTrack Pro
                      M-Audio FastTrack Pro at usb-0000:07:00.0-2, full speed

Offline

#4 2020-06-06 04:35:16

stefano
Member
Registered: 2011-04-09
Posts: 268

Re: Setting up M-Audio Fast Track Pro audio interface with alsa [SOLVED]

I could find no way of getting jack+alsa to see four output channels as expected from the 24bits/48K configurations. Alsa maps two of the four output channels to system outs 1 and 2 and ignores the other two. What is annoying is that it chooses to map  the digital output channels, not the analog ones. This is unfortunate, because the Fast Track Pro has no way of cutting off the digital output to the monitors and keeping it going to the headphones, thereby making it useless for recording over a base streaming from the DAW. Only the analog outs can be cut off, not the digital ones.

However....

The missing analog out channels can be recovered with the alsa_out utility and made available in jack.
Problem solved! All functions are now working (I also tested the two input channels and they work fine).

The last crucial bit of information was provided in an old and very detailed blog post by Joe Giampaoli mostly devoted to recompiling the kernel
with the appropriate patch for the M-Audio Fast Track Pro and real time scheduling. That is no longer necessary, but the configuration information are valid and the most complete I could find.
For future reference, I am going to post below the entire configuration file he posted, since it may disappear any time.
Kudos to him!
 

# All configurations shown at the bottom of this file will put the Fast Track Pro as device number 5.
# So in qjackctl or from terminal you will always know that device 5 will be the Fast Track Pro.
# You can change this device number if necessary by changing the index=5 to another number.
#
# Each configuration line has an explanation above it (which should be left commented) so you know how
# the Fast Track Pro will be running.
#
# Only uncomment one line (remove # at start of line) depending how you are going to use your FastTrack Pro.
#
# After making changes to this file and saving it you should power off your Fast Track Pro and unload and reload
# the snd-usb-audio module by doing the following in a terminal:
#
#       sudo modprobe -r snd-usb-audio
#       sudo modprobe snd-usb-audio
#
# If that doesn't work, and you do get an error message saying that the snd-usb-audio module is in use then just
# reboot your machine.
# This is why it's better to not have any other USB audio devices connected, because they also get a hold of the
# snd-usb-audio module.
#
# According to the patch, the possible values for the device_setup parameter are the sum of the following numbers:
#
#    * 0×01 : use the device_setup parameter, always needed
#    * 0×02 : enable digital output (channels 3,4)
#    * 0×04 : use 48kHz-96kHz sampling rate, 8-48 kHz if not used
#    * 0×08 : 24bit sampling rate
#    * 0×10 : enable digital input (channels 3,4)
#
#===================================================================================================================
#===================================================================================================================
#===================================================================================================================
#
#                                          CONFIGURATION LINES (ONLY UNCOMMENT ONE):
#
#===================================================================================================================
#===================================================================================================================
# 24 BIT - 44.1/48 KHz - 2 INPUTS (ANALOG) - 4 OUTPUTS (ANALOG + DIGITAL) - THIS IS THE DEFAULT AND ENABLED:
options snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x9 index=5 enable=1
#===================================================================================================================
#===================================================================================================================
#
#===================================================================================================================
#===================================================================================================================
# 24 BIT - 88.2/96 KHz - 4 INPUTS (ANALOG + DIGITAL) OR 4 OUTPUTS (ANALOG + DIGITAL) - DUPLEX IS NOT SUPPORTED
#options        snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x5 index=5 enable=1
#===================================================================================================================
#===================================================================================================================
#
#===================================================================================================================
#===================================================================================================================
# 24 BIT - 44.1/48 KHz - 2 INPUTS (DIGITAL) - 4 OUTPUTS (ANALOG + DIGITAL)
#options        snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x13 index=5 enable=1
#===================================================================================================================
#===================================================================================================================
#
#===================================================================================================================
#===================================================================================================================
# 16 BIT - 44.1/48 KHz - 4 INPUTS (ANALOG + DIGITAL) - 4 OUTPUTS (ANALOG + DIGITAL)
#options        snd_usb_audio   vid=0x763 pid=0x2012 device_setup=0x0 index=5 enable=1
#===================================================================================================================
#===================================================================================================================
#
# To use the other Inputs/Outputs if available as shown in the configuration lines above you must use either the
# alsa_in or alsa_out commands so they become available to JACK and other applications.
# For example let's say you will run the Fast Track pro with device_setup=0 which makes it run at 16 bit mode
# and you make qjackctl use the hw:5,1 input then in a terminal you will type:
# alsa_in -d hw:5,0 to engage the other 2 inputs, then they will appear in your qjackctl connections tab.
# It doesn't matter if you do it the other way around, like telling qjackctl to use hw:5,0 in that case you will use
# hw:5,1 with the alsa_in command.
#
# Same applies with outputs but with the alsa_out command.
#
# Any questions or issues? just send me an e-mail: joegiampaoli@gmail.com
#
# Cheers!

Last edited by stefano (2020-06-06 04:52:02)

Offline

Board footer

Powered by FluxBB