emu10k1.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. /*
  3. * Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
  4. * Creative Labs, Inc.
  5. * Definitions for EMU10K1 (SB Live!) chips
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. */
  23. #ifndef _UAPI__SOUND_EMU10K1_H
  24. #define _UAPI__SOUND_EMU10K1_H
  25. #include <linux/types.h>
  26. #include <sound/asound.h>
  27. /*
  28. * ---- FX8010 ----
  29. */
  30. #define EMU10K1_CARD_CREATIVE 0x00000000
  31. #define EMU10K1_CARD_EMUAPS 0x00000001
  32. #define EMU10K1_FX8010_PCM_COUNT 8
  33. /*
  34. * Following definition is copied from linux/types.h to support compiling
  35. * this header file in userspace since they are not generally available for
  36. * uapi headers.
  37. */
  38. #define __EMU10K1_DECLARE_BITMAP(name,bits) \
  39. unsigned long name[(bits) / (sizeof(unsigned long) * 8)]
  40. /* instruction set */
  41. #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */
  42. #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */
  43. #define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */
  44. #define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */
  45. #define iMACINT0 0x04 /* R = A + X * Y ; saturation */
  46. #define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */
  47. #define iACC3 0x06 /* R = A + X + Y ; saturation */
  48. #define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */
  49. #define iANDXOR 0x08 /* R = (A & X) ^ Y */
  50. #define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */
  51. #define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */
  52. #define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */
  53. #define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */
  54. #define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */
  55. #define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */
  56. #define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */
  57. /* GPRs */
  58. #define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */
  59. #define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */
  60. #define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */
  61. #define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */
  62. /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */
  63. #define C_00000000 0x40
  64. #define C_00000001 0x41
  65. #define C_00000002 0x42
  66. #define C_00000003 0x43
  67. #define C_00000004 0x44
  68. #define C_00000008 0x45
  69. #define C_00000010 0x46
  70. #define C_00000020 0x47
  71. #define C_00000100 0x48
  72. #define C_00010000 0x49
  73. #define C_00080000 0x4a
  74. #define C_10000000 0x4b
  75. #define C_20000000 0x4c
  76. #define C_40000000 0x4d
  77. #define C_80000000 0x4e
  78. #define C_7fffffff 0x4f
  79. #define C_ffffffff 0x50
  80. #define C_fffffffe 0x51
  81. #define C_c0000000 0x52
  82. #define C_4f1bbcdc 0x53
  83. #define C_5a7ef9db 0x54
  84. #define C_00100000 0x55 /* ?? */
  85. #define GPR_ACCU 0x56 /* ACCUM, accumulator */
  86. #define GPR_COND 0x57 /* CCR, condition register */
  87. #define GPR_NOISE0 0x58 /* noise source */
  88. #define GPR_NOISE1 0x59 /* noise source */
  89. #define GPR_IRQ 0x5a /* IRQ register */
  90. #define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */
  91. #define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */
  92. #define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
  93. #define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
  94. #define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
  95. #define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
  96. #define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
  97. #define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
  98. #define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
  99. #define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
  100. #define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
  101. #define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
  102. #define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */
  103. #define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */
  104. #define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */
  105. #define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */
  106. #define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */
  107. #define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */
  108. #define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */
  109. #define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */
  110. #define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */
  111. #define A_GPR(x) (A_FXGPREGBASE + (x))
  112. /* cc_reg constants */
  113. #define CC_REG_NORMALIZED C_00000001
  114. #define CC_REG_BORROW C_00000002
  115. #define CC_REG_MINUS C_00000004
  116. #define CC_REG_ZERO C_00000008
  117. #define CC_REG_SATURATE C_00000010
  118. #define CC_REG_NONZERO C_00000100
  119. /* FX buses */
  120. #define FXBUS_PCM_LEFT 0x00
  121. #define FXBUS_PCM_RIGHT 0x01
  122. #define FXBUS_PCM_LEFT_REAR 0x02
  123. #define FXBUS_PCM_RIGHT_REAR 0x03
  124. #define FXBUS_MIDI_LEFT 0x04
  125. #define FXBUS_MIDI_RIGHT 0x05
  126. #define FXBUS_PCM_CENTER 0x06
  127. #define FXBUS_PCM_LFE 0x07
  128. #define FXBUS_PCM_LEFT_FRONT 0x08
  129. #define FXBUS_PCM_RIGHT_FRONT 0x09
  130. #define FXBUS_MIDI_REVERB 0x0c
  131. #define FXBUS_MIDI_CHORUS 0x0d
  132. #define FXBUS_PCM_LEFT_SIDE 0x0e
  133. #define FXBUS_PCM_RIGHT_SIDE 0x0f
  134. #define FXBUS_PT_LEFT 0x14
  135. #define FXBUS_PT_RIGHT 0x15
  136. /* Inputs */
  137. #define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
  138. #define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
  139. #define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */
  140. #define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */
  141. #define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */
  142. #define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */
  143. #define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */
  144. #define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */
  145. #define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */
  146. #define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */
  147. #define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */
  148. #define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */
  149. #define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */
  150. #define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */
  151. /* Outputs */
  152. #define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */
  153. #define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */
  154. #define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */
  155. #define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */
  156. #define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */
  157. #define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */
  158. #define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */
  159. #define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */
  160. #define EXTOUT_REAR_L 0x08 /* Rear channel - left */
  161. #define EXTOUT_REAR_R 0x09 /* Rear channel - right */
  162. #define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */
  163. #define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */
  164. #define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */
  165. #define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */
  166. #define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */
  167. #define EXTOUT_ACENTER 0x11 /* Analog Center */
  168. #define EXTOUT_ALFE 0x12 /* Analog LFE */
  169. /* Audigy Inputs */
  170. #define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */
  171. #define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */
  172. #define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */
  173. #define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */
  174. #define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */
  175. #define A_EXTIN_OPT_SPDIF_R 0x05 /* right */
  176. #define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */
  177. #define A_EXTIN_LINE2_R 0x09 /* right */
  178. #define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */
  179. #define A_EXTIN_ADC_R 0x0b /* right */
  180. #define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */
  181. #define A_EXTIN_AUX2_R 0x0d /* - right */
  182. /* Audigiy Outputs */
  183. #define A_EXTOUT_FRONT_L 0x00 /* digital front left */
  184. #define A_EXTOUT_FRONT_R 0x01 /* right */
  185. #define A_EXTOUT_CENTER 0x02 /* digital front center */
  186. #define A_EXTOUT_LFE 0x03 /* digital front lfe */
  187. #define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */
  188. #define A_EXTOUT_HEADPHONE_R 0x05 /* right */
  189. #define A_EXTOUT_REAR_L 0x06 /* digital rear left */
  190. #define A_EXTOUT_REAR_R 0x07 /* right */
  191. #define A_EXTOUT_AFRONT_L 0x08 /* analog front left */
  192. #define A_EXTOUT_AFRONT_R 0x09 /* right */
  193. #define A_EXTOUT_ACENTER 0x0a /* analog center */
  194. #define A_EXTOUT_ALFE 0x0b /* analog LFE */
  195. #define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */
  196. #define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */
  197. #define A_EXTOUT_AREAR_L 0x0e /* analog rear left */
  198. #define A_EXTOUT_AREAR_R 0x0f /* right */
  199. #define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */
  200. #define A_EXTOUT_AC97_R 0x11 /* right */
  201. #define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */
  202. #define A_EXTOUT_ADC_CAP_R 0x17 /* right */
  203. #define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */
  204. /* Audigy constants */
  205. #define A_C_00000000 0xc0
  206. #define A_C_00000001 0xc1
  207. #define A_C_00000002 0xc2
  208. #define A_C_00000003 0xc3
  209. #define A_C_00000004 0xc4
  210. #define A_C_00000008 0xc5
  211. #define A_C_00000010 0xc6
  212. #define A_C_00000020 0xc7
  213. #define A_C_00000100 0xc8
  214. #define A_C_00010000 0xc9
  215. #define A_C_00000800 0xca
  216. #define A_C_10000000 0xcb
  217. #define A_C_20000000 0xcc
  218. #define A_C_40000000 0xcd
  219. #define A_C_80000000 0xce
  220. #define A_C_7fffffff 0xcf
  221. #define A_C_ffffffff 0xd0
  222. #define A_C_fffffffe 0xd1
  223. #define A_C_c0000000 0xd2
  224. #define A_C_4f1bbcdc 0xd3
  225. #define A_C_5a7ef9db 0xd4
  226. #define A_C_00100000 0xd5
  227. #define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */
  228. #define A_GPR_COND 0xd7 /* CCR, condition register */
  229. #define A_GPR_NOISE0 0xd8 /* noise source */
  230. #define A_GPR_NOISE1 0xd9 /* noise source */
  231. #define A_GPR_IRQ 0xda /* IRQ register */
  232. #define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */
  233. #define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */
  234. /* definitions for debug register */
  235. #define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */
  236. #define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */
  237. #define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */
  238. #define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */
  239. #define EMU10K1_DBG_STEP 0x00004000 /* start single step */
  240. #define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */
  241. #define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */
  242. /* tank memory address line */
  243. #ifndef __KERNEL__
  244. #define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */
  245. #define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */
  246. #define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */
  247. #define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */
  248. #define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */
  249. #endif
  250. struct snd_emu10k1_fx8010_info {
  251. unsigned int internal_tram_size; /* in samples */
  252. unsigned int external_tram_size; /* in samples */
  253. char fxbus_names[16][32]; /* names of FXBUSes */
  254. char extin_names[16][32]; /* names of external inputs */
  255. char extout_names[32][32]; /* names of external outputs */
  256. unsigned int gpr_controls; /* count of GPR controls */
  257. };
  258. #define EMU10K1_GPR_TRANSLATION_NONE 0
  259. #define EMU10K1_GPR_TRANSLATION_TABLE100 1
  260. #define EMU10K1_GPR_TRANSLATION_BASS 2
  261. #define EMU10K1_GPR_TRANSLATION_TREBLE 3
  262. #define EMU10K1_GPR_TRANSLATION_ONOFF 4
  263. struct snd_emu10k1_fx8010_control_gpr {
  264. struct snd_ctl_elem_id id; /* full control ID definition */
  265. unsigned int vcount; /* visible count */
  266. unsigned int count; /* count of GPR (1..16) */
  267. unsigned short gpr[32]; /* GPR number(s) */
  268. unsigned int value[32]; /* initial values */
  269. unsigned int min; /* minimum range */
  270. unsigned int max; /* maximum range */
  271. unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */
  272. const unsigned int *tlv;
  273. };
  274. /* old ABI without TLV support */
  275. struct snd_emu10k1_fx8010_control_old_gpr {
  276. struct snd_ctl_elem_id id;
  277. unsigned int vcount;
  278. unsigned int count;
  279. unsigned short gpr[32];
  280. unsigned int value[32];
  281. unsigned int min;
  282. unsigned int max;
  283. unsigned int translation;
  284. };
  285. struct snd_emu10k1_fx8010_code {
  286. char name[128];
  287. __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
  288. __u32 __user *gpr_map; /* initializers */
  289. unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
  290. struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */
  291. unsigned int gpr_del_control_count; /* count of GPR controls to remove */
  292. struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */
  293. unsigned int gpr_list_control_count; /* count of GPR controls to list */
  294. unsigned int gpr_list_control_total; /* total count of GPR controls */
  295. struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
  296. __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
  297. __u32 __user *tram_data_map; /* data initializers */
  298. __u32 __user *tram_addr_map; /* map initializers */
  299. __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
  300. __u32 __user *code; /* one instruction - 64 bits */
  301. };
  302. struct snd_emu10k1_fx8010_tram {
  303. unsigned int address; /* 31.bit == 1 -> external TRAM */
  304. unsigned int size; /* size in samples (4 bytes) */
  305. unsigned int *samples; /* pointer to samples (20-bit) */
  306. /* NULL->clear memory */
  307. };
  308. struct snd_emu10k1_fx8010_pcm_rec {
  309. unsigned int substream; /* substream number */
  310. unsigned int res1; /* reserved */
  311. unsigned int channels; /* 16-bit channels count, zero = remove this substream */
  312. unsigned int tram_start; /* ring buffer position in TRAM (in samples) */
  313. unsigned int buffer_size; /* count of buffered samples */
  314. unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */
  315. unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
  316. unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */
  317. unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */
  318. unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */
  319. unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */
  320. unsigned char pad; /* reserved */
  321. unsigned char etram[32]; /* external TRAM address & data (one per channel) */
  322. unsigned int res2; /* reserved */
  323. };
  324. #define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
  325. #define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
  326. #define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
  327. #define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
  328. #define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int)
  329. #define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram)
  330. #define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
  331. #define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
  332. #define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
  333. #define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int)
  334. #define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80)
  335. #define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81)
  336. #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
  337. #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int)
  338. #define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int)
  339. /* typedefs for compatibility to user-space */
  340. typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t;
  341. typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t;
  342. typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
  343. typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
  344. typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
  345. #endif /* _UAPI__SOUND_EMU10K1_H */