]>
Commit | Line | Data |
---|---|---|
c79b5bb0 | 1 | ======================================= |
5470440a | 2 | Software Interface ALSA-DSP MADI Driver |
c79b5bb0 | 3 | ======================================= |
5470440a TI |
4 | |
5 | (translated from German, so no good English ;-), | |
5470440a | 6 | |
c79b5bb0 | 7 | 2004 - winfried ritsch |
5470440a | 8 | |
5470440a | 9 | |
c79b5bb0 TI |
10 | Full functionality has been added to the driver. Since some of |
11 | the Controls and startup-options are ALSA-Standard and only the | |
12 | special Controls are described and discussed below. | |
5470440a | 13 | |
5470440a | 14 | |
c79b5bb0 TI |
15 | Hardware functionality |
16 | ====================== | |
5470440a | 17 | |
c79b5bb0 TI |
18 | Audio transmission |
19 | ------------------ | |
5470440a | 20 | |
c79b5bb0 | 21 | * number of channels -- depends on transmission mode |
5470440a TI |
22 | |
23 | The number of channels chosen is from 1..Nmax. The reason to | |
24 | use for a lower number of channels is only resource allocation, | |
25 | since unused DMA channels are disabled and less memory is | |
26 | allocated. So also the throughput of the PCI system can be | |
27 | scaled. (Only important for low performance boards). | |
28 | ||
c79b5bb0 | 29 | * Single Speed -- 1..64 channels |
5470440a | 30 | |
c79b5bb0 | 31 | .. note:: |
5470440a TI |
32 | (Note: Choosing the 56channel mode for transmission or as |
33 | receiver, only 56 are transmitted/received over the MADI, but | |
34 | all 64 channels are available for the mixer, so channel count | |
35 | for the driver) | |
36 | ||
c79b5bb0 | 37 | * Double Speed -- 1..32 channels |
5470440a | 38 | |
c79b5bb0 | 39 | .. note:: |
5470440a TI |
40 | Note: Choosing the 56-channel mode for |
41 | transmission/receive-mode , only 28 are transmitted/received | |
42 | over the MADI, but all 32 channels are available for the mixer, | |
43 | so channel count for the driver | |
44 | ||
45 | ||
c79b5bb0 | 46 | * Quad Speed -- 1..16 channels |
5470440a | 47 | |
c79b5bb0 TI |
48 | .. note:: |
49 | Choosing the 56-channel mode for | |
5470440a TI |
50 | transmission/receive-mode , only 14 are transmitted/received |
51 | over the MADI, but all 16 channels are available for the mixer, | |
52 | so channel count for the driver | |
53 | ||
c79b5bb0 | 54 | * Format -- signed 32 Bit Little Endian (SNDRV_PCM_FMTBIT_S32_LE) |
5470440a | 55 | |
c79b5bb0 | 56 | * Sample Rates -- |
5470440a TI |
57 | |
58 | Single Speed -- 32000, 44100, 48000 | |
59 | ||
60 | Double Speed -- 64000, 88200, 96000 (untested) | |
61 | ||
62 | Quad Speed -- 128000, 176400, 192000 (untested) | |
63 | ||
c79b5bb0 | 64 | * access-mode -- MMAP (memory mapped), Not interleaved (PCM_NON-INTERLEAVED) |
5470440a | 65 | |
c79b5bb0 | 66 | * buffer-sizes -- 64,128,256,512,1024,2048,8192 Samples |
5470440a | 67 | |
c79b5bb0 | 68 | * fragments -- 2 |
5470440a | 69 | |
c79b5bb0 | 70 | * Hardware-pointer -- 2 Modi |
5470440a TI |
71 | |
72 | ||
73 | The Card supports the readout of the actual Buffer-pointer, | |
74 | where DMA reads/writes. Since of the bulk mode of PCI it is only | |
75 | 64 Byte accurate. SO it is not really usable for the | |
76 | ALSA-mid-level functions (here the buffer-ID gives a better | |
77 | result), but if MMAP is used by the application. Therefore it | |
78 | can be configured at load-time with the parameter | |
79 | precise-pointer. | |
80 | ||
81 | ||
c79b5bb0 | 82 | .. hint:: |
5470440a TI |
83 | (Hint: Experimenting I found that the pointer is maximum 64 to |
84 | large never to small. So if you subtract 64 you always have a | |
85 | safe pointer for writing, which is used on this mode inside | |
86 | ALSA. In theory now you can get now a latency as low as 16 | |
87 | Samples, which is a quarter of the interrupt possibilities.) | |
88 | ||
c79b5bb0 | 89 | * Precise Pointer -- off |
5470440a | 90 | interrupt used for pointer-calculation |
c79b5bb0 TI |
91 | |
92 | * Precise Pointer -- on | |
5470440a TI |
93 | hardware pointer used. |
94 | ||
c79b5bb0 TI |
95 | Controller |
96 | ---------- | |
5470440a | 97 | |
c79b5bb0 TI |
98 | Since DSP-MADI-Mixer has 8152 Fader, it does not make sense to |
99 | use the standard mixer-controls, since this would break most of | |
100 | (especially graphic) ALSA-Mixer GUIs. So Mixer control has be | |
101 | provided by a 2-dimensional controller using the | |
102 | hwdep-interface. | |
5470440a | 103 | |
c79b5bb0 TI |
104 | Also all 128+256 Peak and RMS-Meter can be accessed via the |
105 | hwdep-interface. Since it could be a performance problem always | |
106 | copying and converting Peak and RMS-Levels even if you just need | |
107 | one, I decided to export the hardware structure, so that of | |
108 | needed some driver-guru can implement a memory-mapping of mixer | |
109 | or peak-meters over ioctl, or also to do only copying and no | |
110 | conversion. A test-application shows the usage of the controller. | |
5470440a | 111 | |
c79b5bb0 | 112 | * Latency Controls --- not implemented !!! |
5470440a | 113 | |
c79b5bb0 | 114 | .. note:: |
5470440a TI |
115 | Note: Within the windows-driver the latency is accessible of a |
116 | control-panel, but buffer-sizes are controlled with ALSA from | |
117 | hwparams-calls and should not be changed in run-state, I did not | |
118 | implement it here. | |
119 | ||
120 | ||
c79b5bb0 | 121 | * System Clock -- suspended !!!! |
5470440a | 122 | |
c79b5bb0 | 123 | * Name -- "System Clock Mode" |
5470440a | 124 | |
c79b5bb0 TI |
125 | * Access -- Read Write |
126 | ||
127 | * Values -- "Master" "Slave" | |
5470440a | 128 | |
c79b5bb0 | 129 | .. note:: |
5470440a TI |
130 | !!!! This is a hardware-function but is in conflict with the |
131 | Clock-source controller, which is a kind of ALSA-standard. I | |
132 | makes sense to set the card to a special mode (master at some | |
133 | frequency or slave), since even not using an Audio-application | |
134 | a studio should have working synchronisations setup. So use | |
135 | Clock-source-controller instead !!!! | |
136 | ||
c79b5bb0 | 137 | * Clock Source |
5470440a | 138 | |
c79b5bb0 | 139 | * Name -- "Sample Clock Source" |
5470440a | 140 | |
c79b5bb0 | 141 | * Access -- Read Write |
5470440a | 142 | |
c79b5bb0 TI |
143 | * Values -- "AutoSync", "Internal 32.0 kHz", "Internal 44.1 kHz", |
144 | "Internal 48.0 kHz", "Internal 64.0 kHz", "Internal 88.2 kHz", | |
145 | "Internal 96.0 kHz" | |
5470440a TI |
146 | |
147 | Choose between Master at a specific Frequency and so also the | |
148 | Speed-mode or Slave (Autosync). Also see "Preferred Sync Ref" | |
149 | ||
c79b5bb0 | 150 | .. warning:: |
5470440a TI |
151 | !!!! This is no pure hardware function but was implemented by |
152 | ALSA by some ALSA-drivers before, so I use it also. !!! | |
153 | ||
154 | ||
c79b5bb0 | 155 | * Preferred Sync Ref |
5470440a | 156 | |
c79b5bb0 | 157 | * Name -- "Preferred Sync Reference" |
5470440a | 158 | |
c79b5bb0 | 159 | * Access -- Read Write |
5470440a | 160 | |
c79b5bb0 | 161 | * Values -- "Word" "MADI" |
5470440a TI |
162 | |
163 | ||
164 | Within the Auto-sync-Mode the preferred Sync Source can be | |
165 | chosen. If it is not available another is used if possible. | |
166 | ||
c79b5bb0 | 167 | .. note:: |
5470440a TI |
168 | Note: Since MADI has a much higher bit-rate than word-clock, the |
169 | card should synchronise better in MADI Mode. But since the | |
170 | RME-PLL is very good, there are almost no problems with | |
171 | word-clock too. I never found a difference. | |
172 | ||
173 | ||
c79b5bb0 | 174 | * TX 64 channel |
5470440a | 175 | |
c79b5bb0 | 176 | * Name -- "TX 64 channels mode" |
5470440a | 177 | |
c79b5bb0 | 178 | * Access -- Read Write |
5470440a | 179 | |
c79b5bb0 | 180 | * Values -- 0 1 |
5470440a TI |
181 | |
182 | Using 64-channel-modus (1) or 56-channel-modus for | |
183 | MADI-transmission (0). | |
184 | ||
185 | ||
c79b5bb0 | 186 | .. note:: |
5470440a TI |
187 | Note: This control is for output only. Input-mode is detected |
188 | automatically from hardware sending MADI. | |
189 | ||
190 | ||
c79b5bb0 | 191 | * Clear TMS |
5470440a | 192 | |
c79b5bb0 | 193 | * Name -- "Clear Track Marker" |
5470440a | 194 | |
c79b5bb0 | 195 | * Access -- Read Write |
5470440a | 196 | |
c79b5bb0 | 197 | * Values -- 0 1 |
5470440a TI |
198 | |
199 | ||
200 | Don't use to lower 5 Audio-bits on AES as additional Bits. | |
201 | ||
202 | ||
c79b5bb0 | 203 | * Safe Mode oder Auto Input |
5470440a | 204 | |
c79b5bb0 | 205 | * Name -- "Safe Mode" |
5470440a | 206 | |
c79b5bb0 | 207 | * Access -- Read Write |
5470440a | 208 | |
c79b5bb0 | 209 | * Values -- 0 1 (default on) |
5470440a TI |
210 | |
211 | If on (1), then if either the optical or coaxial connection | |
212 | has a failure, there is a takeover to the working one, with no | |
213 | sample failure. Its only useful if you use the second as a | |
214 | backup connection. | |
215 | ||
c79b5bb0 | 216 | * Input |
5470440a | 217 | |
c79b5bb0 | 218 | * Name -- "Input Select" |
5470440a | 219 | |
c79b5bb0 | 220 | * Access -- Read Write |
5470440a | 221 | |
c79b5bb0 | 222 | * Values -- optical coaxial |
5470440a TI |
223 | |
224 | ||
225 | Choosing the Input, optical or coaxial. If Safe-mode is active, | |
226 | this is the preferred Input. | |
227 | ||
c79b5bb0 TI |
228 | Mixer |
229 | ----- | |
5470440a | 230 | |
c79b5bb0 | 231 | * Mixer |
5470440a | 232 | |
c79b5bb0 | 233 | * Name -- "Mixer" |
5470440a | 234 | |
c79b5bb0 | 235 | * Access -- Read Write |
5470440a | 236 | |
c79b5bb0 | 237 | * Values - <channel-number 0-127> <Value 0-65535> |
5470440a TI |
238 | |
239 | ||
240 | Here as a first value the channel-index is taken to get/set the | |
241 | corresponding mixer channel, where 0-63 are the input to output | |
242 | fader and 64-127 the playback to outputs fader. Value 0 | |
243 | is channel muted 0 and 32768 an amplification of 1. | |
244 | ||
c79b5bb0 | 245 | * Chn 1-64 |
5470440a TI |
246 | |
247 | fast mixer for the ALSA-mixer utils. The diagonal of the | |
248 | mixer-matrix is implemented from playback to output. | |
249 | ||
250 | ||
c79b5bb0 | 251 | * Line Out |
5470440a | 252 | |
c79b5bb0 | 253 | * Name -- "Line Out" |
5470440a | 254 | |
c79b5bb0 | 255 | * Access -- Read Write |
5470440a | 256 | |
c79b5bb0 | 257 | * Values -- 0 1 |
5470440a TI |
258 | |
259 | Switching on and off the analog out, which has nothing to do | |
260 | with mixing or routing. the analog outs reflects channel 63,64. | |
261 | ||
262 | ||
c79b5bb0 TI |
263 | Information (only read access) |
264 | ------------------------------ | |
5470440a | 265 | |
c79b5bb0 | 266 | * Sample Rate |
5470440a | 267 | |
c79b5bb0 | 268 | * Name -- "System Sample Rate" |
5470440a | 269 | |
c79b5bb0 | 270 | * Access -- Read-only |
5470440a TI |
271 | |
272 | getting the sample rate. | |
273 | ||
274 | ||
c79b5bb0 | 275 | * External Rate measured |
5470440a | 276 | |
c79b5bb0 | 277 | * Name -- "External Rate" |
5470440a | 278 | |
c79b5bb0 | 279 | * Access -- Read only |
5470440a TI |
280 | |
281 | ||
282 | Should be "Autosync Rate", but Name used is | |
283 | ALSA-Scheme. External Sample frequency liked used on Autosync is | |
284 | reported. | |
285 | ||
286 | ||
c79b5bb0 | 287 | * MADI Sync Status |
5470440a | 288 | |
c79b5bb0 | 289 | * Name -- "MADI Sync Lock Status" |
5470440a | 290 | |
c79b5bb0 | 291 | * Access -- Read |
5470440a | 292 | |
c79b5bb0 | 293 | * Values -- 0,1,2 |
5470440a TI |
294 | |
295 | MADI-Input is 0=Unlocked, 1=Locked, or 2=Synced. | |
296 | ||
297 | ||
c79b5bb0 | 298 | * Word Clock Sync Status |
5470440a | 299 | |
c79b5bb0 | 300 | * Name -- "Word Clock Lock Status" |
5470440a | 301 | |
c79b5bb0 | 302 | * Access -- Read |
5470440a | 303 | |
c79b5bb0 | 304 | * Values -- 0,1,2 |
5470440a TI |
305 | |
306 | Word Clock Input is 0=Unlocked, 1=Locked, or 2=Synced. | |
307 | ||
c79b5bb0 | 308 | * AutoSync |
5470440a | 309 | |
c79b5bb0 | 310 | * Name -- "AutoSync Reference" |
5470440a | 311 | |
c79b5bb0 | 312 | * Access -- Read |
5470440a | 313 | |
c79b5bb0 | 314 | * Values -- "WordClock", "MADI", "None" |
5470440a TI |
315 | |
316 | Sync-Reference is either "WordClock", "MADI" or none. | |
317 | ||
c79b5bb0 | 318 | * RX 64ch --- noch nicht implementiert |
5470440a TI |
319 | |
320 | MADI-Receiver is in 64 channel mode oder 56 channel mode. | |
321 | ||
322 | ||
c79b5bb0 | 323 | * AB_inp --- not tested |
5470440a TI |
324 | |
325 | Used input for Auto-Input. | |
326 | ||
327 | ||
c79b5bb0 | 328 | * actual Buffer Position --- not implemented |
5470440a TI |
329 | |
330 | !!! this is a ALSA internal function, so no control is used !!! | |
331 | ||
332 | ||
333 | ||
c79b5bb0 TI |
334 | Calling Parameter |
335 | ================= | |
336 | ||
337 | * index int array (min = 1, max = 8) | |
5470440a | 338 | |
c79b5bb0 | 339 | Index value for RME HDSPM interface. card-index within ALSA |
5470440a TI |
340 | |
341 | note: ALSA-standard | |
342 | ||
c79b5bb0 TI |
343 | * id string array (min = 1, max = 8) |
344 | ||
345 | ID string for RME HDSPM interface. | |
5470440a TI |
346 | |
347 | note: ALSA-standard | |
348 | ||
c79b5bb0 TI |
349 | * enable int array (min = 1, max = 8) |
350 | ||
351 | Enable/disable specific HDSPM sound-cards. | |
5470440a TI |
352 | |
353 | note: ALSA-standard | |
354 | ||
c79b5bb0 | 355 | * precise_ptr int array (min = 1, max = 8) |
5470440a | 356 | |
c79b5bb0 TI |
357 | Enable precise pointer, or disable. |
358 | ||
359 | .. note:: | |
5470440a TI |
360 | note: Use only when the application supports this (which is a special case). |
361 | ||
c79b5bb0 | 362 | * line_outs_monitor int array (min = 1, max = 8) |
5470440a | 363 | |
c79b5bb0 | 364 | Send playback streams to analog outs by default. |
5470440a | 365 | |
c79b5bb0 | 366 | .. note:: |
5470440a TI |
367 | note: each playback channel is mixed to the same numbered output |
368 | channel (routed). This is against the ALSA-convention, where all | |
369 | channels have to be muted on after loading the driver, but was | |
370 | used before on other cards, so i historically use it again) | |
371 | ||
372 | ||
373 | ||
c79b5bb0 TI |
374 | * enable_monitor int array (min = 1, max = 8) |
375 | ||
376 | Enable Analog Out on Channel 63/64 by default. | |
5470440a | 377 | |
c79b5bb0 | 378 | .. note :: |
f9028317 | 379 | note: here the analog output is enabled (but not routed). |