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