ariareg.h revision 1.1 1 /*
2 * Copyright (c) 1995, 1996 Roland C. Dowdeswell. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Roland C. Dowdeswell.
15 * 4. The name of the authors may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 /*
31 * Macros to detect valid hardware configuration data.
32 */
33 #define ARIA_IRQ_VALID(irq) ((irq) == 10 || (irq) == 11 || (irq) == 12)
34 #define ARIA_DRQ_VALID(chan) ((chan) == 5 || (chan) == 6)
35 #define ARIA_BASE_VALID(base) ((base) == 0x290 || (base) == 0x280 || (base) == 0x2a0 || (base) == 0x2b0)
36
37 /*
38 * Aria DSP ports
39 * (abrieviated ARIADSP_)
40 */
41
42 #define ARIADSP_NPORT 8
43
44 #define ARIADSP_DSPDATA 0
45 #define ARIADSP_WRITE 0
46 #define ARIADSP_STATUS 2
47 #define ARIADSP_CONTROL 2
48 #define ARIADSP_DMAADDRESS 4
49 #define ARIADSP_DMADATA 6
50
51 /*
52 * Aria DSP Addresses and the like...
53 * (abrieviated ARIAA_)
54 */
55
56 #define ARIAA_HARDWARE_A 0x6050
57 #define ARIAA_MODEL_A 0x60c3
58 #define ARIAA_PLAY_FIFO_A 0x6100
59 #define ARIAA_REC_FIFO_A 0x6101
60 #define ARIAA_TASK_A 0x6102
61
62 /*
63 * DSP random values
64 * (abrieviated ARIAR_)
65 */
66
67 #define ARIAR_PROMETHEUS_KLUDGE 0x0001
68 #define ARIAR_NPOLL 30000
69 #define ARIAR_OPEN_PLAY 0x0002
70 #define ARIAR_OPEN_RECORD 0x0001
71 #define ARIAR_PLAY_CHAN 1
72 #define ARIAR_RECORD_CHAN 0
73 #define ARIAR_BUSY 0x8000
74 #define ARIAR_ARIA_SYNTH 0x0080
75 #define ARIAR_SR22K 0x0040
76 #define ARIAR_DSPINTWR 0x0008
77 #define ARIAR_PCINTWR 0x0002
78
79 /*
80 * Aria DSP Commands
81 * (abrieviated ARIADSPC_)
82 */
83
84 #define ARIADSPC_SYSINIT 0x0000 /* Initialise system */
85 #define ARIADSPC_FORMAT 0x0003 /* format (pcm8, pcm16, etc) */
86 #define ARIADSPC_MASTERVOLUME 0x0004
87 #define ARIADSPC_BLOCKSIZE 0x0005
88 #define ARIADSPC_MODE 0x0006
89 #define ARIADSPC_CDVOLUME 0x0007
90 #define ARIADSPC_MICVOLUME 0x0008
91 #define ARIADSPC_MIXERCONFIG 0x0009
92 #define ARIADSPC_FORCEINTR 0x000a /* Force an Interupt */
93 #define ARIADSPC_TRANSCOMPLETE 0x0010 /* Transfer Complete */
94 #define ARIADSPC_START_PLAY 0x0011
95 #define ARIADSPC_STOP_PLAY 0x0012
96 #define ARIADSPC_CHAN_VOL 0x0013
97 #define ARIADSPC_CHAN_PAN 0x0014
98 #define ARIADSPC_START_REC 0x0015
99 #define ARIADSPC_STOP_REC 0x0016
100 #define ARIADSPC_DAPVOL 0x0017 /* Digital Audio Playback Vol */
101 #define ARIADSPC_ADCSOURCE 0x0030
102 #define ARIADSPC_ADCCONTROL 0x0031 /* Turn ADC off/on */
103 #define ARIADSPC_INPMONMODE 0x0032 /* Input Monitor Mode */
104 #define ARIADSPC_MASMONMODE 0x0033 /* Master Monitor Mode */
105 #define ARIADSPC_MIXERVOL 0x0034 /* Mixer Volumes */
106 #define ARIADSPC_TONE 0x0035 /* Tone controls */
107 #define ARIADSPC_TERM 0xffff /* End of Command */
108
109 /*
110 * DSP values (for commands)
111 * (abrieviated ARIAV_)
112 */
113
114 #define ARIAV_MODE_NO_SYNTH 0x0000 /* No synthesizer mode */
115
116 #define ARIAMIX_MIC_LVL 0
117 #define ARIAMIX_LINE_IN_LVL 1
118 #define ARIAMIX_CD_LVL 2
119 #define ARIAMIX_DAC_LVL 3
120 #define ARIAMIX_TEL_LVL 4
121 #define ARIAMIX_AUX_LVL 5
122 #define ARIAMIX_MASTER_LVL 6
123 #define ARIAMIX_MASTER_TREBLE 7
124 #define ARIAMIX_MASTER_BASS 8
125 #define ARIAMIX_RECORD_SOURCE 9
126 #define ARIAMIX_MIC_MUTE 10
127 #define ARIAMIX_LINE_IN_MUTE 11
128 #define ARIAMIX_CD_MUTE 12
129 #define ARIAMIX_DAC_MUTE 13
130 #define ARIAMIX_TEL_MUTE 14
131 #define ARIAMIX_AUX_MUTE 15
132 #define ARIAMIX_OUT_LVL 16
133 #define ARIAMIX_OUTPUT_CLASS 17
134 #define ARIAMIX_INPUT_CLASS 18
135 #define ARIAMIX_RECORD_CLASS 19
136 #define ARIAMIX_EQ_CLASS 20
137