Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 1 | ======================================================== |
| 2 | Guide to using M-Audio Audiophile USB with ALSA and Jack |
| 3 | ======================================================== |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 4 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 5 | v1.5 |
| 6 | |
| 7 | Thibault Le Meur <Thibault.LeMeur@supelec.fr> |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 8 | |
| 9 | This document is a guide to using the M-Audio Audiophile USB (tm) device with |
| 10 | ALSA and JACK. |
| 11 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 12 | History |
| 13 | ======= |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 14 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 15 | * v1.4 - Thibault Le Meur (2007-07-11) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 16 | |
| 17 | - Added Low Endianness nature of 16bits-modes |
| 18 | found by Hakan Lennestal <Hakan.Lennestal@brfsodrahamn.se> |
| 19 | - Modifying document structure |
| 20 | |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 21 | * v1.5 - Thibault Le Meur (2007-07-12) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 22 | - Added AC3/DTS passthru info |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 23 | |
| 24 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 25 | Audiophile USB Specs and correct usage |
| 26 | ====================================== |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 27 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 28 | This part is a reminder of important facts about the functions and limitations |
| 29 | of the device. |
| 30 | |
| 31 | The device has 4 audio interfaces, and 2 MIDI ports: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 32 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 33 | * Analog Stereo Input (Ai) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 34 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 35 | - This port supports 2 pairs of line-level audio inputs (1/4" TS and RCA) |
| 36 | - When the 1/4" TS (jack) connectors are connected, the RCA connectors |
| 37 | are disabled |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 38 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 39 | * Analog Stereo Output (Ao) |
| 40 | * Digital Stereo Input (Di) |
| 41 | * Digital Stereo Output (Do) |
| 42 | * Midi In (Mi) |
| 43 | * Midi Out (Mo) |
| 44 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 45 | The internal DAC/ADC has the following characteristics: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 46 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 47 | * sample depth of 16 or 24 bits |
| 48 | * sample rate from 8kHz to 96kHz |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 49 | * Two interfaces can't use different sample depths at the same time. |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 50 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 51 | Moreover, the Audiophile USB documentation gives the following Warning: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 52 | Please exit any audio application running before switching between bit depths |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 53 | |
| 54 | Due to the USB 1.1 bandwidth limitation, a limited number of interfaces can be |
| 55 | activated at the same time depending on the audio mode selected: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 56 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 57 | * 16-bit/48kHz ==> 4 channels in + 4 channels out |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 58 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 59 | - Ai+Ao+Di+Do |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 60 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 61 | * 24-bit/48kHz ==> 4 channels in + 2 channels out, |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 62 | or 2 channels in + 4 channels out |
| 63 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 64 | - Ai+Ao+Do or Ai+Di+Ao or Ai+Di+Do or Di+Ao+Do |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 65 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 66 | * 24-bit/96kHz ==> 2 channels in _or_ 2 channels out (half duplex only) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 67 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 68 | - Ai or Ao or Di or Do |
| 69 | |
| 70 | Important facts about the Digital interface: |
| 71 | -------------------------------------------- |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 72 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 73 | * The Do port additionally supports surround-encoded AC-3 and DTS passthrough, |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 74 | though I haven't tested it under Linux |
| 75 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 76 | - Note that in this setup only the Do interface can be enabled |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 77 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 78 | * Apart from recording an audio digital stream, enabling the Di port is a way |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 79 | to synchronize the device to an external sample clock |
| 80 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 81 | - As a consequence, the Di port must be enable only if an active Digital |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 82 | source is connected |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 83 | - Enabling Di when no digital source is connected can result in a |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 84 | synchronization error (for instance sound played at an odd sample rate) |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 85 | |
| 86 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 87 | Audiophile USB MIDI support in ALSA |
| 88 | =================================== |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 89 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 90 | The Audiophile USB MIDI ports will be automatically supported once the |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 91 | following modules have been loaded: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 92 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 93 | * snd-usb-audio |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 94 | * snd-seq-midi |
| 95 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 96 | No additional setting is required. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 97 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 98 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 99 | Audiophile USB Audio support in ALSA |
| 100 | ==================================== |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 101 | |
| 102 | Audio functions of the Audiophile USB device are handled by the snd-usb-audio |
| 103 | module. This module can work in a default mode (without any device-specific |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 104 | parameter), or in an "advanced" mode with the device-specific parameter called |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 105 | ``device_setup``. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 106 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 107 | Default Alsa driver mode |
| 108 | ------------------------ |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 109 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 110 | The default behavior of the snd-usb-audio driver is to list the device |
| 111 | capabilities at startup and activate the required mode when required |
| 112 | by the applications: for instance if the user is recording in a |
| 113 | 24bit-depth-mode and immediately after wants to switch to a 16bit-depth mode, |
| 114 | the snd-usb-audio module will reconfigure the device on the fly. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 115 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 116 | This approach has the advantage to let the driver automatically switch from sample |
| 117 | rates/depths automatically according to the user's needs. However, those who |
| 118 | are using the device under windows know that this is not how the device is meant to |
| 119 | work: under windows applications must be closed before using the m-audio control |
| 120 | panel to switch the device working mode. Thus as we'll see in next section, this |
| 121 | Default Alsa driver mode can lead to device misconfigurations. |
| 122 | |
| 123 | Let's get back to the Default Alsa driver mode for now. In this case the |
| 124 | Audiophile interfaces are mapped to alsa pcm devices in the following |
| 125 | way (I suppose the device's index is 1): |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 126 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 127 | * hw:1,0 is Ao in playback and Di in capture |
| 128 | * hw:1,1 is Do in playback and Ai in capture |
| 129 | * hw:1,2 is Do in AC3/DTS passthrough mode |
| 130 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 131 | In this mode, the device uses Big Endian byte-encoding so that |
| 132 | supported audio format are S16_BE for 16-bit depth modes and S24_3BE for |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 133 | 24-bits depth mode. |
| 134 | |
| 135 | One exception is the hw:1,2 port which was reported to be Little Endian |
| 136 | compliant (supposedly supporting S16_LE) but processes in fact only S16_BE streams. |
| 137 | This has been fixed in kernel 2.6.23 and above and now the hw:1,2 interface |
| 138 | is reported to be big endian in this default driver mode. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 139 | |
| 140 | Examples: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 141 | |
| 142 | * playing a S24_3BE encoded raw file to the Ao port:: |
| 143 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 144 | % aplay -D hw:1,0 -c2 -t raw -r48000 -fS24_3BE test.raw |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 145 | |
| 146 | * recording a S24_3BE encoded raw file from the Ai port:: |
| 147 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 148 | % arecord -D hw:1,1 -c2 -t raw -r48000 -fS24_3BE test.raw |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 149 | |
| 150 | * playing a S16_BE encoded raw file to the Do port:: |
| 151 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 152 | % aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 153 | |
| 154 | * playing an ac3 sample file to the Do port:: |
| 155 | |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 156 | % aplay -D hw:1,2 --channels=6 ac3_S16_BE_encoded_file.raw |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 157 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 158 | If you're happy with the default Alsa driver mode and don't experience any |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 159 | issue with this mode, then you can skip the following chapter. |
| 160 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 161 | Advanced module setup |
| 162 | --------------------- |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 163 | |
| 164 | Due to the hardware constraints described above, the device initialization made |
| 165 | by the Alsa driver in default mode may result in a corrupted state of the |
| 166 | device. For instance, a particularly annoying issue is that the sound captured |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 167 | from the Ai interface sounds distorted (as if boosted with an excessive high |
| 168 | volume gain). |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 169 | |
| 170 | For people having this problem, the snd-usb-audio module has a new module |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 171 | parameter called ``device_setup`` (this parameter was introduced in kernel |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 172 | release 2.6.17) |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 173 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 174 | Initializing the working mode of the Audiophile USB |
| 175 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 176 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 177 | As far as the Audiophile USB device is concerned, this value let the user |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 178 | specify: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 179 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 180 | * the sample depth |
| 181 | * the sample rate |
| 182 | * whether the Di port is used or not |
| 183 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 184 | When initialized with ``device_setup=0x00``, the snd-usb-audio module has |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 185 | the same behaviour as when the parameter is omitted (see paragraph "Default |
| 186 | Alsa driver mode" above) |
| 187 | |
| 188 | Others modes are described in the following subsections. |
| 189 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 190 | 16-bit modes |
| 191 | ~~~~~~~~~~~~ |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 192 | |
| 193 | The two supported modes are: |
| 194 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 195 | * ``device_setup=0x01`` |
| 196 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 197 | - 16bits 48kHz mode with Di disabled |
| 198 | - Ai,Ao,Do can be used at the same time |
| 199 | - hw:1,0 is not available in capture mode |
| 200 | - hw:1,2 is not available |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 201 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 202 | * ``device_setup=0x11`` |
| 203 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 204 | - 16bits 48kHz mode with Di enabled |
| 205 | - Ai,Ao,Di,Do can be used at the same time |
| 206 | - hw:1,0 is available in capture mode |
| 207 | - hw:1,2 is not available |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 208 | |
| 209 | In this modes the device operates only at 16bits-modes. Before kernel 2.6.23, |
| 210 | the devices where reported to be Big-Endian when in fact they were Little-Endian |
| 211 | so that playing a file was a matter of using: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 212 | :: |
| 213 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 214 | % aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test_S16_LE.raw |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 215 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 216 | where "test_S16_LE.raw" was in fact a little-endian sample file. |
| 217 | |
| 218 | Thanks to Hakan Lennestal (who discovered the Little-Endiannes of the device in |
| 219 | these modes) a fix has been committed (expected in kernel 2.6.23) and |
| 220 | Alsa now reports Little-Endian interfaces. Thus playing a file now is as simple as |
| 221 | using: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 222 | :: |
| 223 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 224 | % aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_LE test_S16_LE.raw |
| 225 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 226 | |
| 227 | 24-bit modes |
| 228 | ~~~~~~~~~~~~ |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 229 | |
| 230 | The three supported modes are: |
| 231 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 232 | * ``device_setup=0x09`` |
| 233 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 234 | - 24bits 48kHz mode with Di disabled |
| 235 | - Ai,Ao,Do can be used at the same time |
| 236 | - hw:1,0 is not available in capture mode |
| 237 | - hw:1,2 is not available |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 238 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 239 | * ``device_setup=0x19`` |
| 240 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 241 | - 24bits 48kHz mode with Di enabled |
| 242 | - 3 ports from {Ai,Ao,Di,Do} can be used at the same time |
| 243 | - hw:1,0 is available in capture mode and an active digital source must be |
| 244 | connected to Di |
| 245 | - hw:1,2 is not available |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 246 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 247 | * ``device_setup=0x0D`` or ``0x10`` |
| 248 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 249 | - 24bits 96kHz mode |
| 250 | - Di is enabled by default for this mode but does not need to be connected |
| 251 | to an active source |
| 252 | - Only 1 port from {Ai,Ao,Di,Do} can be used at the same time |
| 253 | - hw:1,0 is available in captured mode |
| 254 | - hw:1,2 is not available |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 255 | |
| 256 | In these modes the device is only Big-Endian compliant (see "Default Alsa driver |
| 257 | mode" above for an aplay command example) |
| 258 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 259 | AC3 w/ DTS passthru mode |
| 260 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 261 | |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 262 | Thanks to Hakan Lennestal, I now have a report saying that this mode works. |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 263 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 264 | * ``device_setup=0x03`` |
| 265 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 266 | - 16bits 48kHz mode with only the Do port enabled |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 267 | - AC3 with DTS passthru |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 268 | - Caution with this setup the Do port is mapped to the pcm device hw:1,0 |
| 269 | |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 270 | The command line used to playback the AC3/DTS encoded .wav-files in this mode: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 271 | :: |
| 272 | |
Thibault Le Meur | cac19c3 | 2007-07-13 11:50:23 +0200 | [diff] [blame] | 273 | % aplay -D hw:1,0 --channels=6 ac3_S16_LE_encoded_file.raw |
| 274 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 275 | How to use the ``device_setup`` parameter |
| 276 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 277 | |
| 278 | The parameter can be given: |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 279 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 280 | * By manually probing the device (as root)::: |
| 281 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 282 | # modprobe -r snd-usb-audio |
| 283 | # modprobe snd-usb-audio index=1 device_setup=0x09 |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 284 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 285 | * Or while configuring the modules options in your modules configuration file |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 286 | (typically a .conf file in /etc/modprobe.d/ directory::: |
| 287 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 288 | alias snd-card-1 snd-usb-audio |
| 289 | options snd-usb-audio index=1 device_setup=0x09 |
| 290 | |
Matt LaPlante | d919588 | 2008-07-25 19:45:33 -0700 | [diff] [blame] | 291 | CAUTION when initializing the device |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 292 | ------------------------------------- |
| 293 | |
| 294 | * Correct initialization on the device requires that device_setup is given to |
| 295 | the module BEFORE the device is turned on. So, if you use the "manual probing" |
| 296 | method described above, take care to power-on the device AFTER this initialization. |
| 297 | |
Matt LaPlante | d919588 | 2008-07-25 19:45:33 -0700 | [diff] [blame] | 298 | * Failing to respect this will lead to a misconfiguration of the device. In this case |
| 299 | turn off the device, unprobe the snd-usb-audio module, then probe it again with |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 300 | correct device_setup parameter and then (and only then) turn on the device again. |
| 301 | |
| 302 | * If you've correctly initialized the device in a valid mode and then want to switch |
| 303 | to another mode (possibly with another sample-depth), please use also the following |
| 304 | procedure: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 305 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 306 | - first turn off the device |
| 307 | - de-register the snd-usb-audio module (modprobe -r) |
| 308 | - change the device_setup parameter by changing the device_setup |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 309 | option in ``/etc/modprobe.d/*.conf`` |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 310 | - turn on the device |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 311 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 312 | * A workaround for this last issue has been applied to kernel 2.6.23, but it may not |
| 313 | be enough to ensure the 'stability' of the device initialization. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 314 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 315 | Technical details for hackers |
| 316 | ----------------------------- |
| 317 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 318 | This section is for hackers, wanting to understand details about the device |
| 319 | internals and how Alsa supports it. |
| 320 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 321 | Audiophile USB's ``device_setup`` structure |
| 322 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 323 | |
| 324 | If you want to understand the device_setup magic numbers for the Audiophile |
| 325 | USB, you need some very basic understanding of binary computation. However, |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 326 | this is not required to use the parameter and you may skip this section. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 327 | |
| 328 | The device_setup is one byte long and its structure is the following: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 329 | :: |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 330 | |
| 331 | +---+---+---+---+---+---+---+---+ |
| 332 | | b7| b6| b5| b4| b3| b2| b1| b0| |
| 333 | +---+---+---+---+---+---+---+---+ |
| 334 | | 0 | 0 | 0 | Di|24B|96K|DTS|SET| |
| 335 | +---+---+---+---+---+---+---+---+ |
| 336 | |
| 337 | Where: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 338 | |
| 339 | * b0 is the ``SET`` bit |
| 340 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 341 | - it MUST be set if device_setup is initialized |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 342 | |
| 343 | * b1 is the ``DTS`` bit |
| 344 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 345 | - it is set only for Digital output with DTS/AC3 |
| 346 | - this setup is not tested |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 347 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 348 | * b2 is the Rate selection flag |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 349 | |
| 350 | - When set to ``1`` the rate range is 48.1-96kHz |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 351 | - Otherwise the sample rate range is 8-48kHz |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 352 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 353 | * b3 is the bit depth selection flag |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 354 | |
| 355 | - When set to ``1`` samples are 24bits long |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 356 | - Otherwise they are 16bits long |
| 357 | - Note that b2 implies b3 as the 96kHz mode is only supported for 24 bits |
| 358 | samples |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 359 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 360 | * b4 is the Digital input flag |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 361 | |
| 362 | - When set to ``1`` the device assumes that an active digital source is |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 363 | connected |
| 364 | - You shouldn't enable Di if no source is seen on the port (this leads to |
| 365 | synchronization issues) |
| 366 | - b4 is implied by b2 (since only one port is enabled at a time no synch |
| 367 | error can occur) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 368 | |
| 369 | * b5 to b7 are reserved for future uses, and must be set to ``0`` |
| 370 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 371 | - might become Ao, Do, Ai, for b7, b6, b4 respectively |
| 372 | |
| 373 | Caution: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 374 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 375 | * there is no check on the value you will give to device_setup |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 376 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 377 | - for instance choosing 0x05 (16bits 96kHz) will fail back to 0x09 since |
| 378 | b2 implies b3. But _there_will_be_no_warning_ in /var/log/messages |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 379 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 380 | * Hardware constraints due to the USB bus limitation aren't checked |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 381 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 382 | - choosing b2 will prepare all interfaces for 24bits/96kHz but you'll |
| 383 | only be able to use one at the same time |
| 384 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 385 | USB implementation details for this device |
| 386 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 387 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 388 | You may safely skip this section if you're not interested in driver |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 389 | hacking. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 390 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 391 | This section describes some internal aspects of the device and summarizes the |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 392 | data I got by usb-snooping the windows and Linux drivers. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 393 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 394 | The M-Audio Audiophile USB has 7 USB Interfaces: |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 395 | a "USB interface": |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 396 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 397 | * USB Interface nb.0 |
| 398 | * USB Interface nb.1 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 399 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 400 | - Audio Control function |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 401 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 402 | * USB Interface nb.2 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 403 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 404 | - Analog Output |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 405 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 406 | * USB Interface nb.3 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 407 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 408 | - Digital Output |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 409 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 410 | * USB Interface nb.4 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 411 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 412 | - Analog Input |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 413 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 414 | * USB Interface nb.5 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 415 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 416 | - Digital Input |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 417 | |
Thibault LE MEUR | 19739fe | 2006-03-21 11:06:40 +0100 | [diff] [blame] | 418 | * USB Interface nb.6 |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 419 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 420 | - MIDI interface compliant with the MIDIMAN quirk |
| 421 | |
| 422 | Each interface has 5 altsettings (AltSet 1,2,3,4,5) except: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 423 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 424 | * Interface 3 (Digital Out) has an extra Alset nb.6 |
| 425 | * Interface 5 (Digital In) does not have Alset nb.3 and 5 |
| 426 | |
| 427 | Here is a short description of the AltSettings capabilities: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 428 | |
| 429 | * AltSettings 1 corresponds to |
| 430 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 431 | - 24-bit depth, 48.1-96kHz sample mode |
| 432 | - Adaptive playback (Ao and Do), Synch capture (Ai), or Asynch capture (Di) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 433 | |
| 434 | * AltSettings 2 corresponds to |
| 435 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 436 | - 24-bit depth, 8-48kHz sample mode |
| 437 | - Asynch capture and playback (Ao,Ai,Do,Di) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 438 | |
| 439 | * AltSettings 3 corresponds to |
| 440 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 441 | - 24-bit depth, 8-48kHz sample mode |
| 442 | - Synch capture (Ai) and Adaptive playback (Ao,Do) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 443 | |
| 444 | * AltSettings 4 corresponds to |
| 445 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 446 | - 16-bit depth, 8-48kHz sample mode |
| 447 | - Asynch capture and playback (Ao,Ai,Do,Di) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 448 | |
| 449 | * AltSettings 5 corresponds to |
| 450 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 451 | - 16-bit depth, 8-48kHz sample mode |
| 452 | - Synch capture (Ai) and Adaptive playback (Ao,Do) |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 453 | |
| 454 | * AltSettings 6 corresponds to |
| 455 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 456 | - 16-bit depth, 8-48kHz sample mode |
| 457 | - Synch playback (Do), audio format type III IEC1937_AC-3 |
| 458 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 459 | In order to ensure a correct initialization of the device, the driver |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 460 | *must* *know* how the device will be used: |
| 461 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 462 | * if DTS is chosen, only Interface 2 with AltSet nb.6 must be |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 463 | registered |
| 464 | * if 96KHz only AltSets nb.1 of each interface must be selected |
| 465 | * if samples are using 24bits/48KHz then AltSet 2 must me used if |
| 466 | Digital input is connected, and only AltSet nb.3 if Digital input |
| 467 | is not connected |
| 468 | * if samples are using 16bits/48KHz then AltSet 4 must me used if |
| 469 | Digital input is connected, and only AltSet nb.5 if Digital input |
| 470 | is not connected |
| 471 | |
| 472 | When device_setup is given as a parameter to the snd-usb-audio module, the |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 473 | parse_audio_endpoints function uses a quirk called |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 474 | ``audiophile_skip_setting_quirk`` in order to prevent AltSettings not |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 475 | corresponding to device_setup from being registered in the driver. |
| 476 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 477 | Audiophile USB and Jack support |
| 478 | =============================== |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 479 | |
| 480 | This section deals with support of the Audiophile USB device in Jack. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 481 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 482 | There are 2 main potential issues when using Jackd with the device: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 483 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 484 | * support for Big-Endian devices in 24-bit modes |
| 485 | * support for 4-in / 4-out channels |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 486 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 487 | Direct support in Jackd |
| 488 | ----------------------- |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 489 | |
| 490 | Jack supports big endian devices only in recent versions (thanks to |
| 491 | Andreas Steinmetz for his first big-endian patch). I can't remember |
Matt LaPlante | d919588 | 2008-07-25 19:45:33 -0700 | [diff] [blame] | 492 | exactly when this support was released into jackd, let's just say that |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 493 | with jackd version 0.103.0 it's almost ok (just a small bug is affecting |
Matt LaPlante | d919588 | 2008-07-25 19:45:33 -0700 | [diff] [blame] | 494 | 16bits Big-Endian devices, but since you've read carefully the above |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 495 | paragraphs, you're now using kernel >= 2.6.23 and your 16bits devices |
| 496 | are now Little Endians ;-) ). |
| 497 | |
| 498 | You can run jackd with the following command for playback with Ao and |
| 499 | record with Ai: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 500 | :: |
| 501 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 502 | % jackd -R -dalsa -Phw:1,0 -r48000 -p128 -n2 -D -Chw:1,1 |
| 503 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 504 | Using Alsa plughw |
| 505 | ----------------- |
| 506 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 507 | If you don't have a recent Jackd installed, you can downgrade to using |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 508 | the Alsa ``plug`` converter. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 509 | |
| 510 | For instance here is one way to run Jack with 2 playback channels on Ao and 2 |
| 511 | capture channels from Ai: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 512 | :: |
| 513 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 514 | % jackd -R -dalsa -dplughw:1 -r48000 -p256 -n2 -D -Cplughw:1,1 |
| 515 | |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 516 | However you may see the following warning message: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 517 | You appear to be using the ALSA software "plug" layer, probably a result of |
| 518 | using the "default" ALSA device. This is less efficient than it could be. |
| 519 | Consider using a hardware device instead rather than using the plug layer. |
Thibault LE MEUR | e311334 | 2006-03-14 11:44:53 +0100 | [diff] [blame] | 520 | |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 521 | Getting 2 input and/or output interfaces in Jack |
| 522 | ------------------------------------------------ |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 523 | |
| 524 | As you can see, starting the Jack server this way will only enable 1 stereo |
| 525 | input (Di or Ai) and 1 stereo output (Ao or Do). |
| 526 | |
| 527 | This is due to the following restrictions: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 528 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 529 | * Jack can only open one capture device and one playback device at a time |
| 530 | * The Audiophile USB is seen as 2 (or three) Alsa devices: hw:1,0, hw:1,1 |
| 531 | (and optionally hw:1,2) |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 532 | |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 533 | If you want to get Ai+Di and/or Ao+Do support with Jack, you would need to |
| 534 | combine the Alsa devices into one logical "complex" device. |
| 535 | |
| 536 | If you want to give it a try, I recommend reading the information from |
| 537 | this page: http://www.sound-man.co.uk/linuxaudio/ice1712multi.html |
| 538 | It is related to another device (ice1712) but can be adapted to suit |
| 539 | the Audiophile USB. |
| 540 | |
| 541 | Enabling multiple Audiophile USB interfaces for Jackd will certainly require: |
Takashi Iwai | 4e47556 | 2016-11-10 16:52:57 +0100 | [diff] [blame] | 542 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 543 | * Making sure your Jackd version has the MMAP_COMPLEX patch (see the ice1712 page) |
| 544 | * (maybe) patching the alsa-lib/src/pcm/pcm_multi.c file (see the ice1712 page) |
Charis Kouzinopoulos | 5732e7a | 2006-04-18 15:42:29 +0200 | [diff] [blame] | 545 | * define a multi device (combination of hw:1,0 and hw:1,1) in your .asoundrc |
| 546 | file |
| 547 | * start jackd with this device |
| 548 | |
Thibault Le Meur | f8c78b8 | 2007-07-12 11:26:35 +0200 | [diff] [blame] | 549 | I had no success in testing this for now, if you have any success with this kind |
| 550 | of setup, please drop me an email. |