1 /* SPDX-License-Identifier: GPL-2.0-or-later * 1 2 #ifndef __SOUND_EMU8000_REG_H 3 #define __SOUND_EMU8000_REG_H 4 /* 5 * Register operations for the EMU8000 6 * 7 * Copyright (C) 1999 Steve Ratcliffe 8 * 9 * Based on awe_wave.c by Takashi Iwai 10 */ 11 12 /* 13 * Data port addresses relative to the EMU bas 14 */ 15 #define EMU8000_DATA0(e) ((e)->port1) 16 #define EMU8000_DATA1(e) ((e)->port2) 17 #define EMU8000_DATA2(e) ((e)->port2+2) 18 #define EMU8000_DATA3(e) ((e)->port3) 19 #define EMU8000_PTR(e) ((e)->port3+2) 20 21 /* 22 * Make a command from a register and channel. 23 */ 24 #define EMU8000_CMD(reg, chan) ((reg)<<5 | (ch 25 26 /* 27 * Commands to read and write the EMU8000 regi 28 * These macros should be used for all registe 29 */ 30 #define EMU8000_CPF_READ(emu, chan) \ 31 snd_emu8000_peek_dw((emu), EMU8000_DAT 32 #define EMU8000_PTRX_READ(emu, chan) \ 33 snd_emu8000_peek_dw((emu), EMU8000_DAT 34 #define EMU8000_CVCF_READ(emu, chan) \ 35 snd_emu8000_peek_dw((emu), EMU8000_DAT 36 #define EMU8000_VTFT_READ(emu, chan) \ 37 snd_emu8000_peek_dw((emu), EMU8000_DAT 38 #define EMU8000_PSST_READ(emu, chan) \ 39 snd_emu8000_peek_dw((emu), EMU8000_DAT 40 #define EMU8000_CSL_READ(emu, chan) \ 41 snd_emu8000_peek_dw((emu), EMU8000_DAT 42 #define EMU8000_CCCA_READ(emu, chan) \ 43 snd_emu8000_peek_dw((emu), EMU8000_DAT 44 #define EMU8000_HWCF4_READ(emu) \ 45 snd_emu8000_peek_dw((emu), EMU8000_DAT 46 #define EMU8000_HWCF5_READ(emu) \ 47 snd_emu8000_peek_dw((emu), EMU8000_DAT 48 #define EMU8000_HWCF6_READ(emu) \ 49 snd_emu8000_peek_dw((emu), EMU8000_DAT 50 #define EMU8000_SMALR_READ(emu) \ 51 snd_emu8000_peek_dw((emu), EMU8000_DAT 52 #define EMU8000_SMARR_READ(emu) \ 53 snd_emu8000_peek_dw((emu), EMU8000_DAT 54 #define EMU8000_SMALW_READ(emu) \ 55 snd_emu8000_peek_dw((emu), EMU8000_DAT 56 #define EMU8000_SMARW_READ(emu) \ 57 snd_emu8000_peek_dw((emu), EMU8000_DAT 58 #define EMU8000_SMLD_READ(emu) \ 59 snd_emu8000_peek((emu), EMU8000_DATA1( 60 #define EMU8000_SMRD_READ(emu) \ 61 snd_emu8000_peek((emu), EMU8000_DATA2( 62 #define EMU8000_WC_READ(emu) \ 63 snd_emu8000_peek((emu), EMU8000_DATA2( 64 #define EMU8000_HWCF1_READ(emu) \ 65 snd_emu8000_peek((emu), EMU8000_DATA1( 66 #define EMU8000_HWCF2_READ(emu) \ 67 snd_emu8000_peek((emu), EMU8000_DATA1( 68 #define EMU8000_HWCF3_READ(emu) \ 69 snd_emu8000_peek((emu), EMU8000_DATA1( 70 #define EMU8000_INIT1_READ(emu, chan) \ 71 snd_emu8000_peek((emu), EMU8000_DATA1( 72 #define EMU8000_INIT2_READ(emu, chan) \ 73 snd_emu8000_peek((emu), EMU8000_DATA2( 74 #define EMU8000_INIT3_READ(emu, chan) \ 75 snd_emu8000_peek((emu), EMU8000_DATA1( 76 #define EMU8000_INIT4_READ(emu, chan) \ 77 snd_emu8000_peek((emu), EMU8000_DATA2( 78 #define EMU8000_ENVVOL_READ(emu, chan) \ 79 snd_emu8000_peek((emu), EMU8000_DATA1( 80 #define EMU8000_DCYSUSV_READ(emu, chan) \ 81 snd_emu8000_peek((emu), EMU8000_DATA1( 82 #define EMU8000_ENVVAL_READ(emu, chan) \ 83 snd_emu8000_peek((emu), EMU8000_DATA1( 84 #define EMU8000_DCYSUS_READ(emu, chan) \ 85 snd_emu8000_peek((emu), EMU8000_DATA1( 86 #define EMU8000_ATKHLDV_READ(emu, chan) \ 87 snd_emu8000_peek((emu), EMU8000_DATA2( 88 #define EMU8000_LFO1VAL_READ(emu, chan) \ 89 snd_emu8000_peek((emu), EMU8000_DATA2( 90 #define EMU8000_ATKHLD_READ(emu, chan) \ 91 snd_emu8000_peek((emu), EMU8000_DATA2( 92 #define EMU8000_LFO2VAL_READ(emu, chan) \ 93 snd_emu8000_peek((emu), EMU8000_DATA2( 94 #define EMU8000_IP_READ(emu, chan) \ 95 snd_emu8000_peek((emu), EMU8000_DATA3( 96 #define EMU8000_IFATN_READ(emu, chan) \ 97 snd_emu8000_peek((emu), EMU8000_DATA3( 98 #define EMU8000_PEFE_READ(emu, chan) \ 99 snd_emu8000_peek((emu), EMU8000_DATA3( 100 #define EMU8000_FMMOD_READ(emu, chan) \ 101 snd_emu8000_peek((emu), EMU8000_DATA3( 102 #define EMU8000_TREMFRQ_READ(emu, chan) \ 103 snd_emu8000_peek((emu), EMU8000_DATA3( 104 #define EMU8000_FM2FRQ2_READ(emu, chan) \ 105 snd_emu8000_peek((emu), EMU8000_DATA3( 106 107 108 #define EMU8000_CPF_WRITE(emu, chan, val) \ 109 snd_emu8000_poke_dw((emu), EMU8000_DAT 110 #define EMU8000_PTRX_WRITE(emu, chan, val) \ 111 snd_emu8000_poke_dw((emu), EMU8000_DAT 112 #define EMU8000_CVCF_WRITE(emu, chan, val) \ 113 snd_emu8000_poke_dw((emu), EMU8000_DAT 114 #define EMU8000_VTFT_WRITE(emu, chan, val) \ 115 snd_emu8000_poke_dw((emu), EMU8000_DAT 116 #define EMU8000_PSST_WRITE(emu, chan, val) \ 117 snd_emu8000_poke_dw((emu), EMU8000_DAT 118 #define EMU8000_CSL_WRITE(emu, chan, val) \ 119 snd_emu8000_poke_dw((emu), EMU8000_DAT 120 #define EMU8000_CCCA_WRITE(emu, chan, val) \ 121 snd_emu8000_poke_dw((emu), EMU8000_DAT 122 #define EMU8000_HWCF4_WRITE(emu, val) \ 123 snd_emu8000_poke_dw((emu), EMU8000_DAT 124 #define EMU8000_HWCF5_WRITE(emu, val) \ 125 snd_emu8000_poke_dw((emu), EMU8000_DAT 126 #define EMU8000_HWCF6_WRITE(emu, val) \ 127 snd_emu8000_poke_dw((emu), EMU8000_DAT 128 /* this register is not documented */ 129 #define EMU8000_HWCF7_WRITE(emu, val) \ 130 snd_emu8000_poke_dw((emu), EMU8000_DAT 131 #define EMU8000_SMALR_WRITE(emu, val) \ 132 snd_emu8000_poke_dw((emu), EMU8000_DAT 133 #define EMU8000_SMARR_WRITE(emu, val) \ 134 snd_emu8000_poke_dw((emu), EMU8000_DAT 135 #define EMU8000_SMALW_WRITE(emu, val) \ 136 snd_emu8000_poke_dw((emu), EMU8000_DAT 137 #define EMU8000_SMARW_WRITE(emu, val) \ 138 snd_emu8000_poke_dw((emu), EMU8000_DAT 139 #define EMU8000_SMLD_WRITE(emu, val) \ 140 snd_emu8000_poke((emu), EMU8000_DATA1( 141 #define EMU8000_SMRD_WRITE(emu, val) \ 142 snd_emu8000_poke((emu), EMU8000_DATA2( 143 #define EMU8000_WC_WRITE(emu, val) \ 144 snd_emu8000_poke((emu), EMU8000_DATA2( 145 #define EMU8000_HWCF1_WRITE(emu, val) \ 146 snd_emu8000_poke((emu), EMU8000_DATA1( 147 #define EMU8000_HWCF2_WRITE(emu, val) \ 148 snd_emu8000_poke((emu), EMU8000_DATA1( 149 #define EMU8000_HWCF3_WRITE(emu, val) \ 150 snd_emu8000_poke((emu), EMU8000_DATA1( 151 #define EMU8000_INIT1_WRITE(emu, chan, val) \ 152 snd_emu8000_poke((emu), EMU8000_DATA1( 153 #define EMU8000_INIT2_WRITE(emu, chan, val) \ 154 snd_emu8000_poke((emu), EMU8000_DATA2( 155 #define EMU8000_INIT3_WRITE(emu, chan, val) \ 156 snd_emu8000_poke((emu), EMU8000_DATA1( 157 #define EMU8000_INIT4_WRITE(emu, chan, val) \ 158 snd_emu8000_poke((emu), EMU8000_DATA2( 159 #define EMU8000_ENVVOL_WRITE(emu, chan, val) \ 160 snd_emu8000_poke((emu), EMU8000_DATA1( 161 #define EMU8000_DCYSUSV_WRITE(emu, chan, val) 162 snd_emu8000_poke((emu), EMU8000_DATA1( 163 #define EMU8000_ENVVAL_WRITE(emu, chan, val) \ 164 snd_emu8000_poke((emu), EMU8000_DATA1( 165 #define EMU8000_DCYSUS_WRITE(emu, chan, val) \ 166 snd_emu8000_poke((emu), EMU8000_DATA1( 167 #define EMU8000_ATKHLDV_WRITE(emu, chan, val) 168 snd_emu8000_poke((emu), EMU8000_DATA2( 169 #define EMU8000_LFO1VAL_WRITE(emu, chan, val) 170 snd_emu8000_poke((emu), EMU8000_DATA2( 171 #define EMU8000_ATKHLD_WRITE(emu, chan, val) \ 172 snd_emu8000_poke((emu), EMU8000_DATA2( 173 #define EMU8000_LFO2VAL_WRITE(emu, chan, val) 174 snd_emu8000_poke((emu), EMU8000_DATA2( 175 #define EMU8000_IP_WRITE(emu, chan, val) \ 176 snd_emu8000_poke((emu), EMU8000_DATA3( 177 #define EMU8000_IFATN_WRITE(emu, chan, val) \ 178 snd_emu8000_poke((emu), EMU8000_DATA3( 179 #define EMU8000_PEFE_WRITE(emu, chan, val) \ 180 snd_emu8000_poke((emu), EMU8000_DATA3( 181 #define EMU8000_FMMOD_WRITE(emu, chan, val) \ 182 snd_emu8000_poke((emu), EMU8000_DATA3( 183 #define EMU8000_TREMFRQ_WRITE(emu, chan, val) 184 snd_emu8000_poke((emu), EMU8000_DATA3( 185 #define EMU8000_FM2FRQ2_WRITE(emu, chan, val) 186 snd_emu8000_poke((emu), EMU8000_DATA3( 187 188 #define EMU8000_0080_WRITE(emu, chan, val) \ 189 snd_emu8000_poke_dw((emu), EMU8000_DAT 190 #define EMU8000_00A0_WRITE(emu, chan, val) \ 191 snd_emu8000_poke_dw((emu), EMU8000_DAT 192 193 #endif /* __SOUND_EMU8000_REG_H */ 194
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.