hdspm.txt 9.2 KB

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