source: cmedia/trunk/Cmpci/cmpcios2.h

Last change on this file was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 4.8 KB
Line 
1//----------------------------------------------------------------------//
2// //
3// File: CMCPIOS2.H //
4// //
5// (c) 2001 R.Ihle //
6// //
7// This program is free software; you can redistribute it and/or //
8// modify it under the terms of the GNU General Public License as //
9// published by the Free Software Foundation; either version 2 of //
10// the License, or (at your option) any later version. //
11// //
12// This program is distributed in the hope that it will be useful, //
13// but WITHOUT ANY WARRANTY; without even the implied warranty of //
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
15// GNU General Public License for more details. //
16// //
17// You should have received a copy of the GNU General Public //
18// License along with this program; if not, write to the Free //
19// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, //
20// USA. //
21// //
22//----------------------------------------------------------------------//
23
24#ifndef __CMPCIOS2_H
25#define __CMPCIOS2_H
26
27
28//----------------------------------------------------------------------//
29// Configuration //
30//----------------------------------------------------------------------//
31
32#define CONFIG_PCI
33#define CONFIG_SOUND_CMPCI
34#define CONFIG_SOUND_CMPCI_JOYSTICK
35#define CONFIG_SOUND_CMPCI_SPDIF5V
36
37#define CONFIG_SOUND_CMPCI_SPEAKERS 4
38
39//#define CONFIG_SOUND_CMPCI_MIDI
40#define CONFIG_SOUND_CMPCI_MPUIO 0x330
41
42//#define CONFIG_SOUND_CMPCI_FM
43#define CONFIG_SOUND_CMPCI_FMIO 0x388
44
45
46//#define CONFIG_SOUND_CMPCI_PCTEL
47
48
49//----------------------------------------------------------------------//
50// Debugging //
51//----------------------------------------------------------------------//
52
53#ifdef DEBUG
54 #define __static__
55 #ifdef KEE
56 #define printk DPE
57 #endif
58#else
59 #define __static__ static
60#endif
61
62
63//----------------------------------------------------------------------//
64// StackToFlat //
65//----------------------------------------------------------------------//
66
67#define LINUX
68#include "ossdefos2.h"
69#include "osssound.h"
70#include "stacktoflat.h"
71
72#ifdef KEE
73 #include <kee.h>
74#endif
75
76
77//----------------------------------------------------------------------//
78// Function prototypes //
79//----------------------------------------------------------------------//
80
81extern unsigned int hweight32(unsigned int w);
82
83
84
85//----------------------------------------------------------------------//
86// Emulate copy_to/from_user //
87//----------------------------------------------------------------------//
88
89#define __builtin_constant_p(n) 0
90#define __constant_copy_user_zeroing(to, from, n) memcpy(to, from, n)
91
92
93#define schedule_timeout(a) 1
94#define __set_current_state(a) (current->state = (a))
95
96
97#ifdef spin_lock_irqsave
98 #undef spin_lock_irqsave
99 #define spin_lock_irqsave(lock, flags) spin_lock(&flags)
100#endif
101
102
103#ifdef spin_unlock_irqrestore
104 #undef spin_unlock_irqrestore
105 #define spin_unlock_irqrestore(lock, flags) spin_unlock(&flags)
106#endif
107
108
109#ifdef MODULE_AUTHOR
110 #undef MODULE_AUTHOR
111 #define MODULE_AUTHOR(a)
112#endif
113
114#ifdef MODULE_DESCRIPTION
115 #undef MODULE_DESCRIPTION
116 #define MODULE_DESCRIPTION(a)
117#endif
118
119#ifdef MODULE_PARM
120 #undef MODULE_PARM
121 #define MODULE_PARM(a, b)
122#endif
123
124#ifdef MODULE_PARM_DESC
125 #undef MODULE_PARM_DESC
126 #define MODULE_PARM_DESC(a, b)
127#endif
128
129
130
131//----------------------------------------------------------------------//
132// New audio constants //
133//----------------------------------------------------------------------//
134
135#define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
136#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
137#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
138#define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */
139#define DSP_BIND_QUERY 0x00000000
140#define DSP_BIND_FRONT 0x00000001
141#define DSP_BIND_SURR 0x00000002
142#define DSP_BIND_CENTER_LFE 0x00000004
143#define DSP_BIND_HANDSET 0x00000008
144#define DSP_BIND_MIC 0x00000010
145#define DSP_BIND_MODEM1 0x00000020
146#define DSP_BIND_MODEM2 0x00000040
147#define DSP_BIND_I2S 0x00000080
148#define DSP_BIND_SPDIF 0x00000100
149
150
151
152//----------------------------------------------------------------------//
153// experimental stuff //
154//----------------------------------------------------------------------//
155
156struct timer_list
157{
158 struct timer_list *next;
159 int expires;
160 void (*function)(unsigned long);
161 unsigned long data;
162};
163
164
165void init_timer(struct timer_list *t);
166void add_timer(struct timer_list *t);
167void del_timer(struct timer_list *t);
168
169
170#endif
171
172
Note: See TracBrowser for help on using the repository browser.