0001 =======================================
0002 Software Interface ALSA-DSP MADI Driver
0003 =======================================
0004
0005 (translated from German, so no good English ;-),
0006
0007 2004 - winfried ritsch
0008
0009
0010 Full functionality has been added to the driver. Since some of
0011 the Controls and startup-options are ALSA-Standard and only the
0012 special Controls are described and discussed below.
0013
0014
0015 Hardware functionality
0016 ======================
0017
0018 Audio transmission
0019 ------------------
0020
0021 * number of channels -- depends on transmission mode
0022
0023 The number of channels chosen is from 1..Nmax. The reason to
0024 use for a lower number of channels is only resource allocation,
0025 since unused DMA channels are disabled and less memory is
0026 allocated. So also the throughput of the PCI system can be
0027 scaled. (Only important for low performance boards).
0028
0029 * Single Speed -- 1..64 channels
0030
0031 .. note::
0032 (Note: Choosing the 56channel mode for transmission or as
0033 receiver, only 56 are transmitted/received over the MADI, but
0034 all 64 channels are available for the mixer, so channel count
0035 for the driver)
0036
0037 * Double Speed -- 1..32 channels
0038
0039 .. note::
0040 Note: Choosing the 56-channel mode for
0041 transmission/receive-mode , only 28 are transmitted/received
0042 over the MADI, but all 32 channels are available for the mixer,
0043 so channel count for the driver
0044
0045
0046 * Quad Speed -- 1..16 channels
0047
0048 .. note::
0049 Choosing the 56-channel mode for
0050 transmission/receive-mode , only 14 are transmitted/received
0051 over the MADI, but all 16 channels are available for the mixer,
0052 so channel count for the driver
0053
0054 * Format -- signed 32 Bit Little Endian (SNDRV_PCM_FMTBIT_S32_LE)
0055
0056 * Sample Rates --
0057
0058 Single Speed -- 32000, 44100, 48000
0059
0060 Double Speed -- 64000, 88200, 96000 (untested)
0061
0062 Quad Speed -- 128000, 176400, 192000 (untested)
0063
0064 * access-mode -- MMAP (memory mapped), Not interleaved (PCM_NON-INTERLEAVED)
0065
0066 * buffer-sizes -- 64,128,256,512,1024,2048,8192 Samples
0067
0068 * fragments -- 2
0069
0070 * Hardware-pointer -- 2 Modi
0071
0072
0073 The Card supports the readout of the actual Buffer-pointer,
0074 where DMA reads/writes. Since of the bulk mode of PCI it is only
0075 64 Byte accurate. SO it is not really usable for the
0076 ALSA-mid-level functions (here the buffer-ID gives a better
0077 result), but if MMAP is used by the application. Therefore it
0078 can be configured at load-time with the parameter
0079 precise-pointer.
0080
0081
0082 .. hint::
0083 (Hint: Experimenting I found that the pointer is maximum 64 to
0084 large never to small. So if you subtract 64 you always have a
0085 safe pointer for writing, which is used on this mode inside
0086 ALSA. In theory now you can get now a latency as low as 16
0087 Samples, which is a quarter of the interrupt possibilities.)
0088
0089 * Precise Pointer -- off
0090 interrupt used for pointer-calculation
0091
0092 * Precise Pointer -- on
0093 hardware pointer used.
0094
0095 Controller
0096 ----------
0097
0098 Since DSP-MADI-Mixer has 8152 Fader, it does not make sense to
0099 use the standard mixer-controls, since this would break most of
0100 (especially graphic) ALSA-Mixer GUIs. So Mixer control has be
0101 provided by a 2-dimensional controller using the
0102 hwdep-interface.
0103
0104 Also all 128+256 Peak and RMS-Meter can be accessed via the
0105 hwdep-interface. Since it could be a performance problem always
0106 copying and converting Peak and RMS-Levels even if you just need
0107 one, I decided to export the hardware structure, so that of
0108 needed some driver-guru can implement a memory-mapping of mixer
0109 or peak-meters over ioctl, or also to do only copying and no
0110 conversion. A test-application shows the usage of the controller.
0111
0112 * Latency Controls --- not implemented !!!
0113
0114 .. note::
0115 Note: Within the windows-driver the latency is accessible of a
0116 control-panel, but buffer-sizes are controlled with ALSA from
0117 hwparams-calls and should not be changed in run-state, I did not
0118 implement it here.
0119
0120
0121 * System Clock -- suspended !!!!
0122
0123 * Name -- "System Clock Mode"
0124
0125 * Access -- Read Write
0126
0127 * Values -- "Master" "Slave"
0128
0129 .. note::
0130 !!!! This is a hardware-function but is in conflict with the
0131 Clock-source controller, which is a kind of ALSA-standard. I
0132 makes sense to set the card to a special mode (master at some
0133 frequency or slave), since even not using an Audio-application
0134 a studio should have working synchronisations setup. So use
0135 Clock-source-controller instead !!!!
0136
0137 * Clock Source
0138
0139 * Name -- "Sample Clock Source"
0140
0141 * Access -- Read Write
0142
0143 * Values -- "AutoSync", "Internal 32.0 kHz", "Internal 44.1 kHz",
0144 "Internal 48.0 kHz", "Internal 64.0 kHz", "Internal 88.2 kHz",
0145 "Internal 96.0 kHz"
0146
0147 Choose between Master at a specific Frequency and so also the
0148 Speed-mode or Slave (Autosync). Also see "Preferred Sync Ref"
0149
0150 .. warning::
0151 !!!! This is no pure hardware function but was implemented by
0152 ALSA by some ALSA-drivers before, so I use it also. !!!
0153
0154
0155 * Preferred Sync Ref
0156
0157 * Name -- "Preferred Sync Reference"
0158
0159 * Access -- Read Write
0160
0161 * Values -- "Word" "MADI"
0162
0163
0164 Within the Auto-sync-Mode the preferred Sync Source can be
0165 chosen. If it is not available another is used if possible.
0166
0167 .. note::
0168 Note: Since MADI has a much higher bit-rate than word-clock, the
0169 card should synchronise better in MADI Mode. But since the
0170 RME-PLL is very good, there are almost no problems with
0171 word-clock too. I never found a difference.
0172
0173
0174 * TX 64 channel
0175
0176 * Name -- "TX 64 channels mode"
0177
0178 * Access -- Read Write
0179
0180 * Values -- 0 1
0181
0182 Using 64-channel-modus (1) or 56-channel-modus for
0183 MADI-transmission (0).
0184
0185
0186 .. note::
0187 Note: This control is for output only. Input-mode is detected
0188 automatically from hardware sending MADI.
0189
0190
0191 * Clear TMS
0192
0193 * Name -- "Clear Track Marker"
0194
0195 * Access -- Read Write
0196
0197 * Values -- 0 1
0198
0199
0200 Don't use to lower 5 Audio-bits on AES as additional Bits.
0201
0202
0203 * Safe Mode oder Auto Input
0204
0205 * Name -- "Safe Mode"
0206
0207 * Access -- Read Write
0208
0209 * Values -- 0 1 (default on)
0210
0211 If on (1), then if either the optical or coaxial connection
0212 has a failure, there is a takeover to the working one, with no
0213 sample failure. Its only useful if you use the second as a
0214 backup connection.
0215
0216 * Input
0217
0218 * Name -- "Input Select"
0219
0220 * Access -- Read Write
0221
0222 * Values -- optical coaxial
0223
0224
0225 Choosing the Input, optical or coaxial. If Safe-mode is active,
0226 this is the preferred Input.
0227
0228 Mixer
0229 -----
0230
0231 * Mixer
0232
0233 * Name -- "Mixer"
0234
0235 * Access -- Read Write
0236
0237 * Values - <channel-number 0-127> <Value 0-65535>
0238
0239
0240 Here as a first value the channel-index is taken to get/set the
0241 corresponding mixer channel, where 0-63 are the input to output
0242 fader and 64-127 the playback to outputs fader. Value 0
0243 is channel muted 0 and 32768 an amplification of 1.
0244
0245 * Chn 1-64
0246
0247 fast mixer for the ALSA-mixer utils. The diagonal of the
0248 mixer-matrix is implemented from playback to output.
0249
0250
0251 * Line Out
0252
0253 * Name -- "Line Out"
0254
0255 * Access -- Read Write
0256
0257 * Values -- 0 1
0258
0259 Switching on and off the analog out, which has nothing to do
0260 with mixing or routing. the analog outs reflects channel 63,64.
0261
0262
0263 Information (only read access)
0264 ------------------------------
0265
0266 * Sample Rate
0267
0268 * Name -- "System Sample Rate"
0269
0270 * Access -- Read-only
0271
0272 getting the sample rate.
0273
0274
0275 * External Rate measured
0276
0277 * Name -- "External Rate"
0278
0279 * Access -- Read only
0280
0281
0282 Should be "Autosync Rate", but Name used is
0283 ALSA-Scheme. External Sample frequency liked used on Autosync is
0284 reported.
0285
0286
0287 * MADI Sync Status
0288
0289 * Name -- "MADI Sync Lock Status"
0290
0291 * Access -- Read
0292
0293 * Values -- 0,1,2
0294
0295 MADI-Input is 0=Unlocked, 1=Locked, or 2=Synced.
0296
0297
0298 * Word Clock Sync Status
0299
0300 * Name -- "Word Clock Lock Status"
0301
0302 * Access -- Read
0303
0304 * Values -- 0,1,2
0305
0306 Word Clock Input is 0=Unlocked, 1=Locked, or 2=Synced.
0307
0308 * AutoSync
0309
0310 * Name -- "AutoSync Reference"
0311
0312 * Access -- Read
0313
0314 * Values -- "WordClock", "MADI", "None"
0315
0316 Sync-Reference is either "WordClock", "MADI" or none.
0317
0318 * RX 64ch --- noch nicht implementiert
0319
0320 MADI-Receiver is in 64 channel mode oder 56 channel mode.
0321
0322
0323 * AB_inp --- not tested
0324
0325 Used input for Auto-Input.
0326
0327
0328 * actual Buffer Position --- not implemented
0329
0330 !!! this is a ALSA internal function, so no control is used !!!
0331
0332
0333
0334 Calling Parameter
0335 =================
0336
0337 * index int array (min = 1, max = 8)
0338
0339 Index value for RME HDSPM interface. card-index within ALSA
0340
0341 note: ALSA-standard
0342
0343 * id string array (min = 1, max = 8)
0344
0345 ID string for RME HDSPM interface.
0346
0347 note: ALSA-standard
0348
0349 * enable int array (min = 1, max = 8)
0350
0351 Enable/disable specific HDSPM sound-cards.
0352
0353 note: ALSA-standard
0354
0355 * precise_ptr int array (min = 1, max = 8)
0356
0357 Enable precise pointer, or disable.
0358
0359 .. note::
0360 note: Use only when the application supports this (which is a special case).
0361
0362 * line_outs_monitor int array (min = 1, max = 8)
0363
0364 Send playback streams to analog outs by default.
0365
0366 .. note::
0367 note: each playback channel is mixed to the same numbered output
0368 channel (routed). This is against the ALSA-convention, where all
0369 channels have to be muted on after loading the driver, but was
0370 used before on other cards, so i historically use it again)
0371
0372
0373
0374 * enable_monitor int array (min = 1, max = 8)
0375
0376 Enable Analog Out on Channel 63/64 by default.
0377
0378 .. note ::
0379 note: here the analog output is enabled (but not routed).