2016-11-10 16:52:57 +01:00
========================================================
Guide to using M-Audio Audiophile USB with ALSA and Jack
========================================================
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
v1.5
Thibault Le Meur <Thibault.LeMeur@supelec.fr>
2006-03-14 11:44:53 +01:00
This document is a guide to using the M-Audio Audiophile USB (tm) device with
ALSA and JACK.
2007-07-12 11:26:35 +02:00
History
=======
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* v1.4 - Thibault Le Meur (2007-07-11)
2016-11-10 16:52:57 +01:00
- Added Low Endianness nature of 16bits-modes
found by Hakan Lennestal <Hakan.Lennestal@brfsodrahamn.se>
- Modifying document structure
2007-07-13 11:50:23 +02:00
* v1.5 - Thibault Le Meur (2007-07-12)
2016-11-10 16:52:57 +01:00
- Added AC3/DTS passthru info
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
Audiophile USB Specs and correct usage
======================================
2007-07-12 11:26:35 +02:00
2006-03-14 11:44:53 +01:00
This part is a reminder of important facts about the functions and limitations
of the device.
The device has 4 audio interfaces, and 2 MIDI ports:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* Analog Stereo Input (Ai)
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
- This port supports 2 pairs of line-level audio inputs (1/4" TS and RCA)
- When the 1/4" TS (jack) connectors are connected, the RCA connectors
are disabled
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* Analog Stereo Output (Ao)
* Digital Stereo Input (Di)
* Digital Stereo Output (Do)
* Midi In (Mi)
* Midi Out (Mo)
2006-04-18 15:42:29 +02:00
The internal DAC/ADC has the following characteristics:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* sample depth of 16 or 24 bits
* sample rate from 8kHz to 96kHz
2007-07-12 11:26:35 +02:00
* Two interfaces can't use different sample depths at the same time.
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
Moreover, the Audiophile USB documentation gives the following Warning:
2016-11-10 16:52:57 +01:00
Please exit any audio application running before switching between bit depths
2006-03-14 11:44:53 +01:00
Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be
activated at the same time depending on the audio mode selected:
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* 16-bit/48kHz ==> 4 channels in + 4 channels out
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Ai+Ao+Di+Do
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* 24-bit/48kHz ==> 4 channels in + 2 channels out,
2016-11-10 16:52:57 +01:00
or 2 channels in + 4 channels out
2006-03-14 11:44:53 +01:00
- Ai+Ao+Do or Ai+Di+Ao or Ai+Di+Do or Di+Ao+Do
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* 24-bit/96kHz ==> 2 channels in _or_ 2 channels out (half duplex only)
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Ai or Ao or Di or Do
Important facts about the Digital interface:
--------------------------------------------
2016-11-10 16:52:57 +01:00
2006-04-18 15:42:29 +02:00
* The Do port additionally supports surround-encoded AC-3 and DTS passthrough,
2016-11-10 16:52:57 +01:00
though I haven't tested it under Linux
2006-03-14 11:44:53 +01:00
- Note that in this setup only the Do interface can be enabled
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* Apart from recording an audio digital stream, enabling the Di port is a way
2016-11-10 16:52:57 +01:00
to synchronize the device to an external sample clock
2006-03-14 11:44:53 +01:00
- As a consequence, the Di port must be enable only if an active Digital
2016-11-10 16:52:57 +01:00
source is connected
2006-03-14 11:44:53 +01:00
- Enabling Di when no digital source is connected can result in a
2016-11-10 16:52:57 +01:00
synchronization error (for instance sound played at an odd sample rate)
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Audiophile USB MIDI support in ALSA
===================================
2006-03-14 11:44:53 +01:00
2007-07-12 11:26:35 +02:00
The Audiophile USB MIDI ports will be automatically supported once the
2006-03-14 11:44:53 +01:00
following modules have been loaded:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* snd-usb-audio
* snd-seq-midi
2006-04-18 15:42:29 +02:00
No additional setting is required.
2006-03-14 11:44:53 +01:00
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
Audiophile USB Audio support in ALSA
====================================
2006-03-14 11:44:53 +01:00
Audio functions of the Audiophile USB device are handled by the snd-usb-audio
module. This module can work in a default mode (without any device-specific
2006-04-18 15:42:29 +02:00
parameter), or in an "advanced" mode with the device-specific parameter called
2016-11-10 16:52:57 +01:00
`` device_setup `` .
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Default Alsa driver mode
------------------------
2007-07-12 11:26:35 +02:00
The default behavior of the snd-usb-audio driver is to list the device
capabilities at startup and activate the required mode when required
by the applications: for instance if the user is recording in a
24bit-depth-mode and immediately after wants to switch to a 16bit-depth mode,
the snd-usb-audio module will reconfigure the device on the fly.
This approach has the advantage to let the driver automatically switch from sample
rates/depths automatically according to the user's needs. However, those who
are using the device under windows know that this is not how the device is meant to
work: under windows applications must be closed before using the m-audio control
panel to switch the device working mode. Thus as we'll see in next section, this
Default Alsa driver mode can lead to device misconfigurations.
Let's get back to the Default Alsa driver mode for now. In this case the
Audiophile interfaces are mapped to alsa pcm devices in the following
way (I suppose the device's index is 1):
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* hw:1,0 is Ao in playback and Di in capture
* hw:1,1 is Do in playback and Ai in capture
* hw:1,2 is Do in AC3/DTS passthrough mode
2007-07-12 11:26:35 +02:00
In this mode, the device uses Big Endian byte-encoding so that
supported audio format are S16_BE for 16-bit depth modes and S24_3BE for
2007-07-13 11:50:23 +02:00
24-bits depth mode.
One exception is the hw:1,2 port which was reported to be Little Endian
compliant (supposedly supporting S16_LE) but processes in fact only S16_BE streams.
This has been fixed in kernel 2.6.23 and above and now the hw:1,2 interface
is reported to be big endian in this default driver mode.
2006-03-14 11:44:53 +01:00
Examples:
2016-11-10 16:52:57 +01:00
* playing a S24_3BE encoded raw file to the Ao port::
2006-03-14 11:44:53 +01:00
% aplay -D hw:1,0 -c2 -t raw -r48000 -fS24_3BE test.raw
2016-11-10 16:52:57 +01:00
* recording a S24_3BE encoded raw file from the Ai port::
2006-03-14 11:44:53 +01:00
% arecord -D hw:1,1 -c2 -t raw -r48000 -fS24_3BE test.raw
2016-11-10 16:52:57 +01:00
* playing a S16_BE encoded raw file to the Do port::
2006-03-14 11:44:53 +01:00
% aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw
2016-11-10 16:52:57 +01:00
* playing an ac3 sample file to the Do port::
2007-07-13 11:50:23 +02:00
% aplay -D hw:1,2 --channels=6 ac3_S16_BE_encoded_file.raw
2006-03-14 11:44:53 +01:00
2007-07-12 11:26:35 +02:00
If you're happy with the default Alsa driver mode and don't experience any
2006-03-14 11:44:53 +01:00
issue with this mode, then you can skip the following chapter.
2016-11-10 16:52:57 +01:00
Advanced module setup
---------------------
2006-03-14 11:44:53 +01:00
Due to the hardware constraints described above, the device initialization made
by the Alsa driver in default mode may result in a corrupted state of the
device. For instance, a particularly annoying issue is that the sound captured
2007-07-12 11:26:35 +02:00
from the Ai interface sounds distorted (as if boosted with an excessive high
volume gain).
2006-03-14 11:44:53 +01:00
For people having this problem, the snd-usb-audio module has a new module
2016-11-10 16:52:57 +01:00
parameter called `` device_setup `` (this parameter was introduced in kernel
2007-07-12 11:26:35 +02:00
release 2.6.17)
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Initializing the working mode of the Audiophile USB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2006-03-14 11:44:53 +01:00
2006-04-18 15:42:29 +02:00
As far as the Audiophile USB device is concerned, this value let the user
2006-03-14 11:44:53 +01:00
specify:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* the sample depth
* the sample rate
* whether the Di port is used or not
2016-11-10 16:52:57 +01:00
When initialized with `` device_setup=0x00 `` , the snd-usb-audio module has
2007-07-12 11:26:35 +02:00
the same behaviour as when the parameter is omitted (see paragraph "Default
Alsa driver mode" above)
Others modes are described in the following subsections.
2016-11-10 16:52:57 +01:00
16-bit modes
~~~~~~~~~~~~
2007-07-12 11:26:35 +02:00
The two supported modes are:
2016-11-10 16:52:57 +01:00
* `` device_setup=0x01 ``
2006-03-14 11:44:53 +01:00
- 16bits 48kHz mode with Di disabled
- Ai,Ao,Do can be used at the same time
- hw:1,0 is not available in capture mode
- hw:1,2 is not available
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
* `` device_setup=0x11 ``
2006-03-14 11:44:53 +01:00
- 16bits 48kHz mode with Di enabled
- Ai,Ao,Di,Do can be used at the same time
- hw:1,0 is available in capture mode
- hw:1,2 is not available
2007-07-12 11:26:35 +02:00
In this modes the device operates only at 16bits-modes. Before kernel 2.6.23,
the devices where reported to be Big-Endian when in fact they were Little-Endian
so that playing a file was a matter of using:
2016-11-10 16:52:57 +01:00
::
2007-07-12 11:26:35 +02:00
% aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test_S16_LE.raw
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
where "test_S16_LE.raw" was in fact a little-endian sample file.
Thanks to Hakan Lennestal (who discovered the Little-Endiannes of the device in
these modes) a fix has been committed (expected in kernel 2.6.23) and
Alsa now reports Little-Endian interfaces. Thus playing a file now is as simple as
using:
2016-11-10 16:52:57 +01:00
::
2007-07-12 11:26:35 +02:00
% aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_LE test_S16_LE.raw
2016-11-10 16:52:57 +01:00
24-bit modes
~~~~~~~~~~~~
2007-07-12 11:26:35 +02:00
The three supported modes are:
2016-11-10 16:52:57 +01:00
* `` device_setup=0x09 ``
2006-03-14 11:44:53 +01:00
- 24bits 48kHz mode with Di disabled
- Ai,Ao,Do can be used at the same time
- hw:1,0 is not available in capture mode
- hw:1,2 is not available
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
* `` device_setup=0x19 ``
2006-03-14 11:44:53 +01:00
- 24bits 48kHz mode with Di enabled
- 3 ports from {Ai,Ao,Di,Do} can be used at the same time
- hw:1,0 is available in capture mode and an active digital source must be
connected to Di
- hw:1,2 is not available
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
* `` device_setup=0x0D `` or `` 0x10 ``
2006-03-14 11:44:53 +01:00
- 24bits 96kHz mode
- Di is enabled by default for this mode but does not need to be connected
to an active source
- Only 1 port from {Ai,Ao,Di,Do} can be used at the same time
- hw:1,0 is available in captured mode
- hw:1,2 is not available
2007-07-12 11:26:35 +02:00
In these modes the device is only Big-Endian compliant (see "Default Alsa driver
mode" above for an aplay command example)
2016-11-10 16:52:57 +01:00
AC3 w/ DTS passthru mode
~~~~~~~~~~~~~~~~~~~~~~~~
2007-07-12 11:26:35 +02:00
2007-07-13 11:50:23 +02:00
Thanks to Hakan Lennestal, I now have a report saying that this mode works.
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
* `` device_setup=0x03 ``
2006-03-14 11:44:53 +01:00
- 16bits 48kHz mode with only the Do port enabled
2007-07-13 11:50:23 +02:00
- AC3 with DTS passthru
2006-03-14 11:44:53 +01:00
- Caution with this setup the Do port is mapped to the pcm device hw:1,0
2007-07-13 11:50:23 +02:00
The command line used to playback the AC3/DTS encoded .wav-files in this mode:
2016-11-10 16:52:57 +01:00
::
2007-07-13 11:50:23 +02:00
% aplay -D hw:1,0 --channels=6 ac3_S16_LE_encoded_file.raw
2016-11-10 16:52:57 +01:00
How to use the `` device_setup `` parameter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2006-03-14 11:44:53 +01:00
The parameter can be given:
2007-07-12 11:26:35 +02:00
2016-11-10 16:52:57 +01:00
* By manually probing the device (as root):::
2006-03-14 11:44:53 +01:00
# modprobe -r snd-usb-audio
# modprobe snd-usb-audio index=1 device_setup=0x09
2007-07-12 11:26:35 +02:00
2006-03-14 11:44:53 +01:00
* Or while configuring the modules options in your modules configuration file
2016-11-10 16:52:57 +01:00
(typically a .conf file in /etc/modprobe.d/ directory:::
2006-03-14 11:44:53 +01:00
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=1 device_setup=0x09
2008-07-25 19:45:33 -07:00
CAUTION when initializing the device
2007-07-12 11:26:35 +02:00
-------------------------------------
* Correct initialization on the device requires that device_setup is given to
the module BEFORE the device is turned on. So, if you use the "manual probing"
method described above, take care to power-on the device AFTER this initialization.
2008-07-25 19:45:33 -07:00
* Failing to respect this will lead to a misconfiguration of the device. In this case
turn off the device, unprobe the snd-usb-audio module, then probe it again with
2007-07-12 11:26:35 +02:00
correct device_setup parameter and then (and only then) turn on the device again.
* If you've correctly initialized the device in a valid mode and then want to switch
to another mode (possibly with another sample-depth), please use also the following
procedure:
2016-11-10 16:52:57 +01:00
2006-04-18 15:42:29 +02:00
- first turn off the device
- de-register the snd-usb-audio module (modprobe -r)
- change the device_setup parameter by changing the device_setup
2016-11-10 16:52:57 +01:00
option in `` /etc/modprobe.d/*.conf ``
2006-03-14 11:44:53 +01:00
- turn on the device
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* A workaround for this last issue has been applied to kernel 2.6.23, but it may not
be enough to ensure the 'stability' of the device initialization.
2016-11-10 16:52:57 +01:00
Technical details for hackers
-----------------------------
2007-07-12 11:26:35 +02:00
This section is for hackers, wanting to understand details about the device
internals and how Alsa supports it.
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Audiophile USB's `` device_setup `` structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2006-03-14 11:44:53 +01:00
If you want to understand the device_setup magic numbers for the Audiophile
USB, you need some very basic understanding of binary computation. However,
2006-04-18 15:42:29 +02:00
this is not required to use the parameter and you may skip this section.
2006-03-14 11:44:53 +01:00
The device_setup is one byte long and its structure is the following:
2016-11-10 16:52:57 +01:00
::
2006-03-14 11:44:53 +01:00
+---+---+---+---+---+---+---+---+
| b7| b6| b5| b4| b3| b2| b1| b0|
+---+---+---+---+---+---+---+---+
| 0 | 0 | 0 | Di|24B|96K|DTS|SET|
+---+---+---+---+---+---+---+---+
Where:
2016-11-10 16:52:57 +01:00
* b0 is the `` SET `` bit
2006-03-14 11:44:53 +01:00
- it MUST be set if device_setup is initialized
2016-11-10 16:52:57 +01:00
* b1 is the `` DTS `` bit
2006-03-14 11:44:53 +01:00
- it is set only for Digital output with DTS/AC3
- this setup is not tested
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* b2 is the Rate selection flag
2016-11-10 16:52:57 +01:00
- When set to `` 1 `` the rate range is 48.1-96kHz
2006-03-14 11:44:53 +01:00
- Otherwise the sample rate range is 8-48kHz
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* b3 is the bit depth selection flag
2016-11-10 16:52:57 +01:00
- When set to `` 1 `` samples are 24bits long
2006-03-14 11:44:53 +01:00
- Otherwise they are 16bits long
- Note that b2 implies b3 as the 96kHz mode is only supported for 24 bits
samples
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* b4 is the Digital input flag
2016-11-10 16:52:57 +01:00
- When set to `` 1 `` the device assumes that an active digital source is
2006-03-14 11:44:53 +01:00
connected
- You shouldn't enable Di if no source is seen on the port (this leads to
synchronization issues)
- b4 is implied by b2 (since only one port is enabled at a time no synch
error can occur)
2016-11-10 16:52:57 +01:00
* b5 to b7 are reserved for future uses, and must be set to `` 0 ``
2006-03-14 11:44:53 +01:00
- might become Ao, Do, Ai, for b7, b6, b4 respectively
Caution:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* there is no check on the value you will give to device_setup
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- for instance choosing 0x05 (16bits 96kHz) will fail back to 0x09 since
b2 implies b3. But _there_will_be_no_warning_ in /var/log/messages
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* Hardware constraints due to the USB bus limitation aren't checked
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- choosing b2 will prepare all interfaces for 24bits/96kHz but you'll
only be able to use one at the same time
2016-11-10 16:52:57 +01:00
USB implementation details for this device
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2006-03-14 11:44:53 +01:00
2006-04-18 15:42:29 +02:00
You may safely skip this section if you're not interested in driver
2007-07-12 11:26:35 +02:00
hacking.
2006-03-14 11:44:53 +01:00
2007-07-12 11:26:35 +02:00
This section describes some internal aspects of the device and summarizes the
2006-04-18 15:42:29 +02:00
data I got by usb-snooping the windows and Linux drivers.
2006-03-14 11:44:53 +01:00
2006-03-21 11:06:40 +01:00
The M-Audio Audiophile USB has 7 USB Interfaces:
2006-03-14 11:44:53 +01:00
a "USB interface":
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.0
* USB Interface nb.1
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Audio Control function
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.2
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Analog Output
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.3
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Digital Output
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.4
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Analog Input
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.5
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- Digital Input
2016-11-10 16:52:57 +01:00
2006-03-21 11:06:40 +01:00
* USB Interface nb.6
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
- MIDI interface compliant with the MIDIMAN quirk
Each interface has 5 altsettings (AltSet 1,2,3,4,5) except:
2016-11-10 16:52:57 +01:00
2006-03-14 11:44:53 +01:00
* Interface 3 (Digital Out) has an extra Alset nb.6
* Interface 5 (Digital In) does not have Alset nb.3 and 5
Here is a short description of the AltSettings capabilities:
2016-11-10 16:52:57 +01:00
* AltSettings 1 corresponds to
2006-03-14 11:44:53 +01:00
- 24-bit depth, 48.1-96kHz sample mode
- Adaptive playback (Ao and Do), Synch capture (Ai), or Asynch capture (Di)
2016-11-10 16:52:57 +01:00
* AltSettings 2 corresponds to
2006-03-14 11:44:53 +01:00
- 24-bit depth, 8-48kHz sample mode
- Asynch capture and playback (Ao,Ai,Do,Di)
2016-11-10 16:52:57 +01:00
* AltSettings 3 corresponds to
2006-03-14 11:44:53 +01:00
- 24-bit depth, 8-48kHz sample mode
- Synch capture (Ai) and Adaptive playback (Ao,Do)
2016-11-10 16:52:57 +01:00
* AltSettings 4 corresponds to
2006-03-14 11:44:53 +01:00
- 16-bit depth, 8-48kHz sample mode
- Asynch capture and playback (Ao,Ai,Do,Di)
2016-11-10 16:52:57 +01:00
* AltSettings 5 corresponds to
2006-03-14 11:44:53 +01:00
- 16-bit depth, 8-48kHz sample mode
- Synch capture (Ai) and Adaptive playback (Ao,Do)
2016-11-10 16:52:57 +01:00
* AltSettings 6 corresponds to
2006-03-14 11:44:53 +01:00
- 16-bit depth, 8-48kHz sample mode
- Synch playback (Do), audio format type III IEC1937_AC-3
2006-04-18 15:42:29 +02:00
In order to ensure a correct initialization of the device, the driver
2016-11-10 16:52:57 +01:00
*must* *know* how the device will be used:
2006-04-18 15:42:29 +02:00
* if DTS is chosen, only Interface 2 with AltSet nb.6 must be
2006-03-14 11:44:53 +01:00
registered
* if 96KHz only AltSets nb.1 of each interface must be selected
* if samples are using 24bits/48KHz then AltSet 2 must me used if
Digital input is connected, and only AltSet nb.3 if Digital input
is not connected
* if samples are using 16bits/48KHz then AltSet 4 must me used if
Digital input is connected, and only AltSet nb.5 if Digital input
is not connected
When device_setup is given as a parameter to the snd-usb-audio module, the
2006-04-18 15:42:29 +02:00
parse_audio_endpoints function uses a quirk called
2016-11-10 16:52:57 +01:00
`` audiophile_skip_setting_quirk `` in order to prevent AltSettings not
2006-03-14 11:44:53 +01:00
corresponding to device_setup from being registered in the driver.
2016-11-10 16:52:57 +01:00
Audiophile USB and Jack support
===============================
2006-03-14 11:44:53 +01:00
This section deals with support of the Audiophile USB device in Jack.
2007-07-12 11:26:35 +02:00
There are 2 main potential issues when using Jackd with the device:
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* support for Big-Endian devices in 24-bit modes
* support for 4-in / 4-out channels
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Direct support in Jackd
-----------------------
2007-07-12 11:26:35 +02:00
Jack supports big endian devices only in recent versions (thanks to
Andreas Steinmetz for his first big-endian patch). I can't remember
2008-07-25 19:45:33 -07:00
exactly when this support was released into jackd, let's just say that
2007-07-12 11:26:35 +02:00
with jackd version 0.103.0 it's almost ok (just a small bug is affecting
2008-07-25 19:45:33 -07:00
16bits Big-Endian devices, but since you've read carefully the above
2007-07-12 11:26:35 +02:00
paragraphs, you're now using kernel >= 2.6.23 and your 16bits devices
are now Little Endians ;-) ).
You can run jackd with the following command for playback with Ao and
record with Ai:
2016-11-10 16:52:57 +01:00
::
2007-07-12 11:26:35 +02:00
% jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1
2016-11-10 16:52:57 +01:00
Using Alsa plughw
-----------------
2007-07-12 11:26:35 +02:00
If you don't have a recent Jackd installed, you can downgrade to using
2016-11-10 16:52:57 +01:00
the Alsa `` plug `` converter.
2006-03-14 11:44:53 +01:00
For instance here is one way to run Jack with 2 playback channels on Ao and 2
capture channels from Ai:
2016-11-10 16:52:57 +01:00
::
2006-03-14 11:44:53 +01:00
% jackd -R -dalsa -dplughw:1 -r48000 -p256 -n2 -D -Cplughw:1,1
However you may see the following warning message:
2016-11-10 16:52:57 +01:00
You appear to be using the ALSA software "plug" layer, probably a result of
using the "default" ALSA device. This is less efficient than it could be.
Consider using a hardware device instead rather than using the plug layer.
2006-03-14 11:44:53 +01:00
2016-11-10 16:52:57 +01:00
Getting 2 input and/or output interfaces in Jack
------------------------------------------------
2006-04-18 15:42:29 +02:00
As you can see, starting the Jack server this way will only enable 1 stereo
input (Di or Ai) and 1 stereo output (Ao or Do).
This is due to the following restrictions:
2016-11-10 16:52:57 +01:00
2006-04-18 15:42:29 +02:00
* Jack can only open one capture device and one playback device at a time
* The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1
(and optionally hw:1,2)
2007-07-12 11:26:35 +02:00
2006-04-18 15:42:29 +02:00
If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to
combine the Alsa devices into one logical "complex" device.
If you want to give it a try, I recommend reading the information from
this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html
It is related to another device (ice1712) but can be adapted to suit
the Audiophile USB.
Enabling multiple Audiophile USB interfaces for Jackd will certainly require:
2016-11-10 16:52:57 +01:00
2007-07-12 11:26:35 +02:00
* Making sure your Jackd version has the MMAP_COMPLEX patch (see the ice1712 page)
* (maybe) patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page)
2006-04-18 15:42:29 +02:00
* define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc
file
* start jackd with this device
2007-07-12 11:26:35 +02:00
I had no success in testing this for now, if you have any success with this kind
of setup, please drop me an email.