hdspm.rst 9.2 KB

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