xref: /dflybsd-src/sys/dev/sound/pci/allegro_reg.h (revision 2a1ad637466621af45d5a17185b33f3dcaaa1b1c)
1*2a1ad637SFrançois Tigeot /* $FreeBSD: head/sys/dev/sound/pci/allegro_reg.h 230401 2012-01-20 22:37:10Z pfg $ */
2*2a1ad637SFrançois Tigeot /*-
3*2a1ad637SFrançois Tigeot  * Copyright (c) 1996-2008, 4Front Technologies
4*2a1ad637SFrançois Tigeot  * Copyright (C) 1992-2000  Don Kim (don.kim@esstech.com)
5*2a1ad637SFrançois Tigeot  * All rights reserved.
6*2a1ad637SFrançois Tigeot  *
7*2a1ad637SFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
8*2a1ad637SFrançois Tigeot  * modification, are permitted provided that the following conditions
9*2a1ad637SFrançois Tigeot  * are met:
10*2a1ad637SFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
11*2a1ad637SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer.
12*2a1ad637SFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
13*2a1ad637SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
14*2a1ad637SFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
15*2a1ad637SFrançois Tigeot  *
16*2a1ad637SFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17*2a1ad637SFrançois Tigeot  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*2a1ad637SFrançois Tigeot  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*2a1ad637SFrançois Tigeot  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20*2a1ad637SFrançois Tigeot  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*2a1ad637SFrançois Tigeot  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22*2a1ad637SFrançois Tigeot  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*2a1ad637SFrançois Tigeot  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT
24*2a1ad637SFrançois Tigeot  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*2a1ad637SFrançois Tigeot  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*2a1ad637SFrançois Tigeot  * SUCH DAMAGE.
27*2a1ad637SFrançois Tigeot  *
28*2a1ad637SFrançois Tigeot  */
29*2a1ad637SFrançois Tigeot 
30*2a1ad637SFrançois Tigeot /*---------------------------------------------------------------------------
31*2a1ad637SFrançois Tigeot  *              Copyright (C) 1997-1999, ESS Technology, Inc.
32*2a1ad637SFrançois Tigeot  * This source code, its compiled object code, and its associated data sets
33*2a1ad637SFrançois Tigeot  * are copyright (C) 1997-1999 ESS Technology, Inc.
34*2a1ad637SFrançois Tigeot  *---------------------------------------------------------------------------
35*2a1ad637SFrançois Tigeot  * This header contains data structures and registers taken from the
36*2a1ad637SFrançois Tigeot  * 4Front OSS Allegro BSD licensed driver (in the Attic/ directory).
37*2a1ad637SFrançois Tigeot  *  Files used for this header include:
38*2a1ad637SFrançois Tigeot  *    hardware.h
39*2a1ad637SFrançois Tigeot  *    kernel.h and hckernel.h
40*2a1ad637SFrançois Tigeot  *    srcmgr.h
41*2a1ad637SFrançois Tigeot  *---------------------------------------------------------------------------
42*2a1ad637SFrançois Tigeot  */
43*2a1ad637SFrançois Tigeot 
44*2a1ad637SFrançois Tigeot #ifndef _DEV_SOUND_PCI_ALLEGRO_REG_H
45*2a1ad637SFrançois Tigeot #define _DEV_SOUND_PCI_ALLEGRO_REG_H
46*2a1ad637SFrançois Tigeot 
47*2a1ad637SFrançois Tigeot /* Allegro PCI configuration registers */
48*2a1ad637SFrançois Tigeot #define PCI_LEGACY_AUDIO_CTRL   0x40
49*2a1ad637SFrançois Tigeot #define SOUND_BLASTER_ENABLE    0x00000001
50*2a1ad637SFrançois Tigeot #define FM_SYNTHESIS_ENABLE     0x00000002
51*2a1ad637SFrançois Tigeot #define GAME_PORT_ENABLE        0x00000004
52*2a1ad637SFrançois Tigeot #define MPU401_IO_ENABLE        0x00000008
53*2a1ad637SFrançois Tigeot #define MPU401_IRQ_ENABLE       0x00000010
54*2a1ad637SFrançois Tigeot #define ALIAS_10BIT_IO          0x00000020
55*2a1ad637SFrançois Tigeot #define SB_DMA_MASK             0x000000C0
56*2a1ad637SFrançois Tigeot #define SB_DMA_0                0x00000040
57*2a1ad637SFrançois Tigeot #define SB_DMA_1                0x00000040
58*2a1ad637SFrançois Tigeot #define SB_DMA_R                0x00000080
59*2a1ad637SFrançois Tigeot #define SB_DMA_3                0x000000C0
60*2a1ad637SFrançois Tigeot #define SB_IRQ_MASK             0x00000700
61*2a1ad637SFrançois Tigeot #define SB_IRQ_5                0x00000000
62*2a1ad637SFrançois Tigeot #define SB_IRQ_7                0x00000100
63*2a1ad637SFrançois Tigeot #define SB_IRQ_9                0x00000200
64*2a1ad637SFrançois Tigeot #define SB_IRQ_10               0x00000300
65*2a1ad637SFrançois Tigeot #define MIDI_IRQ_MASK           0x00003800
66*2a1ad637SFrançois Tigeot #define SERIAL_IRQ_ENABLE       0x00004000
67*2a1ad637SFrançois Tigeot #define DISABLE_LEGACY          0x00008000
68*2a1ad637SFrançois Tigeot 
69*2a1ad637SFrançois Tigeot #define PCI_ALLEGRO_CONFIG      0x50
70*2a1ad637SFrançois Tigeot #define SB_ADDR_240             0x00000004
71*2a1ad637SFrançois Tigeot #define MPU_ADDR_MASK           0x00000018
72*2a1ad637SFrançois Tigeot #define MPU_ADDR_330            0x00000000
73*2a1ad637SFrançois Tigeot #define MPU_ADDR_300            0x00000008
74*2a1ad637SFrançois Tigeot #define MPU_ADDR_320            0x00000010
75*2a1ad637SFrançois Tigeot #define MPU_ADDR_340            0x00000018
76*2a1ad637SFrançois Tigeot #define USE_PCI_TIMING          0x00000040
77*2a1ad637SFrançois Tigeot #define POSTED_WRITE_ENABLE     0x00000080
78*2a1ad637SFrançois Tigeot #define DMA_POLICY_MASK         0x00000700
79*2a1ad637SFrançois Tigeot #define DMA_DDMA                0x00000000
80*2a1ad637SFrançois Tigeot #define DMA_TDMA                0x00000100
81*2a1ad637SFrançois Tigeot #define DMA_PCPCI               0x00000200
82*2a1ad637SFrançois Tigeot #define DMA_WBDMA16             0x00000400
83*2a1ad637SFrançois Tigeot #define DMA_WBDMA4              0x00000500
84*2a1ad637SFrançois Tigeot #define DMA_WBDMA2              0x00000600
85*2a1ad637SFrançois Tigeot #define DMA_WBDMA1              0x00000700
86*2a1ad637SFrançois Tigeot #define DMA_SAFE_GUARD          0x00000800
87*2a1ad637SFrançois Tigeot #define HI_PERF_GP_ENABLE       0x00001000
88*2a1ad637SFrançois Tigeot #define PIC_SNOOP_MODE_0        0x00002000
89*2a1ad637SFrançois Tigeot #define PIC_SNOOP_MODE_1        0x00004000
90*2a1ad637SFrançois Tigeot #define SOUNDBLASTER_IRQ_MASK   0x00008000
91*2a1ad637SFrançois Tigeot #define RING_IN_ENABLE          0x00010000
92*2a1ad637SFrançois Tigeot #define SPDIF_TEST_MODE         0x00020000
93*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_SELECT_2  0x00040000
94*2a1ad637SFrançois Tigeot #define EEPROM_WRITE_ENABLE     0x00080000
95*2a1ad637SFrançois Tigeot #define CODEC_DIR_IN            0x00100000
96*2a1ad637SFrançois Tigeot #define HV_BUTTON_FROM_GD       0x00200000
97*2a1ad637SFrançois Tigeot #define REDUCED_DEBOUNCE        0x00400000
98*2a1ad637SFrançois Tigeot #define HV_CTRL_ENABLE          0x00800000
99*2a1ad637SFrançois Tigeot #define SPDIF_ENABLE            0x01000000
100*2a1ad637SFrançois Tigeot #define CLK_DIV_SELECT          0x06000000
101*2a1ad637SFrançois Tigeot #define CLK_DIV_BY_48           0x00000000
102*2a1ad637SFrançois Tigeot #define CLK_DIV_BY_49           0x02000000
103*2a1ad637SFrançois Tigeot #define CLK_DIV_BY_50           0x04000000
104*2a1ad637SFrançois Tigeot #define CLK_DIV_RESERVED        0x06000000
105*2a1ad637SFrançois Tigeot #define PM_CTRL_ENABLE          0x08000000
106*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_SELECT    0x30000000
107*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_SHIFT     28
108*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_0         0x00000000
109*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_1         0x10000000
110*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_2         0x20000000
111*2a1ad637SFrançois Tigeot #define CLK_MULT_MODE_3         0x30000000
112*2a1ad637SFrançois Tigeot #define INT_CLK_SELECT          0x40000000
113*2a1ad637SFrançois Tigeot #define INT_CLK_MULT_RESET      0x80000000
114*2a1ad637SFrançois Tigeot 
115*2a1ad637SFrançois Tigeot /* M3 */
116*2a1ad637SFrançois Tigeot #define INT_CLK_SRC_NOT_PCI     0x00100000
117*2a1ad637SFrançois Tigeot #define INT_CLK_MULT_ENABLE     0x80000000
118*2a1ad637SFrançois Tigeot 
119*2a1ad637SFrançois Tigeot #define PCI_ACPI_CONTROL        0x54
120*2a1ad637SFrançois Tigeot #define PCI_ACPI_D0             0x00000000
121*2a1ad637SFrançois Tigeot #define PCI_ACPI_D1             0xB4F70000
122*2a1ad637SFrançois Tigeot #define PCI_ACPI_D2             0xB4F7B4F7
123*2a1ad637SFrançois Tigeot 
124*2a1ad637SFrançois Tigeot #define PCI_USER_CONFIG         0x58
125*2a1ad637SFrançois Tigeot #define EXT_PCI_MASTER_ENABLE   0x00000001
126*2a1ad637SFrançois Tigeot #define SPDIF_OUT_SELECT        0x00000002
127*2a1ad637SFrançois Tigeot #define TEST_PIN_DIR_CTRL       0x00000004
128*2a1ad637SFrançois Tigeot #define AC97_CODEC_TEST         0x00000020
129*2a1ad637SFrançois Tigeot #define TRI_STATE_BUFFER        0x00000080
130*2a1ad637SFrançois Tigeot #define IN_CLK_12MHZ_SELECT     0x00000100
131*2a1ad637SFrançois Tigeot #define MULTI_FUNC_DISABLE      0x00000200
132*2a1ad637SFrançois Tigeot #define EXT_MASTER_PAIR_SEL     0x00000400
133*2a1ad637SFrançois Tigeot #define PCI_MASTER_SUPPORT      0x00000800
134*2a1ad637SFrançois Tigeot #define STOP_CLOCK_ENABLE       0x00001000
135*2a1ad637SFrançois Tigeot #define EAPD_DRIVE_ENABLE       0x00002000
136*2a1ad637SFrançois Tigeot #define REQ_TRI_STATE_ENABLE    0x00004000
137*2a1ad637SFrançois Tigeot #define REQ_LOW_ENABLE          0x00008000
138*2a1ad637SFrançois Tigeot #define MIDI_1_ENABLE           0x00010000
139*2a1ad637SFrançois Tigeot #define MIDI_2_ENABLE           0x00020000
140*2a1ad637SFrançois Tigeot #define SB_AUDIO_SYNC           0x00040000
141*2a1ad637SFrançois Tigeot #define HV_CTRL_TEST            0x00100000
142*2a1ad637SFrançois Tigeot #define SOUNDBLASTER_TEST       0x00400000
143*2a1ad637SFrançois Tigeot 
144*2a1ad637SFrançois Tigeot #define PCI_USER_CONFIG_C       0x5C
145*2a1ad637SFrançois Tigeot 
146*2a1ad637SFrançois Tigeot #define PCI_DDMA_CTRL           0x60
147*2a1ad637SFrançois Tigeot #define DDMA_ENABLE             0x00000001
148*2a1ad637SFrançois Tigeot 
149*2a1ad637SFrançois Tigeot 
150*2a1ad637SFrançois Tigeot /* Allegro registers */
151*2a1ad637SFrançois Tigeot #define HOST_INT_CTRL           0x18
152*2a1ad637SFrançois Tigeot #define SB_INT_ENABLE           0x0001
153*2a1ad637SFrançois Tigeot #define MPU401_INT_ENABLE       0x0002
154*2a1ad637SFrançois Tigeot #define ASSP_INT_ENABLE         0x0010
155*2a1ad637SFrançois Tigeot #define RING_INT_ENABLE         0x0020
156*2a1ad637SFrançois Tigeot #define HV_INT_ENABLE           0x0040
157*2a1ad637SFrançois Tigeot #define CLKRUN_GEN_ENABLE       0x0100
158*2a1ad637SFrançois Tigeot #define HV_CTRL_TO_PME          0x0400
159*2a1ad637SFrançois Tigeot #define SOFTWARE_RESET_ENABLE   0x8000
160*2a1ad637SFrançois Tigeot 
161*2a1ad637SFrançois Tigeot #define HOST_INT_STATUS         0x1A
162*2a1ad637SFrançois Tigeot #define SB_INT_PENDING          0x01
163*2a1ad637SFrançois Tigeot #define MPU401_INT_PENDING      0x02
164*2a1ad637SFrançois Tigeot #define ASSP_INT_PENDING        0x10
165*2a1ad637SFrançois Tigeot #define RING_INT_PENDING        0x20
166*2a1ad637SFrançois Tigeot #define HV_INT_PENDING          0x40
167*2a1ad637SFrançois Tigeot 
168*2a1ad637SFrançois Tigeot #define HARDWARE_VOL_CTRL       0x1B
169*2a1ad637SFrançois Tigeot #define SHADOW_MIX_REG_VOICE    0x1C
170*2a1ad637SFrançois Tigeot #define HW_VOL_COUNTER_VOICE    0x1D
171*2a1ad637SFrançois Tigeot #define SHADOW_MIX_REG_MASTER   0x1E
172*2a1ad637SFrançois Tigeot #define HW_VOL_COUNTER_MASTER   0x1F
173*2a1ad637SFrançois Tigeot 
174*2a1ad637SFrançois Tigeot #define CODEC_COMMAND           0x30
175*2a1ad637SFrançois Tigeot #define CODEC_READ_B            0x80
176*2a1ad637SFrançois Tigeot 
177*2a1ad637SFrançois Tigeot #define CODEC_STATUS            0x30
178*2a1ad637SFrançois Tigeot #define CODEC_BUSY_B            0x01
179*2a1ad637SFrançois Tigeot 
180*2a1ad637SFrançois Tigeot #define CODEC_DATA              0x32
181*2a1ad637SFrançois Tigeot 
182*2a1ad637SFrançois Tigeot /* AC97 registers */
183*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
184*2a1ad637SFrançois Tigeot #define AC97_RESET              0x00
185*2a1ad637SFrançois Tigeot #endif
186*2a1ad637SFrançois Tigeot 
187*2a1ad637SFrançois Tigeot #define AC97_VOL_MUTE_B         0x8000
188*2a1ad637SFrançois Tigeot #define AC97_VOL_M              0x1F
189*2a1ad637SFrançois Tigeot #define AC97_LEFT_VOL_S         8
190*2a1ad637SFrançois Tigeot 
191*2a1ad637SFrançois Tigeot #define AC97_MASTER_VOL         0x02
192*2a1ad637SFrançois Tigeot #define AC97_LINE_LEVEL_VOL     0x04
193*2a1ad637SFrançois Tigeot #define AC97_MASTER_MONO_VOL    0x06
194*2a1ad637SFrançois Tigeot #define AC97_PC_BEEP_VOL        0x0A
195*2a1ad637SFrançois Tigeot #define AC97_PC_BEEP_VOL_M      0x0F
196*2a1ad637SFrançois Tigeot #define AC97_SROUND_MASTER_VOL  0x38
197*2a1ad637SFrançois Tigeot #define AC97_PC_BEEP_VOL_S      1
198*2a1ad637SFrançois Tigeot 
199*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
200*2a1ad637SFrançois Tigeot #define AC97_PHONE_VOL          0x0C
201*2a1ad637SFrançois Tigeot #define AC97_MIC_VOL            0x0E
202*2a1ad637SFrançois Tigeot #endif
203*2a1ad637SFrançois Tigeot #define AC97_MIC_20DB_ENABLE    0x40
204*2a1ad637SFrançois Tigeot 
205*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
206*2a1ad637SFrançois Tigeot #define AC97_LINEIN_VOL         0x10
207*2a1ad637SFrançois Tigeot #define AC97_CD_VOL             0x12
208*2a1ad637SFrançois Tigeot #define AC97_VIDEO_VOL          0x14
209*2a1ad637SFrançois Tigeot #define AC97_AUX_VOL            0x16
210*2a1ad637SFrançois Tigeot #endif
211*2a1ad637SFrançois Tigeot #define AC97_PCM_OUT_VOL        0x18
212*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
213*2a1ad637SFrançois Tigeot #define AC97_RECORD_SELECT      0x1A
214*2a1ad637SFrançois Tigeot #endif
215*2a1ad637SFrançois Tigeot #define AC97_RECORD_MIC         0x00
216*2a1ad637SFrançois Tigeot #define AC97_RECORD_CD          0x01
217*2a1ad637SFrançois Tigeot #define AC97_RECORD_VIDEO       0x02
218*2a1ad637SFrançois Tigeot #define AC97_RECORD_AUX         0x03
219*2a1ad637SFrançois Tigeot #define AC97_RECORD_MONO_MUX    0x02
220*2a1ad637SFrançois Tigeot #define AC97_RECORD_DIGITAL     0x03
221*2a1ad637SFrançois Tigeot #define AC97_RECORD_LINE        0x04
222*2a1ad637SFrançois Tigeot #define AC97_RECORD_STEREO      0x05
223*2a1ad637SFrançois Tigeot #define AC97_RECORD_MONO        0x06
224*2a1ad637SFrançois Tigeot #define AC97_RECORD_PHONE       0x07
225*2a1ad637SFrançois Tigeot 
226*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
227*2a1ad637SFrançois Tigeot #define AC97_RECORD_GAIN        0x1C
228*2a1ad637SFrançois Tigeot #endif
229*2a1ad637SFrançois Tigeot #define AC97_RECORD_VOL_M       0x0F
230*2a1ad637SFrançois Tigeot 
231*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
232*2a1ad637SFrançois Tigeot #define AC97_GENERAL_PURPOSE    0x20
233*2a1ad637SFrançois Tigeot #endif
234*2a1ad637SFrançois Tigeot #define AC97_POWER_DOWN_CTRL    0x26
235*2a1ad637SFrançois Tigeot #define AC97_ADC_READY          0x0001
236*2a1ad637SFrançois Tigeot #define AC97_DAC_READY          0x0002
237*2a1ad637SFrançois Tigeot #define AC97_ANALOG_READY       0x0004
238*2a1ad637SFrançois Tigeot #define AC97_VREF_ON            0x0008
239*2a1ad637SFrançois Tigeot #define AC97_PR0                0x0100
240*2a1ad637SFrançois Tigeot #define AC97_PR1                0x0200
241*2a1ad637SFrançois Tigeot #define AC97_PR2                0x0400
242*2a1ad637SFrançois Tigeot #define AC97_PR3                0x0800
243*2a1ad637SFrançois Tigeot #define AC97_PR4                0x1000
244*2a1ad637SFrançois Tigeot 
245*2a1ad637SFrançois Tigeot #define AC97_RESERVED1          0x28
246*2a1ad637SFrançois Tigeot 
247*2a1ad637SFrançois Tigeot #define AC97_VENDOR_TEST        0x5A
248*2a1ad637SFrançois Tigeot 
249*2a1ad637SFrançois Tigeot #define AC97_CLOCK_DELAY        0x5C
250*2a1ad637SFrançois Tigeot #define AC97_LINEOUT_MUX_SEL    0x0001
251*2a1ad637SFrançois Tigeot #define AC97_MONO_MUX_SEL       0x0002
252*2a1ad637SFrançois Tigeot #define AC97_CLOCK_DELAY_SEL    0x1F
253*2a1ad637SFrançois Tigeot #define AC97_DAC_CDS_SHIFT      6
254*2a1ad637SFrançois Tigeot #define AC97_ADC_CDS_SHIFT      11
255*2a1ad637SFrançois Tigeot 
256*2a1ad637SFrançois Tigeot #define AC97_MULTI_CHANNEL_SEL  0x74
257*2a1ad637SFrançois Tigeot 
258*2a1ad637SFrançois Tigeot #ifndef M3_MODEL
259*2a1ad637SFrançois Tigeot #define AC97_VENDOR_ID1         0x7C
260*2a1ad637SFrançois Tigeot #define AC97_VENDOR_ID2         0x7E
261*2a1ad637SFrançois Tigeot #endif
262*2a1ad637SFrançois Tigeot 
263*2a1ad637SFrançois Tigeot #define RING_BUS_CTRL_A         0x36
264*2a1ad637SFrançois Tigeot #define RAC_PME_ENABLE          0x0100
265*2a1ad637SFrançois Tigeot #define RAC_SDFS_ENABLE         0x0200
266*2a1ad637SFrançois Tigeot #define LAC_PME_ENABLE          0x0400
267*2a1ad637SFrançois Tigeot #define LAC_SDFS_ENABLE         0x0800
268*2a1ad637SFrançois Tigeot #define SERIAL_AC_LINK_ENABLE   0x1000
269*2a1ad637SFrançois Tigeot #define IO_SRAM_ENABLE          0x2000
270*2a1ad637SFrançois Tigeot #define IIS_INPUT_ENABLE        0x8000
271*2a1ad637SFrançois Tigeot 
272*2a1ad637SFrançois Tigeot #define RING_BUS_CTRL_B         0x38
273*2a1ad637SFrançois Tigeot #define SECOND_CODEC_ID_MASK    0x0003
274*2a1ad637SFrançois Tigeot #define SPDIF_FUNC_ENABLE       0x0010
275*2a1ad637SFrançois Tigeot #define SECOND_AC_ENABLE        0x0020
276*2a1ad637SFrançois Tigeot #define SB_MODULE_INTF_ENABLE   0x0040
277*2a1ad637SFrançois Tigeot #define SSPE_ENABLE             0x0040
278*2a1ad637SFrançois Tigeot #define M3I_DOCK_ENABLE         0x0080
279*2a1ad637SFrançois Tigeot 
280*2a1ad637SFrançois Tigeot #define SDO_OUT_DEST_CTRL       0x3A
281*2a1ad637SFrançois Tigeot #define COMMAND_ADDR_OUT        0x0003
282*2a1ad637SFrançois Tigeot #define PCM_LR_OUT_LOCAL        0x0000
283*2a1ad637SFrançois Tigeot #define PCM_LR_OUT_REMOTE       0x0004
284*2a1ad637SFrançois Tigeot #define PCM_LR_OUT_MUTE         0x0008
285*2a1ad637SFrançois Tigeot #define PCM_LR_OUT_BOTH         0x000C
286*2a1ad637SFrançois Tigeot #define LINE1_DAC_OUT_LOCAL     0x0000
287*2a1ad637SFrançois Tigeot #define LINE1_DAC_OUT_REMOTE    0x0010
288*2a1ad637SFrançois Tigeot #define LINE1_DAC_OUT_MUTE      0x0020
289*2a1ad637SFrançois Tigeot #define LINE1_DAC_OUT_BOTH      0x0030
290*2a1ad637SFrançois Tigeot #define PCM_CLS_OUT_LOCAL       0x0000
291*2a1ad637SFrançois Tigeot #define PCM_CLS_OUT_REMOTE      0x0040
292*2a1ad637SFrançois Tigeot #define PCM_CLS_OUT_MUTE        0x0080
293*2a1ad637SFrançois Tigeot #define PCM_CLS_OUT_BOTH        0x00C0
294*2a1ad637SFrançois Tigeot #define PCM_RLF_OUT_LOCAL       0x0000
295*2a1ad637SFrançois Tigeot #define PCM_RLF_OUT_REMOTE      0x0100
296*2a1ad637SFrançois Tigeot #define PCM_RLF_OUT_MUTE        0x0200
297*2a1ad637SFrançois Tigeot #define PCM_RLF_OUT_BOTH        0x0300
298*2a1ad637SFrançois Tigeot #define LINE2_DAC_OUT_LOCAL     0x0000
299*2a1ad637SFrançois Tigeot #define LINE2_DAC_OUT_REMOTE    0x0400
300*2a1ad637SFrançois Tigeot #define LINE2_DAC_OUT_MUTE      0x0800
301*2a1ad637SFrançois Tigeot #define LINE2_DAC_OUT_BOTH      0x0C00
302*2a1ad637SFrançois Tigeot #define HANDSET_OUT_LOCAL       0x0000
303*2a1ad637SFrançois Tigeot #define HANDSET_OUT_REMOTE      0x1000
304*2a1ad637SFrançois Tigeot #define HANDSET_OUT_MUTE        0x2000
305*2a1ad637SFrançois Tigeot #define HANDSET_OUT_BOTH        0x3000
306*2a1ad637SFrançois Tigeot #define IO_CTRL_OUT_LOCAL       0x0000
307*2a1ad637SFrançois Tigeot #define IO_CTRL_OUT_REMOTE      0x4000
308*2a1ad637SFrançois Tigeot #define IO_CTRL_OUT_MUTE        0x8000
309*2a1ad637SFrançois Tigeot #define IO_CTRL_OUT_BOTH        0xC000
310*2a1ad637SFrançois Tigeot 
311*2a1ad637SFrançois Tigeot #define SDO_IN_DEST_CTRL        0x3C
312*2a1ad637SFrançois Tigeot #define STATUS_ADDR_IN          0x0003
313*2a1ad637SFrançois Tigeot #define PCM_LR_IN_LOCAL         0x0000
314*2a1ad637SFrançois Tigeot #define PCM_LR_IN_REMOTE        0x0004
315*2a1ad637SFrançois Tigeot #define PCM_LR_RESERVED         0x0008
316*2a1ad637SFrançois Tigeot #define PCM_LR_IN_BOTH          0x000C
317*2a1ad637SFrançois Tigeot #define LINE1_ADC_IN_LOCAL      0x0000
318*2a1ad637SFrançois Tigeot #define LINE1_ADC_IN_REMOTE     0x0010
319*2a1ad637SFrançois Tigeot #define LINE1_ADC_IN_MUTE       0x0020
320*2a1ad637SFrançois Tigeot #define MIC_ADC_IN_LOCAL        0x0000
321*2a1ad637SFrançois Tigeot #define MIC_ADC_IN_REMOTE       0x0040
322*2a1ad637SFrançois Tigeot #define MIC_ADC_IN_MUTE         0x0080
323*2a1ad637SFrançois Tigeot #define LINE2_DAC_IN_LOCAL      0x0000
324*2a1ad637SFrançois Tigeot #define LINE2_DAC_IN_REMOTE     0x0400
325*2a1ad637SFrançois Tigeot #define LINE2_DAC_IN_MUTE       0x0800
326*2a1ad637SFrançois Tigeot #define HANDSET_IN_LOCAL        0x0000
327*2a1ad637SFrançois Tigeot #define HANDSET_IN_REMOTE       0x1000
328*2a1ad637SFrançois Tigeot #define HANDSET_IN_MUTE         0x2000
329*2a1ad637SFrançois Tigeot #define IO_STATUS_IN_LOCAL      0x0000
330*2a1ad637SFrançois Tigeot #define IO_STATUS_IN_REMOTE     0x4000
331*2a1ad637SFrançois Tigeot 
332*2a1ad637SFrançois Tigeot #define SPDIF_IN_CTRL           0x3E
333*2a1ad637SFrançois Tigeot #define SPDIF_IN_ENABLE         0x0001
334*2a1ad637SFrançois Tigeot 
335*2a1ad637SFrançois Tigeot #define GPIO_DATA               0x60
336*2a1ad637SFrançois Tigeot #define GPIO_DATA_MASK          0x0FFF
337*2a1ad637SFrançois Tigeot #define GPIO_HV_STATUS          0x3000
338*2a1ad637SFrançois Tigeot #define GPIO_PME_STATUS         0x4000
339*2a1ad637SFrançois Tigeot 
340*2a1ad637SFrançois Tigeot #define GPIO_MASK               0x64
341*2a1ad637SFrançois Tigeot #define GPIO_DIRECTION          0x68
342*2a1ad637SFrançois Tigeot #define GPO_PRIMARY_AC97        0x0001
343*2a1ad637SFrançois Tigeot #define GPI_LINEOUT_SENSE       0x0004
344*2a1ad637SFrançois Tigeot #define GPO_SECONDARY_AC97      0x0008
345*2a1ad637SFrançois Tigeot #define GPI_VOL_DOWN            0x0010
346*2a1ad637SFrançois Tigeot #define GPI_VOL_UP              0x0020
347*2a1ad637SFrançois Tigeot #define GPI_IIS_CLK             0x0040
348*2a1ad637SFrançois Tigeot #define GPI_IIS_LRCLK           0x0080
349*2a1ad637SFrançois Tigeot #define GPI_IIS_DATA            0x0100
350*2a1ad637SFrançois Tigeot #define GPI_DOCKING_STATUS      0x0100
351*2a1ad637SFrançois Tigeot #define GPI_HEADPHONE_SENSE     0x0200
352*2a1ad637SFrançois Tigeot #define GPO_EXT_AMP_SHUTDOWN    0x1000
353*2a1ad637SFrançois Tigeot 
354*2a1ad637SFrançois Tigeot /* M3 */
355*2a1ad637SFrançois Tigeot #define GPO_M3_EXT_AMP_SHUTDN   0x0002
356*2a1ad637SFrançois Tigeot 
357*2a1ad637SFrançois Tigeot #define ASSP_INDEX_PORT         0x80
358*2a1ad637SFrançois Tigeot #define ASSP_MEMORY_PORT        0x82
359*2a1ad637SFrançois Tigeot #define ASSP_DATA_PORT          0x84
360*2a1ad637SFrançois Tigeot 
361*2a1ad637SFrançois Tigeot #define MPU401_DATA_PORT        0x98
362*2a1ad637SFrançois Tigeot #define MPU401_STATUS_PORT      0x99
363*2a1ad637SFrançois Tigeot 
364*2a1ad637SFrançois Tigeot #define CLK_MULT_DATA_PORT      0x9C
365*2a1ad637SFrançois Tigeot 
366*2a1ad637SFrançois Tigeot #define ASSP_CONTROL_A          0xA2
367*2a1ad637SFrançois Tigeot #define ASSP_0_WS_ENABLE        0x01
368*2a1ad637SFrançois Tigeot #define ASSP_CTRL_A_RESERVED1   0x02
369*2a1ad637SFrançois Tigeot #define ASSP_CTRL_A_RESERVED2   0x04
370*2a1ad637SFrançois Tigeot #define ASSP_CLK_49MHZ_SELECT   0x08
371*2a1ad637SFrançois Tigeot #define FAST_PLU_ENABLE         0x10
372*2a1ad637SFrançois Tigeot #define ASSP_CTRL_A_RESERVED3   0x20
373*2a1ad637SFrançois Tigeot #define DSP_CLK_36MHZ_SELECT    0x40
374*2a1ad637SFrançois Tigeot 
375*2a1ad637SFrançois Tigeot #define ASSP_CONTROL_B          0xA4
376*2a1ad637SFrançois Tigeot #define RESET_ASSP              0x00
377*2a1ad637SFrançois Tigeot #define RUN_ASSP                0x01
378*2a1ad637SFrançois Tigeot #define ENABLE_ASSP_CLOCK       0x00
379*2a1ad637SFrançois Tigeot #define STOP_ASSP_CLOCK         0x10
380*2a1ad637SFrançois Tigeot #define RESET_TOGGLE            0x40
381*2a1ad637SFrançois Tigeot 
382*2a1ad637SFrançois Tigeot #define ASSP_CONTROL_C          0xA6
383*2a1ad637SFrançois Tigeot #define ASSP_HOST_INT_ENABLE    0x01
384*2a1ad637SFrançois Tigeot #define FM_ADDR_REMAP_DISABLE   0x02
385*2a1ad637SFrançois Tigeot #define HOST_WRITE_PORT_ENABLE  0x08
386*2a1ad637SFrançois Tigeot 
387*2a1ad637SFrançois Tigeot #define ASSP_HOST_INT_STATUS    0xAC
388*2a1ad637SFrançois Tigeot #define DSP2HOST_REQ_PIORECORD  0x01
389*2a1ad637SFrançois Tigeot #define DSP2HOST_REQ_I2SRATE    0x02
390*2a1ad637SFrançois Tigeot #define DSP2HOST_REQ_TIMER      0x04
391*2a1ad637SFrançois Tigeot 
392*2a1ad637SFrançois Tigeot /*
393*2a1ad637SFrançois Tigeot  * DSP memory map
394*2a1ad637SFrançois Tigeot  */
395*2a1ad637SFrançois Tigeot 
396*2a1ad637SFrançois Tigeot #define REV_A_CODE_MEMORY_BEGIN         0x0000
397*2a1ad637SFrançois Tigeot #define REV_A_CODE_MEMORY_END           0x0FFF
398*2a1ad637SFrançois Tigeot #define REV_A_CODE_MEMORY_UNIT_LENGTH   0x0040
399*2a1ad637SFrançois Tigeot #define REV_A_CODE_MEMORY_LENGTH        (REV_A_CODE_MEMORY_END - REV_A_CODE_MEMORY_BEGIN + 1)
400*2a1ad637SFrançois Tigeot 
401*2a1ad637SFrançois Tigeot #define REV_B_CODE_MEMORY_BEGIN         0x0000
402*2a1ad637SFrançois Tigeot #define REV_B_CODE_MEMORY_END           0x0BFF
403*2a1ad637SFrançois Tigeot #define REV_B_CODE_MEMORY_UNIT_LENGTH   0x0040
404*2a1ad637SFrançois Tigeot #define REV_B_CODE_MEMORY_LENGTH        (REV_B_CODE_MEMORY_END - REV_B_CODE_MEMORY_BEGIN + 1)
405*2a1ad637SFrançois Tigeot 
406*2a1ad637SFrançois Tigeot #if (REV_A_CODE_MEMORY_LENGTH % REV_A_CODE_MEMORY_UNIT_LENGTH)
407*2a1ad637SFrançois Tigeot #error Assumption about code memory unit length failed.
408*2a1ad637SFrançois Tigeot #endif
409*2a1ad637SFrançois Tigeot #if (REV_B_CODE_MEMORY_LENGTH % REV_B_CODE_MEMORY_UNIT_LENGTH)
410*2a1ad637SFrançois Tigeot #error Assumption about code memory unit length failed.
411*2a1ad637SFrançois Tigeot #endif
412*2a1ad637SFrançois Tigeot 
413*2a1ad637SFrançois Tigeot #define REV_A_DATA_MEMORY_BEGIN         0x1000
414*2a1ad637SFrançois Tigeot #define REV_A_DATA_MEMORY_END           0x2FFF
415*2a1ad637SFrançois Tigeot #define REV_A_DATA_MEMORY_UNIT_LENGTH   0x0080
416*2a1ad637SFrançois Tigeot #define REV_A_DATA_MEMORY_LENGTH        (REV_A_DATA_MEMORY_END - REV_A_DATA_MEMORY_BEGIN + 1)
417*2a1ad637SFrançois Tigeot 
418*2a1ad637SFrançois Tigeot #define REV_B_DATA_MEMORY_BEGIN         0x1000
419*2a1ad637SFrançois Tigeot /*#define REV_B_DATA_MEMORY_END           0x23FF */
420*2a1ad637SFrançois Tigeot #define REV_B_DATA_MEMORY_END           0x2BFF
421*2a1ad637SFrançois Tigeot #define REV_B_DATA_MEMORY_UNIT_LENGTH   0x0080
422*2a1ad637SFrançois Tigeot #define REV_B_DATA_MEMORY_LENGTH        (REV_B_DATA_MEMORY_END - REV_B_DATA_MEMORY_BEGIN + 1)
423*2a1ad637SFrançois Tigeot 
424*2a1ad637SFrançois Tigeot #if (REV_A_DATA_MEMORY_LENGTH % REV_A_DATA_MEMORY_UNIT_LENGTH)
425*2a1ad637SFrançois Tigeot #error Assumption about data memory unit length failed.
426*2a1ad637SFrançois Tigeot #endif
427*2a1ad637SFrançois Tigeot #if (REV_B_DATA_MEMORY_LENGTH % REV_B_DATA_MEMORY_UNIT_LENGTH)
428*2a1ad637SFrançois Tigeot #error Assumption about data memory unit length failed.
429*2a1ad637SFrançois Tigeot #endif
430*2a1ad637SFrançois Tigeot 
431*2a1ad637SFrançois Tigeot #define CODE_MEMORY_MAP_LENGTH          (64 + 1)
432*2a1ad637SFrançois Tigeot #define DATA_MEMORY_MAP_LENGTH          (64 + 1)
433*2a1ad637SFrançois Tigeot 
434*2a1ad637SFrançois Tigeot #if (CODE_MEMORY_MAP_LENGTH < ((REV_A_CODE_MEMORY_LENGTH / REV_A_CODE_MEMORY_UNIT_LENGTH) + 1))
435*2a1ad637SFrançois Tigeot #error Code memory map length too short.
436*2a1ad637SFrançois Tigeot #endif
437*2a1ad637SFrançois Tigeot #if (DATA_MEMORY_MAP_LENGTH < ((REV_A_DATA_MEMORY_LENGTH / REV_A_DATA_MEMORY_UNIT_LENGTH) + 1))
438*2a1ad637SFrançois Tigeot #error Data memory map length too short.
439*2a1ad637SFrançois Tigeot #endif
440*2a1ad637SFrançois Tigeot #if (CODE_MEMORY_MAP_LENGTH < ((REV_B_CODE_MEMORY_LENGTH / REV_B_CODE_MEMORY_UNIT_LENGTH) + 1))
441*2a1ad637SFrançois Tigeot #error Code memory map length too short.
442*2a1ad637SFrançois Tigeot #endif
443*2a1ad637SFrançois Tigeot #if (DATA_MEMORY_MAP_LENGTH < ((REV_B_DATA_MEMORY_LENGTH / REV_B_DATA_MEMORY_UNIT_LENGTH) + 1))
444*2a1ad637SFrançois Tigeot #error Data memory map length too short.
445*2a1ad637SFrançois Tigeot #endif
446*2a1ad637SFrançois Tigeot 
447*2a1ad637SFrançois Tigeot 
448*2a1ad637SFrançois Tigeot /*
449*2a1ad637SFrançois Tigeot  * Kernel code memory definition
450*2a1ad637SFrançois Tigeot  */
451*2a1ad637SFrançois Tigeot 
452*2a1ad637SFrançois Tigeot #define KCODE_VECTORS_BEGIN             0x0000
453*2a1ad637SFrançois Tigeot #define KCODE_VECTORS_END               0x002F
454*2a1ad637SFrançois Tigeot #define KCODE_VECTORS_UNIT_LENGTH       0x0002
455*2a1ad637SFrançois Tigeot #define KCODE_VECTORS_LENGTH            (KCODE_VECTORS_END - KCODE_VECTORS_BEGIN + 1)
456*2a1ad637SFrançois Tigeot 
457*2a1ad637SFrançois Tigeot 
458*2a1ad637SFrançois Tigeot /*
459*2a1ad637SFrançois Tigeot  * Kernel data memory definition
460*2a1ad637SFrançois Tigeot  */
461*2a1ad637SFrançois Tigeot 
462*2a1ad637SFrançois Tigeot #define KDATA_BASE_ADDR                 0x1000
463*2a1ad637SFrançois Tigeot #define KDATA_BASE_ADDR2                0x1080
464*2a1ad637SFrançois Tigeot 
465*2a1ad637SFrançois Tigeot #define KDATA_TASK0                     (KDATA_BASE_ADDR + 0x0000)
466*2a1ad637SFrançois Tigeot #define KDATA_TASK1                     (KDATA_BASE_ADDR + 0x0001)
467*2a1ad637SFrançois Tigeot #define KDATA_TASK2                     (KDATA_BASE_ADDR + 0x0002)
468*2a1ad637SFrançois Tigeot #define KDATA_TASK3                     (KDATA_BASE_ADDR + 0x0003)
469*2a1ad637SFrançois Tigeot #define KDATA_TASK4                     (KDATA_BASE_ADDR + 0x0004)
470*2a1ad637SFrançois Tigeot #define KDATA_TASK5                     (KDATA_BASE_ADDR + 0x0005)
471*2a1ad637SFrançois Tigeot #define KDATA_TASK6                     (KDATA_BASE_ADDR + 0x0006)
472*2a1ad637SFrançois Tigeot #define KDATA_TASK7                     (KDATA_BASE_ADDR + 0x0007)
473*2a1ad637SFrançois Tigeot #define KDATA_TASK_ENDMARK              (KDATA_BASE_ADDR + 0x0008)
474*2a1ad637SFrançois Tigeot 
475*2a1ad637SFrançois Tigeot #define KDATA_CURRENT_TASK              (KDATA_BASE_ADDR + 0x0009)
476*2a1ad637SFrançois Tigeot #define KDATA_TASK_SWITCH               (KDATA_BASE_ADDR + 0x000A)
477*2a1ad637SFrançois Tigeot 
478*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_POS3D           (KDATA_BASE_ADDR + 0x000B)
479*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE1_POS3D           (KDATA_BASE_ADDR + 0x000C)
480*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE2_POS3D           (KDATA_BASE_ADDR + 0x000D)
481*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE3_POS3D           (KDATA_BASE_ADDR + 0x000E)
482*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE4_POS3D           (KDATA_BASE_ADDR + 0x000F)
483*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE5_POS3D           (KDATA_BASE_ADDR + 0x0010)
484*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE6_POS3D           (KDATA_BASE_ADDR + 0x0011)
485*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE7_POS3D           (KDATA_BASE_ADDR + 0x0012)
486*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE8_POS3D           (KDATA_BASE_ADDR + 0x0013)
487*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_POS3D_ENDMARK    (KDATA_BASE_ADDR + 0x0014)
488*2a1ad637SFrançois Tigeot 
489*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_SPKVIRT         (KDATA_BASE_ADDR + 0x0015)
490*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_SPKVIRT_ENDMARK  (KDATA_BASE_ADDR + 0x0016)
491*2a1ad637SFrançois Tigeot 
492*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_SPDIF           (KDATA_BASE_ADDR + 0x0017)
493*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_SPDIF_ENDMARK    (KDATA_BASE_ADDR + 0x0018)
494*2a1ad637SFrançois Tigeot 
495*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_MODEM           (KDATA_BASE_ADDR + 0x0019)
496*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_MODEM_ENDMARK    (KDATA_BASE_ADDR + 0x001A)
497*2a1ad637SFrançois Tigeot 
498*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_SRC             (KDATA_BASE_ADDR + 0x001B)
499*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE1_SRC             (KDATA_BASE_ADDR + 0x001C)
500*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_SRC_ENDMARK      (KDATA_BASE_ADDR + 0x001D)
501*2a1ad637SFrançois Tigeot 
502*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_MINISRC         (KDATA_BASE_ADDR + 0x001E)
503*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE1_MINISRC         (KDATA_BASE_ADDR + 0x001F)
504*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE2_MINISRC         (KDATA_BASE_ADDR + 0x0020)
505*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE3_MINISRC         (KDATA_BASE_ADDR + 0x0021)
506*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_MINISRC_ENDMARK  (KDATA_BASE_ADDR + 0x0022)
507*2a1ad637SFrançois Tigeot 
508*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE0_CPYTHRU         (KDATA_BASE_ADDR + 0x0023)
509*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE1_CPYTHRU         (KDATA_BASE_ADDR + 0x0024)
510*2a1ad637SFrançois Tigeot #define KDATA_INSTANCE_CPYTHRU_ENDMARK  (KDATA_BASE_ADDR + 0x0025)
511*2a1ad637SFrançois Tigeot 
512*2a1ad637SFrançois Tigeot #define KDATA_CURRENT_DMA               (KDATA_BASE_ADDR + 0x0026)
513*2a1ad637SFrançois Tigeot #define KDATA_DMA_SWITCH                (KDATA_BASE_ADDR + 0x0027)
514*2a1ad637SFrançois Tigeot #define KDATA_DMA_ACTIVE                (KDATA_BASE_ADDR + 0x0028)
515*2a1ad637SFrançois Tigeot 
516*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER0                 (KDATA_BASE_ADDR + 0x0029)
517*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER1                 (KDATA_BASE_ADDR + 0x002A)
518*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER2                 (KDATA_BASE_ADDR + 0x002B)
519*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER3                 (KDATA_BASE_ADDR + 0x002C)
520*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER4                 (KDATA_BASE_ADDR + 0x002D)
521*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER5                 (KDATA_BASE_ADDR + 0x002E)
522*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER6                 (KDATA_BASE_ADDR + 0x002F)
523*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER7                 (KDATA_BASE_ADDR + 0x0030)
524*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER8                 (KDATA_BASE_ADDR + 0x0031)
525*2a1ad637SFrançois Tigeot #define KDATA_DMA_XFER_ENDMARK          (KDATA_BASE_ADDR + 0x0032)
526*2a1ad637SFrançois Tigeot 
527*2a1ad637SFrançois Tigeot #define KDATA_I2S_SAMPLE_COUNT          (KDATA_BASE_ADDR + 0x0033)
528*2a1ad637SFrançois Tigeot #define KDATA_I2S_INT_METER             (KDATA_BASE_ADDR + 0x0034)
529*2a1ad637SFrançois Tigeot #define KDATA_I2S_ACTIVE                (KDATA_BASE_ADDR + 0x0035)
530*2a1ad637SFrançois Tigeot 
531*2a1ad637SFrançois Tigeot #define KDATA_TIMER_COUNT_RELOAD        (KDATA_BASE_ADDR + 0x0036)
532*2a1ad637SFrançois Tigeot #define KDATA_TIMER_COUNT_CURRENT       (KDATA_BASE_ADDR + 0x0037)
533*2a1ad637SFrançois Tigeot 
534*2a1ad637SFrançois Tigeot #define KDATA_HALT_SYNCH_CLIENT         (KDATA_BASE_ADDR + 0x0038)
535*2a1ad637SFrançois Tigeot #define KDATA_HALT_SYNCH_DMA            (KDATA_BASE_ADDR + 0x0039)
536*2a1ad637SFrançois Tigeot #define KDATA_HALT_ACKNOWLEDGE          (KDATA_BASE_ADDR + 0x003A)
537*2a1ad637SFrançois Tigeot 
538*2a1ad637SFrançois Tigeot #define KDATA_ADC1_XFER0                (KDATA_BASE_ADDR + 0x003B)
539*2a1ad637SFrançois Tigeot #define KDATA_ADC1_XFER_ENDMARK         (KDATA_BASE_ADDR + 0x003C)
540*2a1ad637SFrançois Tigeot #define KDATA_ADC1_LEFT_VOLUME		(KDATA_BASE_ADDR + 0x003D)
541*2a1ad637SFrançois Tigeot #define KDATA_ADC1_RIGHT_VOLUME  	(KDATA_BASE_ADDR + 0x003E)
542*2a1ad637SFrançois Tigeot #define KDATA_ADC1_LEFT_SUR_VOL		(KDATA_BASE_ADDR + 0x003F)
543*2a1ad637SFrançois Tigeot #define KDATA_ADC1_RIGHT_SUR_VOL	(KDATA_BASE_ADDR + 0x0040)
544*2a1ad637SFrançois Tigeot 
545*2a1ad637SFrançois Tigeot #define KDATA_ADC2_XFER0                (KDATA_BASE_ADDR + 0x0041)
546*2a1ad637SFrançois Tigeot #define KDATA_ADC2_XFER_ENDMARK         (KDATA_BASE_ADDR + 0x0042)
547*2a1ad637SFrançois Tigeot #define KDATA_ADC2_LEFT_VOLUME		(KDATA_BASE_ADDR + 0x0043)
548*2a1ad637SFrançois Tigeot #define KDATA_ADC2_RIGHT_VOLUME		(KDATA_BASE_ADDR + 0x0044)
549*2a1ad637SFrançois Tigeot #define KDATA_ADC2_LEFT_SUR_VOL		(KDATA_BASE_ADDR + 0x0045)
550*2a1ad637SFrançois Tigeot #define KDATA_ADC2_RIGHT_SUR_VOL	(KDATA_BASE_ADDR + 0x0046)
551*2a1ad637SFrançois Tigeot 
552*2a1ad637SFrançois Tigeot #define KDATA_CD_XFER0			(KDATA_BASE_ADDR + 0x0047)
553*2a1ad637SFrançois Tigeot #define KDATA_CD_XFER_ENDMARK		(KDATA_BASE_ADDR + 0x0048)
554*2a1ad637SFrançois Tigeot #define KDATA_CD_LEFT_VOLUME		(KDATA_BASE_ADDR + 0x0049)
555*2a1ad637SFrançois Tigeot #define KDATA_CD_RIGHT_VOLUME		(KDATA_BASE_ADDR + 0x004A)
556*2a1ad637SFrançois Tigeot #define KDATA_CD_LEFT_SUR_VOL		(KDATA_BASE_ADDR + 0x004B)
557*2a1ad637SFrançois Tigeot #define KDATA_CD_RIGHT_SUR_VOL		(KDATA_BASE_ADDR + 0x004C)
558*2a1ad637SFrançois Tigeot 
559*2a1ad637SFrançois Tigeot #define KDATA_MIC_XFER0			(KDATA_BASE_ADDR + 0x004D)
560*2a1ad637SFrançois Tigeot #define KDATA_MIC_XFER_ENDMARK		(KDATA_BASE_ADDR + 0x004E)
561*2a1ad637SFrançois Tigeot #define KDATA_MIC_VOLUME		(KDATA_BASE_ADDR + 0x004F)
562*2a1ad637SFrançois Tigeot #define KDATA_MIC_SUR_VOL		(KDATA_BASE_ADDR + 0x0050)
563*2a1ad637SFrançois Tigeot 
564*2a1ad637SFrançois Tigeot #define KDATA_I2S_XFER0                 (KDATA_BASE_ADDR + 0x0051)
565*2a1ad637SFrançois Tigeot #define KDATA_I2S_XFER_ENDMARK          (KDATA_BASE_ADDR + 0x0052)
566*2a1ad637SFrançois Tigeot 
567*2a1ad637SFrançois Tigeot #define KDATA_CHI_XFER0                 (KDATA_BASE_ADDR + 0x0053)
568*2a1ad637SFrançois Tigeot #define KDATA_CHI_XFER_ENDMARK          (KDATA_BASE_ADDR + 0x0054)
569*2a1ad637SFrançois Tigeot 
570*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_XFER                (KDATA_BASE_ADDR + 0x0055)
571*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_CURRENT_FRAME       (KDATA_BASE_ADDR + 0x0056)
572*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_FRAME0              (KDATA_BASE_ADDR + 0x0057)
573*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_FRAME1              (KDATA_BASE_ADDR + 0x0058)
574*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_FRAME2              (KDATA_BASE_ADDR + 0x0059)
575*2a1ad637SFrançois Tigeot 
576*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_REQUEST             (KDATA_BASE_ADDR + 0x005A)
577*2a1ad637SFrançois Tigeot #define KDATA_SPDIF_TEMP                (KDATA_BASE_ADDR + 0x005B)
578*2a1ad637SFrançois Tigeot 
579*2a1ad637SFrançois Tigeot /*AY SPDIF IN */
580*2a1ad637SFrançois Tigeot #define KDATA_SPDIFIN_XFER0             (KDATA_BASE_ADDR + 0x005C)
581*2a1ad637SFrançois Tigeot #define KDATA_SPDIFIN_XFER_ENDMARK      (KDATA_BASE_ADDR + 0x005D)
582*2a1ad637SFrançois Tigeot #define KDATA_SPDIFIN_INT_METER         (KDATA_BASE_ADDR + 0x005E)
583*2a1ad637SFrançois Tigeot 
584*2a1ad637SFrançois Tigeot #define KDATA_DSP_RESET_COUNT           (KDATA_BASE_ADDR + 0x005F)
585*2a1ad637SFrançois Tigeot #define KDATA_DEBUG_OUTPUT              (KDATA_BASE_ADDR + 0x0060)
586*2a1ad637SFrançois Tigeot 
587*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_LIST           (KDATA_BASE_ADDR + 0x0061)
588*2a1ad637SFrançois Tigeot 
589*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_CBSR1          (KDATA_BASE_ADDR + 0x0062)
590*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_CBER1          (KDATA_BASE_ADDR + 0x0063)
591*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_CBCR           (KDATA_BASE_ADDR + 0x0064)
592*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR0            (KDATA_BASE_ADDR + 0x0065)
593*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR1            (KDATA_BASE_ADDR + 0x0066)
594*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR2            (KDATA_BASE_ADDR + 0x0067)
595*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR3            (KDATA_BASE_ADDR + 0x0068)
596*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR4            (KDATA_BASE_ADDR + 0x0069)
597*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_AR5            (KDATA_BASE_ADDR + 0x006A)
598*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_BRCR           (KDATA_BASE_ADDR + 0x006B)
599*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_PASR           (KDATA_BASE_ADDR + 0x006C)
600*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_PAER           (KDATA_BASE_ADDR + 0x006D)
601*2a1ad637SFrançois Tigeot 
602*2a1ad637SFrançois Tigeot #define KDATA_CLIENT_SCRATCH0           (KDATA_BASE_ADDR + 0x006E)
603*2a1ad637SFrançois Tigeot #define KDATA_CLIENT_SCRATCH1           (KDATA_BASE_ADDR + 0x006F)
604*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_SCRATCH            (KDATA_BASE_ADDR + 0x0070)
605*2a1ad637SFrançois Tigeot #define KDATA_KERNEL_ISR_SCRATCH        (KDATA_BASE_ADDR + 0x0071)
606*2a1ad637SFrançois Tigeot 
607*2a1ad637SFrançois Tigeot #define KDATA_OUEUE_LEFT                (KDATA_BASE_ADDR + 0x0072)
608*2a1ad637SFrançois Tigeot #define KDATA_QUEUE_RIGHT               (KDATA_BASE_ADDR + 0x0073)
609*2a1ad637SFrançois Tigeot 
610*2a1ad637SFrançois Tigeot #define KDATA_ADC1_REQUEST              (KDATA_BASE_ADDR + 0x0074)
611*2a1ad637SFrançois Tigeot #define KDATA_ADC2_REQUEST              (KDATA_BASE_ADDR + 0x0075)
612*2a1ad637SFrançois Tigeot #define KDATA_CD_REQUEST		(KDATA_BASE_ADDR + 0x0076)
613*2a1ad637SFrançois Tigeot #define KDATA_MIC_REQUEST		(KDATA_BASE_ADDR + 0x0077)
614*2a1ad637SFrançois Tigeot 
615*2a1ad637SFrançois Tigeot #define KDATA_ADC1_MIXER_REQUEST        (KDATA_BASE_ADDR + 0x0078)
616*2a1ad637SFrançois Tigeot #define KDATA_ADC2_MIXER_REQUEST        (KDATA_BASE_ADDR + 0x0079)
617*2a1ad637SFrançois Tigeot #define KDATA_CD_MIXER_REQUEST		(KDATA_BASE_ADDR + 0x007A)
618*2a1ad637SFrançois Tigeot #define KDATA_MIC_MIXER_REQUEST		(KDATA_BASE_ADDR + 0x007B)
619*2a1ad637SFrançois Tigeot #define KDATA_MIC_SYNC_COUNTER		(KDATA_BASE_ADDR + 0x007C)
620*2a1ad637SFrançois Tigeot 
621*2a1ad637SFrançois Tigeot /*
622*2a1ad637SFrançois Tigeot  * second segment
623*2a1ad637SFrançois Tigeot  */
624*2a1ad637SFrançois Tigeot 
625*2a1ad637SFrançois Tigeot /* smart mixer buffer */
626*2a1ad637SFrançois Tigeot 
627*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD0               (KDATA_BASE_ADDR2 + 0x0000)
628*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD1               (KDATA_BASE_ADDR2 + 0x0001)
629*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD2               (KDATA_BASE_ADDR2 + 0x0002)
630*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD3               (KDATA_BASE_ADDR2 + 0x0003)
631*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD4               (KDATA_BASE_ADDR2 + 0x0004)
632*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD5               (KDATA_BASE_ADDR2 + 0x0005)
633*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD6               (KDATA_BASE_ADDR2 + 0x0006)
634*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD7               (KDATA_BASE_ADDR2 + 0x0007)
635*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD8               (KDATA_BASE_ADDR2 + 0x0008)
636*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORD9               (KDATA_BASE_ADDR2 + 0x0009)
637*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDA               (KDATA_BASE_ADDR2 + 0x000A)
638*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDB               (KDATA_BASE_ADDR2 + 0x000B)
639*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDC               (KDATA_BASE_ADDR2 + 0x000C)
640*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDD               (KDATA_BASE_ADDR2 + 0x000D)
641*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDE               (KDATA_BASE_ADDR2 + 0x000E)
642*2a1ad637SFrançois Tigeot #define KDATA_MIXER_WORDF               (KDATA_BASE_ADDR2 + 0x000F)
643*2a1ad637SFrançois Tigeot 
644*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER0               (KDATA_BASE_ADDR2 + 0x0010)
645*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER1               (KDATA_BASE_ADDR2 + 0x0011)
646*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER2               (KDATA_BASE_ADDR2 + 0x0012)
647*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER3               (KDATA_BASE_ADDR2 + 0x0013)
648*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER4               (KDATA_BASE_ADDR2 + 0x0014)
649*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER5               (KDATA_BASE_ADDR2 + 0x0015)
650*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER6               (KDATA_BASE_ADDR2 + 0x0016)
651*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER7               (KDATA_BASE_ADDR2 + 0x0017)
652*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER8               (KDATA_BASE_ADDR2 + 0x0018)
653*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER9               (KDATA_BASE_ADDR2 + 0x0019)
654*2a1ad637SFrançois Tigeot #define KDATA_MIXER_XFER_ENDMARK        (KDATA_BASE_ADDR2 + 0x001A)
655*2a1ad637SFrançois Tigeot 
656*2a1ad637SFrançois Tigeot #define KDATA_MIXER_TASK_NUMBER         (KDATA_BASE_ADDR2 + 0x001B)
657*2a1ad637SFrançois Tigeot #define KDATA_CURRENT_MIXER             (KDATA_BASE_ADDR2 + 0x001C)
658*2a1ad637SFrançois Tigeot #define KDATA_MIXER_ACTIVE              (KDATA_BASE_ADDR2 + 0x001D)
659*2a1ad637SFrançois Tigeot #define KDATA_MIXER_BANK_STATUS         (KDATA_BASE_ADDR2 + 0x001E)
660*2a1ad637SFrançois Tigeot #define KDATA_DAC_LEFT_VOLUME	        (KDATA_BASE_ADDR2 + 0x001F)
661*2a1ad637SFrançois Tigeot #define KDATA_DAC_RIGHT_VOLUME          (KDATA_BASE_ADDR2 + 0x0020)
662*2a1ad637SFrançois Tigeot 
663*2a1ad637SFrançois Tigeot /*
664*2a1ad637SFrançois Tigeot  * Client data memory definition
665*2a1ad637SFrançois Tigeot  */
666*2a1ad637SFrançois Tigeot 
667*2a1ad637SFrançois Tigeot #define CDATA_INSTANCE_READY            0x00
668*2a1ad637SFrançois Tigeot 
669*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_ADDRL            0x01
670*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_ADDRH            0x02
671*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_END_PLUS_1L      0x03
672*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_END_PLUS_1H      0x04
673*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_CURRENTL         0x05
674*2a1ad637SFrançois Tigeot #define CDATA_HOST_SRC_CURRENTH         0x06
675*2a1ad637SFrançois Tigeot 
676*2a1ad637SFrançois Tigeot #define CDATA_IN_BUF_CONNECT            0x07
677*2a1ad637SFrançois Tigeot #define CDATA_OUT_BUF_CONNECT           0x08
678*2a1ad637SFrançois Tigeot 
679*2a1ad637SFrançois Tigeot #define CDATA_IN_BUF_BEGIN              0x09
680*2a1ad637SFrançois Tigeot #define CDATA_IN_BUF_END_PLUS_1         0x0A
681*2a1ad637SFrançois Tigeot #define CDATA_IN_BUF_HEAD               0x0B
682*2a1ad637SFrançois Tigeot #define CDATA_IN_BUF_TAIL               0x0C
683*2a1ad637SFrançois Tigeot 
684*2a1ad637SFrançois Tigeot #define CDATA_OUT_BUF_BEGIN             0x0D
685*2a1ad637SFrançois Tigeot #define CDATA_OUT_BUF_END_PLUS_1        0x0E
686*2a1ad637SFrançois Tigeot #define CDATA_OUT_BUF_HEAD              0x0F
687*2a1ad637SFrançois Tigeot #define CDATA_OUT_BUF_TAIL              0x10
688*2a1ad637SFrançois Tigeot 
689*2a1ad637SFrançois Tigeot #define CDATA_DMA_CONTROL               0x11
690*2a1ad637SFrançois Tigeot #define CDATA_RESERVED                  0x12
691*2a1ad637SFrançois Tigeot 
692*2a1ad637SFrançois Tigeot #define CDATA_FREQUENCY                 0x13
693*2a1ad637SFrançois Tigeot #define CDATA_LEFT_VOLUME               0x14
694*2a1ad637SFrançois Tigeot #define CDATA_RIGHT_VOLUME              0x15
695*2a1ad637SFrançois Tigeot #define CDATA_LEFT_SUR_VOL              0x16
696*2a1ad637SFrançois Tigeot #define CDATA_RIGHT_SUR_VOL             0x17
697*2a1ad637SFrançois Tigeot 
698*2a1ad637SFrançois Tigeot /* These are from Allegro hckernel.h */
699*2a1ad637SFrançois Tigeot #define CDATA_HEADER_LEN                0x18
700*2a1ad637SFrançois Tigeot #define SRC3_DIRECTION_OFFSET           CDATA_HEADER_LEN
701*2a1ad637SFrançois Tigeot #define SRC3_MODE_OFFSET                CDATA_HEADER_LEN + 1
702*2a1ad637SFrançois Tigeot #define SRC3_WORD_LENGTH_OFFSET         CDATA_HEADER_LEN + 2
703*2a1ad637SFrançois Tigeot #define SRC3_PARAMETER_OFFSET           CDATA_HEADER_LEN + 3
704*2a1ad637SFrançois Tigeot #define SRC3_COEFF_ADDR_OFFSET          CDATA_HEADER_LEN + 8
705*2a1ad637SFrançois Tigeot #define SRC3_FILTAP_ADDR_OFFSET         CDATA_HEADER_LEN + 10
706*2a1ad637SFrançois Tigeot #define SRC3_TEMP_INBUF_ADDR_OFFSET     CDATA_HEADER_LEN + 16
707*2a1ad637SFrançois Tigeot #define SRC3_TEMP_OUTBUF_ADDR_OFFSET    CDATA_HEADER_LEN + 17
708*2a1ad637SFrançois Tigeot #define FOR_FUTURE_USE                  10	/* for storing temporary variable in future */
709*2a1ad637SFrançois Tigeot 
710*2a1ad637SFrançois Tigeot /*
711*2a1ad637SFrançois Tigeot  * DMA control definition
712*2a1ad637SFrançois Tigeot  */
713*2a1ad637SFrançois Tigeot 
714*2a1ad637SFrançois Tigeot #define DMACONTROL_BLOCK_MASK           0x000F
715*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK0_SELECTOR           0x0000
716*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK1_SELECTOR           0x0001
717*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK2_SELECTOR           0x0002
718*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK3_SELECTOR           0x0003
719*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK4_SELECTOR           0x0004
720*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK5_SELECTOR           0x0005
721*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK6_SELECTOR           0x0006
722*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK7_SELECTOR           0x0007
723*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK8_SELECTOR           0x0008
724*2a1ad637SFrançois Tigeot #define  DMAC_BLOCK9_SELECTOR           0x0009
725*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKA_SELECTOR           0x000A
726*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKB_SELECTOR           0x000B
727*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKC_SELECTOR           0x000C
728*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKD_SELECTOR           0x000D
729*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKE_SELECTOR           0x000E
730*2a1ad637SFrançois Tigeot #define  DMAC_BLOCKF_SELECTOR           0x000F
731*2a1ad637SFrançois Tigeot #define DMACONTROL_PAGE_MASK            0x00F0
732*2a1ad637SFrançois Tigeot #define  DMAC_PAGE0_SELECTOR            0x0030
733*2a1ad637SFrançois Tigeot #define  DMAC_PAGE1_SELECTOR            0x0020
734*2a1ad637SFrançois Tigeot #define  DMAC_PAGE2_SELECTOR            0x0010
735*2a1ad637SFrançois Tigeot #define  DMAC_PAGE3_SELECTOR            0x0000
736*2a1ad637SFrançois Tigeot #define DMACONTROL_AUTOREPEAT           0x1000
737*2a1ad637SFrançois Tigeot #define DMACONTROL_STOPPED              0x2000
738*2a1ad637SFrançois Tigeot #define DMACONTROL_DIRECTION            0x0100
739*2a1ad637SFrançois Tigeot 
740*2a1ad637SFrançois Tigeot /*
741*2a1ad637SFrançois Tigeot  * Kernel/client memory allocation
742*2a1ad637SFrançois Tigeot  */
743*2a1ad637SFrançois Tigeot 
744*2a1ad637SFrançois Tigeot #define NUM_UNITS_KERNEL_CODE          16
745*2a1ad637SFrançois Tigeot #define NUM_UNITS_KERNEL_DATA           2
746*2a1ad637SFrançois Tigeot 
747*2a1ad637SFrançois Tigeot #define NUM_UNITS_KERNEL_CODE_WITH_HSP 16
748*2a1ad637SFrançois Tigeot #ifdef M3_MODEL
749*2a1ad637SFrançois Tigeot #define NUM_UNITS_KERNEL_DATA_WITH_HSP  5
750*2a1ad637SFrançois Tigeot #else
751*2a1ad637SFrançois Tigeot #define NUM_UNITS_KERNEL_DATA_WITH_HSP  4
752*2a1ad637SFrançois Tigeot #endif
753*2a1ad637SFrançois Tigeot 
754*2a1ad637SFrançois Tigeot #define NUM_UNITS( BYTES, UNITLEN )    ((((BYTES+1)>>1) + (UNITLEN-1)) / UNITLEN)
755*2a1ad637SFrançois Tigeot 
756*2a1ad637SFrançois Tigeot /*
757*2a1ad637SFrançois Tigeot  * DSP hardware
758*2a1ad637SFrançois Tigeot  */
759*2a1ad637SFrançois Tigeot 
760*2a1ad637SFrançois Tigeot #define DSP_PORT_TIMER_COUNT            0x06
761*2a1ad637SFrançois Tigeot #define DSP_PORT_MEMORY_INDEX           0x80
762*2a1ad637SFrançois Tigeot #define DSP_PORT_MEMORY_TYPE            0x82
763*2a1ad637SFrançois Tigeot #define DSP_PORT_MEMORY_DATA            0x84
764*2a1ad637SFrançois Tigeot #define DSP_PORT_CONTROL_REG_A          0xA2
765*2a1ad637SFrançois Tigeot #define DSP_PORT_CONTROL_REG_B          0xA4
766*2a1ad637SFrançois Tigeot #define DSP_PORT_CONTROL_REG_C          0xA6
767*2a1ad637SFrançois Tigeot 
768*2a1ad637SFrançois Tigeot #define MEMTYPE_INTERNAL_CODE           0x0002
769*2a1ad637SFrançois Tigeot #define MEMTYPE_INTERNAL_DATA           0x0003
770*2a1ad637SFrançois Tigeot #define MEMTYPE_MASK                    0x0003
771*2a1ad637SFrançois Tigeot 
772*2a1ad637SFrançois Tigeot #define REGB_ENABLE_RESET               0x01
773*2a1ad637SFrançois Tigeot #define REGB_STOP_CLOCK                 0x10
774*2a1ad637SFrançois Tigeot 
775*2a1ad637SFrançois Tigeot #define REGC_DISABLE_FM_MAPPING         0x02
776*2a1ad637SFrançois Tigeot 
777*2a1ad637SFrançois Tigeot #define DP_SHIFT_COUNT                  7
778*2a1ad637SFrançois Tigeot 
779*2a1ad637SFrançois Tigeot #define DMA_BLOCK_LENGTH                32
780*2a1ad637SFrançois Tigeot 
781*2a1ad637SFrançois Tigeot /* These are from Allegro srcmgr.h */
782*2a1ad637SFrançois Tigeot #define MINISRC_BIQUAD_STAGE    2
783*2a1ad637SFrançois Tigeot #define MINISRC_IN_BUFFER_SIZE   ( 0x50 * 2 )
784*2a1ad637SFrançois Tigeot #define MINISRC_OUT_BUFFER_SIZE  ( 0x50 * 2 * 2)
785*2a1ad637SFrançois Tigeot #define MINISRC_TMP_BUFFER_SIZE  ( 112 + ( MINISRC_BIQUAD_STAGE * 3 + 4 ) * 2 * 2 )
786*2a1ad637SFrançois Tigeot #define MINISRC_BIQUAD_STAGE    2
787*2a1ad637SFrançois Tigeot /* M. SRC LPF coefficient could be changed in the DSP code */
788*2a1ad637SFrançois Tigeot #define MINISRC_COEF_LOC          0X175
789*2a1ad637SFrançois Tigeot 
790*2a1ad637SFrançois Tigeot #endif	/* !_DEV_SOUND_PCI_ALLEGRO_REG_H */
791