msnd_pinnacle.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /*********************************************************************
  2. *
  3. * msnd_pinnacle.h
  4. *
  5. * Turtle Beach MultiSound Sound Card Driver for Linux
  6. *
  7. * Some parts of this header file were derived from the Turtle Beach
  8. * MultiSound Driver Development Kit.
  9. *
  10. * Copyright (C) 1998 Andrew Veliath
  11. * Copyright (C) 1993 Turtle Beach Systems, Inc.
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. *
  27. ********************************************************************/
  28. #ifndef __MSND_PINNACLE_H
  29. #define __MSND_PINNACLE_H
  30. #define DSP_NUMIO 0x08
  31. #define IREG_LOGDEVICE 0x07
  32. #define IREG_ACTIVATE 0x30
  33. #define LD_ACTIVATE 0x01
  34. #define LD_DISACTIVATE 0x00
  35. #define IREG_EECONTROL 0x3F
  36. #define IREG_MEMBASEHI 0x40
  37. #define IREG_MEMBASELO 0x41
  38. #define IREG_MEMCONTROL 0x42
  39. #define IREG_MEMRANGEHI 0x43
  40. #define IREG_MEMRANGELO 0x44
  41. #define MEMTYPE_8BIT 0x00
  42. #define MEMTYPE_16BIT 0x02
  43. #define MEMTYPE_RANGE 0x00
  44. #define MEMTYPE_HIADDR 0x01
  45. #define IREG_IO0_BASEHI 0x60
  46. #define IREG_IO0_BASELO 0x61
  47. #define IREG_IO1_BASEHI 0x62
  48. #define IREG_IO1_BASELO 0x63
  49. #define IREG_IRQ_NUMBER 0x70
  50. #define IREG_IRQ_TYPE 0x71
  51. #define IRQTYPE_HIGH 0x02
  52. #define IRQTYPE_LOW 0x00
  53. #define IRQTYPE_LEVEL 0x01
  54. #define IRQTYPE_EDGE 0x00
  55. #define HP_DSPR 0x04
  56. #define HP_BLKS 0x04
  57. #define HPDSPRESET_OFF 2
  58. #define HPDSPRESET_ON 0
  59. #define HPBLKSEL_0 2
  60. #define HPBLKSEL_1 3
  61. #define HIMT_DAT_OFF 0x03
  62. #define HIDSP_PLAY_UNDER 0x00
  63. #define HIDSP_INT_PLAY_UNDER 0x01
  64. #define HIDSP_SSI_TX_UNDER 0x02
  65. #define HIDSP_RECQ_OVERFLOW 0x08
  66. #define HIDSP_INT_RECORD_OVER 0x09
  67. #define HIDSP_SSI_RX_OVERFLOW 0x0a
  68. #define HIDSP_MIDI_IN_OVER 0x10
  69. #define HIDSP_MIDI_FRAME_ERR 0x11
  70. #define HIDSP_MIDI_PARITY_ERR 0x12
  71. #define HIDSP_MIDI_OVERRUN_ERR 0x13
  72. #define HIDSP_INPUT_CLIPPING 0x20
  73. #define HIDSP_MIX_CLIPPING 0x30
  74. #define HIDSP_DAT_IN_OFF 0x21
  75. #define HDEXAR_SET_ANA_IN 0
  76. #define HDEXAR_CLEAR_PEAKS 1
  77. #define HDEXAR_IN_SET_POTS 2
  78. #define HDEXAR_AUX_SET_POTS 3
  79. #define HDEXAR_CAL_A_TO_D 4
  80. #define HDEXAR_RD_EXT_DSP_BITS 5
  81. #define HDEXAR_SET_SYNTH_IN 4
  82. #define HDEXAR_READ_DAT_IN 5
  83. #define HDEXAR_MIC_SET_POTS 6
  84. #define HDEXAR_SET_DAT_IN 7
  85. #define HDEXAR_SET_SYNTH_48 8
  86. #define HDEXAR_SET_SYNTH_44 9
  87. #define TIME_PRO_RESET_DONE 0x028A
  88. #define TIME_PRO_SYSEX 0x001E
  89. #define TIME_PRO_RESET 0x0032
  90. #define AGND 0x01
  91. #define SIGNAL 0x02
  92. #define EXT_DSP_BIT_DCAL 0x0001
  93. #define EXT_DSP_BIT_MIDI_CON 0x0002
  94. #define BUFFSIZE 0x8000
  95. #define HOSTQ_SIZE 0x40
  96. #define SRAM_CNTL_START 0x7F00
  97. #define SMA_STRUCT_START 0x7F40
  98. #define DAP_BUFF_SIZE 0x2400
  99. #define DAR_BUFF_SIZE 0x2000
  100. #define DAPQ_STRUCT_SIZE 0x10
  101. #define DARQ_STRUCT_SIZE 0x10
  102. #define DAPQ_BUFF_SIZE (3 * 0x10)
  103. #define DARQ_BUFF_SIZE (3 * 0x10)
  104. #define MODQ_BUFF_SIZE 0x400
  105. #define MIDQ_BUFF_SIZE 0x800
  106. #define DSPQ_BUFF_SIZE 0x5A0
  107. #define DAPQ_DATA_BUFF 0x6C00
  108. #define DARQ_DATA_BUFF 0x6C30
  109. #define MODQ_DATA_BUFF 0x6C60
  110. #define MIDQ_DATA_BUFF 0x7060
  111. #define DSPQ_DATA_BUFF 0x7860
  112. #define DAPQ_OFFSET SRAM_CNTL_START
  113. #define DARQ_OFFSET (SRAM_CNTL_START + 0x08)
  114. #define MODQ_OFFSET (SRAM_CNTL_START + 0x10)
  115. #define MIDQ_OFFSET (SRAM_CNTL_START + 0x18)
  116. #define DSPQ_OFFSET (SRAM_CNTL_START + 0x20)
  117. #define MOP_WAVEHDR 0
  118. #define MOP_EXTOUT 1
  119. #define MOP_HWINIT 0xfe
  120. #define MOP_NONE 0xff
  121. #define MOP_MAX 1
  122. #define MIP_EXTIN 0
  123. #define MIP_WAVEHDR 1
  124. #define MIP_HWINIT 0xfe
  125. #define MIP_MAX 1
  126. /* Pinnacle/Fiji SMA Common Data */
  127. #define SMA_wCurrPlayBytes 0x0000
  128. #define SMA_wCurrRecordBytes 0x0002
  129. #define SMA_wCurrPlayVolLeft 0x0004
  130. #define SMA_wCurrPlayVolRight 0x0006
  131. #define SMA_wCurrInVolLeft 0x0008
  132. #define SMA_wCurrInVolRight 0x000a
  133. #define SMA_wCurrMHdrVolLeft 0x000c
  134. #define SMA_wCurrMHdrVolRight 0x000e
  135. #define SMA_dwCurrPlayPitch 0x0010
  136. #define SMA_dwCurrPlayRate 0x0014
  137. #define SMA_wCurrMIDIIOPatch 0x0018
  138. #define SMA_wCurrPlayFormat 0x001a
  139. #define SMA_wCurrPlaySampleSize 0x001c
  140. #define SMA_wCurrPlayChannels 0x001e
  141. #define SMA_wCurrPlaySampleRate 0x0020
  142. #define SMA_wCurrRecordFormat 0x0022
  143. #define SMA_wCurrRecordSampleSize 0x0024
  144. #define SMA_wCurrRecordChannels 0x0026
  145. #define SMA_wCurrRecordSampleRate 0x0028
  146. #define SMA_wCurrDSPStatusFlags 0x002a
  147. #define SMA_wCurrHostStatusFlags 0x002c
  148. #define SMA_wCurrInputTagBits 0x002e
  149. #define SMA_wCurrLeftPeak 0x0030
  150. #define SMA_wCurrRightPeak 0x0032
  151. #define SMA_bMicPotPosLeft 0x0034
  152. #define SMA_bMicPotPosRight 0x0035
  153. #define SMA_bMicPotMaxLeft 0x0036
  154. #define SMA_bMicPotMaxRight 0x0037
  155. #define SMA_bInPotPosLeft 0x0038
  156. #define SMA_bInPotPosRight 0x0039
  157. #define SMA_bAuxPotPosLeft 0x003a
  158. #define SMA_bAuxPotPosRight 0x003b
  159. #define SMA_bInPotMaxLeft 0x003c
  160. #define SMA_bInPotMaxRight 0x003d
  161. #define SMA_bAuxPotMaxLeft 0x003e
  162. #define SMA_bAuxPotMaxRight 0x003f
  163. #define SMA_bInPotMaxMethod 0x0040
  164. #define SMA_bAuxPotMaxMethod 0x0041
  165. #define SMA_wCurrMastVolLeft 0x0042
  166. #define SMA_wCurrMastVolRight 0x0044
  167. #define SMA_wCalFreqAtoD 0x0046
  168. #define SMA_wCurrAuxVolLeft 0x0048
  169. #define SMA_wCurrAuxVolRight 0x004a
  170. #define SMA_wCurrPlay1VolLeft 0x004c
  171. #define SMA_wCurrPlay1VolRight 0x004e
  172. #define SMA_wCurrPlay2VolLeft 0x0050
  173. #define SMA_wCurrPlay2VolRight 0x0052
  174. #define SMA_wCurrPlay3VolLeft 0x0054
  175. #define SMA_wCurrPlay3VolRight 0x0056
  176. #define SMA_wCurrPlay4VolLeft 0x0058
  177. #define SMA_wCurrPlay4VolRight 0x005a
  178. #define SMA_wCurrPlay1PeakLeft 0x005c
  179. #define SMA_wCurrPlay1PeakRight 0x005e
  180. #define SMA_wCurrPlay2PeakLeft 0x0060
  181. #define SMA_wCurrPlay2PeakRight 0x0062
  182. #define SMA_wCurrPlay3PeakLeft 0x0064
  183. #define SMA_wCurrPlay3PeakRight 0x0066
  184. #define SMA_wCurrPlay4PeakLeft 0x0068
  185. #define SMA_wCurrPlay4PeakRight 0x006a
  186. #define SMA_wCurrPlayPeakLeft 0x006c
  187. #define SMA_wCurrPlayPeakRight 0x006e
  188. #define SMA_wCurrDATSR 0x0070
  189. #define SMA_wCurrDATRXCHNL 0x0072
  190. #define SMA_wCurrDATTXCHNL 0x0074
  191. #define SMA_wCurrDATRXRate 0x0076
  192. #define SMA_dwDSPPlayCount 0x0078
  193. #define SMA__size 0x007c
  194. #ifdef HAVE_DSPCODEH
  195. # include "pndsperm.c"
  196. # include "pndspini.c"
  197. # define PERMCODE pndsperm
  198. # define INITCODE pndspini
  199. # define PERMCODESIZE sizeof(pndsperm)
  200. # define INITCODESIZE sizeof(pndspini)
  201. #else
  202. # ifndef CONFIG_MSNDPIN_INIT_FILE
  203. # define CONFIG_MSNDPIN_INIT_FILE \
  204. "/etc/sound/pndspini.bin"
  205. # endif
  206. # ifndef CONFIG_MSNDPIN_PERM_FILE
  207. # define CONFIG_MSNDPIN_PERM_FILE \
  208. "/etc/sound/pndsperm.bin"
  209. # endif
  210. # define PERMCODEFILE CONFIG_MSNDPIN_PERM_FILE
  211. # define INITCODEFILE CONFIG_MSNDPIN_INIT_FILE
  212. # define PERMCODE dspini
  213. # define INITCODE permini
  214. # define PERMCODESIZE sizeof_dspini
  215. # define INITCODESIZE sizeof_permini
  216. #endif
  217. #define LONGNAME "MultiSound (Pinnacle/Fiji)"
  218. #endif /* __MSND_PINNACLE_H */