Go to the documentation of this file. 1 #ifndef __SOUND_YMFPCI_H
2 #define __SOUND_YMFPCI_H
29 #include <linux/gameport.h>
35 #define YMFREG(chip, reg) (chip->port + YDSXGR_##reg)
37 #define YDSXGR_INTFLAG 0x0004
38 #define YDSXGR_ACTIVITY 0x0006
39 #define YDSXGR_GLOBALCTRL 0x0008
40 #define YDSXGR_ZVCTRL 0x000A
41 #define YDSXGR_TIMERCTRL 0x0010
42 #define YDSXGR_TIMERCOUNT 0x0012
43 #define YDSXGR_SPDIFOUTCTRL 0x0018
44 #define YDSXGR_SPDIFOUTSTATUS 0x001C
45 #define YDSXGR_EEPROMCTRL 0x0020
46 #define YDSXGR_SPDIFINCTRL 0x0034
47 #define YDSXGR_SPDIFINSTATUS 0x0038
48 #define YDSXGR_DSPPROGRAMDL 0x0048
49 #define YDSXGR_DLCNTRL 0x004C
50 #define YDSXGR_GPIOININTFLAG 0x0050
51 #define YDSXGR_GPIOININTENABLE 0x0052
52 #define YDSXGR_GPIOINSTATUS 0x0054
53 #define YDSXGR_GPIOOUTCTRL 0x0056
54 #define YDSXGR_GPIOFUNCENABLE 0x0058
55 #define YDSXGR_GPIOTYPECONFIG 0x005A
56 #define YDSXGR_AC97CMDDATA 0x0060
57 #define YDSXGR_AC97CMDADR 0x0062
58 #define YDSXGR_PRISTATUSDATA 0x0064
59 #define YDSXGR_PRISTATUSADR 0x0066
60 #define YDSXGR_SECSTATUSDATA 0x0068
61 #define YDSXGR_SECSTATUSADR 0x006A
62 #define YDSXGR_SECCONFIG 0x0070
63 #define YDSXGR_LEGACYOUTVOL 0x0080
64 #define YDSXGR_LEGACYOUTVOLL 0x0080
65 #define YDSXGR_LEGACYOUTVOLR 0x0082
66 #define YDSXGR_NATIVEDACOUTVOL 0x0084
67 #define YDSXGR_NATIVEDACOUTVOLL 0x0084
68 #define YDSXGR_NATIVEDACOUTVOLR 0x0086
69 #define YDSXGR_ZVOUTVOL 0x0088
70 #define YDSXGR_ZVOUTVOLL 0x0088
71 #define YDSXGR_ZVOUTVOLR 0x008A
72 #define YDSXGR_SECADCOUTVOL 0x008C
73 #define YDSXGR_SECADCOUTVOLL 0x008C
74 #define YDSXGR_SECADCOUTVOLR 0x008E
75 #define YDSXGR_PRIADCOUTVOL 0x0090
76 #define YDSXGR_PRIADCOUTVOLL 0x0090
77 #define YDSXGR_PRIADCOUTVOLR 0x0092
78 #define YDSXGR_LEGACYLOOPVOL 0x0094
79 #define YDSXGR_LEGACYLOOPVOLL 0x0094
80 #define YDSXGR_LEGACYLOOPVOLR 0x0096
81 #define YDSXGR_NATIVEDACLOOPVOL 0x0098
82 #define YDSXGR_NATIVEDACLOOPVOLL 0x0098
83 #define YDSXGR_NATIVEDACLOOPVOLR 0x009A
84 #define YDSXGR_ZVLOOPVOL 0x009C
85 #define YDSXGR_ZVLOOPVOLL 0x009E
86 #define YDSXGR_ZVLOOPVOLR 0x009E
87 #define YDSXGR_SECADCLOOPVOL 0x00A0
88 #define YDSXGR_SECADCLOOPVOLL 0x00A0
89 #define YDSXGR_SECADCLOOPVOLR 0x00A2
90 #define YDSXGR_PRIADCLOOPVOL 0x00A4
91 #define YDSXGR_PRIADCLOOPVOLL 0x00A4
92 #define YDSXGR_PRIADCLOOPVOLR 0x00A6
93 #define YDSXGR_NATIVEADCINVOL 0x00A8
94 #define YDSXGR_NATIVEADCINVOLL 0x00A8
95 #define YDSXGR_NATIVEADCINVOLR 0x00AA
96 #define YDSXGR_NATIVEDACINVOL 0x00AC
97 #define YDSXGR_NATIVEDACINVOLL 0x00AC
98 #define YDSXGR_NATIVEDACINVOLR 0x00AE
99 #define YDSXGR_BUF441OUTVOL 0x00B0
100 #define YDSXGR_BUF441OUTVOLL 0x00B0
101 #define YDSXGR_BUF441OUTVOLR 0x00B2
102 #define YDSXGR_BUF441LOOPVOL 0x00B4
103 #define YDSXGR_BUF441LOOPVOLL 0x00B4
104 #define YDSXGR_BUF441LOOPVOLR 0x00B6
105 #define YDSXGR_SPDIFOUTVOL 0x00B8
106 #define YDSXGR_SPDIFOUTVOLL 0x00B8
107 #define YDSXGR_SPDIFOUTVOLR 0x00BA
108 #define YDSXGR_SPDIFLOOPVOL 0x00BC
109 #define YDSXGR_SPDIFLOOPVOLL 0x00BC
110 #define YDSXGR_SPDIFLOOPVOLR 0x00BE
111 #define YDSXGR_ADCSLOTSR 0x00C0
112 #define YDSXGR_RECSLOTSR 0x00C4
113 #define YDSXGR_ADCFORMAT 0x00C8
114 #define YDSXGR_RECFORMAT 0x00CC
115 #define YDSXGR_P44SLOTSR 0x00D0
116 #define YDSXGR_STATUS 0x0100
117 #define YDSXGR_CTRLSELECT 0x0104
118 #define YDSXGR_MODE 0x0108
119 #define YDSXGR_SAMPLECOUNT 0x010C
120 #define YDSXGR_NUMOFSAMPLES 0x0110
121 #define YDSXGR_CONFIG 0x0114
122 #define YDSXGR_PLAYCTRLSIZE 0x0140
123 #define YDSXGR_RECCTRLSIZE 0x0144
124 #define YDSXGR_EFFCTRLSIZE 0x0148
125 #define YDSXGR_WORKSIZE 0x014C
126 #define YDSXGR_MAPOFREC 0x0150
127 #define YDSXGR_MAPOFEFFECT 0x0154
128 #define YDSXGR_PLAYCTRLBASE 0x0158
129 #define YDSXGR_RECCTRLBASE 0x015C
130 #define YDSXGR_EFFCTRLBASE 0x0160
131 #define YDSXGR_WORKBASE 0x0164
132 #define YDSXGR_DSPINSTRAM 0x1000
133 #define YDSXGR_CTRLINSTRAM 0x4000
135 #define YDSXG_AC97READCMD 0x8000
136 #define YDSXG_AC97WRITECMD 0x0000
138 #define PCIR_DSXG_LEGACY 0x40
139 #define PCIR_DSXG_ELEGACY 0x42
140 #define PCIR_DSXG_CTRL 0x48
141 #define PCIR_DSXG_PWRCTRL1 0x4a
142 #define PCIR_DSXG_PWRCTRL2 0x4e
143 #define PCIR_DSXG_FMBASE 0x60
144 #define PCIR_DSXG_SBBASE 0x62
145 #define PCIR_DSXG_MPU401BASE 0x64
146 #define PCIR_DSXG_JOYBASE 0x66
148 #define YDSXG_DSPLENGTH 0x0080
149 #define YDSXG_CTRLLENGTH 0x3000
151 #define YDSXG_DEFAULT_WORK_SIZE 0x0400
153 #define YDSXG_PLAYBACK_VOICES 64
154 #define YDSXG_CAPTURE_VOICES 2
155 #define YDSXG_EFFECT_VOICES 5
157 #define YMFPCI_LEGACY_SBEN (1 << 0)
158 #define YMFPCI_LEGACY_FMEN (1 << 1)
159 #define YMFPCI_LEGACY_JPEN (1 << 2)
160 #define YMFPCI_LEGACY_MEN (1 << 3)
161 #define YMFPCI_LEGACY_MIEN (1 << 4)
162 #define YMFPCI_LEGACY_IOBITS (1 << 5)
163 #define YMFPCI_LEGACY_SDMA (3 << 6)
164 #define YMFPCI_LEGACY_SBIRQ (7 << 8)
165 #define YMFPCI_LEGACY_MPUIRQ (7 << 11)
166 #define YMFPCI_LEGACY_SIEN (1 << 14)
167 #define YMFPCI_LEGACY_LAD (1 << 15)
169 #define YMFPCI_LEGACY2_FMIO (3 << 0)
170 #define YMFPCI_LEGACY2_SBIO (3 << 2)
171 #define YMFPCI_LEGACY2_MPUIO (3 << 4)
172 #define YMFPCI_LEGACY2_JSIO (3 << 6)
173 #define YMFPCI_LEGACY2_MAIM (1 << 8)
174 #define YMFPCI_LEGACY2_SMOD (3 << 11)
175 #define YMFPCI_LEGACY2_SBVER (3 << 13)
176 #define YMFPCI_LEGACY2_IMOD (1 << 15)
179 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
180 #define SUPPORT_JOYSTICK
298 #ifdef SUPPORT_JOYSTICK
366 #ifdef CONFIG_PM_SLEEP
368 u32 saved_ydsxgr_mode;
369 u16 saved_dsxg_legacy;
370 u16 saved_dsxg_elegacy;
376 unsigned short old_legacy_ctrl,