source: GPL/alsa-kernel/include/sound/config.h@ 18

Last change on this file since 18 was 18, checked in by vladest, 20 years ago

initial import

File size: 4.2 KB
Line 
1/*
2 * Configuration header file for compilation of the ALSA driver
3 */
4
5#ifndef __ALSA_CONFIG_H__
6#define __ALSA_CONFIG_H__
7
8#define inline __inline
9#define __attribute__
10
11#include <linux/version.h>
12#include <linux/types.h>
13#include <linux/fcntl.h>
14#include <linux/signal.h>
15#include <linux/kdev_t.h>
16#include <linux/wait.h>
17#include <linux/list.h>
18#include <linux/init.h>
19#include <linux/dcache.h>
20#include <linux/vmalloc.h>
21#include <linux/tqueue.h>
22#include <linux/time.h>
23#include <linux/timer.h>
24#include <linux/stat.h>
25#include <linux/major.h>
26#include <linux/byteorder/little_endian.h>
27#include <asm/ioctl.h>
28#include <asm/hardirq.h>
29#include <asm/processor.h>
30#include <asm/siginfo.h>
31#include <dbgos2.h>
32
33extern int this_module[64];
34#define THIS_MODULE (void *)&this_module[0]
35#define MODULE_GENERIC_TABLE(gtype,name)
36#define MODULE_DEVICE_TABLE(type,name)
37#define CONFIG_PROC_FS
38#define CONFIG_PM
39#define PCI_NEW_SUSPEND
40#define CONFIG_PCI
41#define CONFIG_SND_SEQUENCER
42//#define CONFIG_SND_OSSEMUL
43#define SNDRV_LITTLE_ENDIAN
44#define EXPORT_SYMBOL(a)
45#define CONFIG_SOUND
46#define CONFIG_SND_VERSION "0.0.1"
47#define ATTRIBUTE_UNUSED
48
49#undef interrupt
50
51/*
52 * Power management requests
53 */
54enum
55{
56 PM_SUSPEND, /* enter D1-D3 */
57 PM_RESUME, /* enter D0 */
58
59 /* enable wake-on */
60 PM_SET_WAKEUP,
61
62 /* bus resource management */
63 PM_GET_RESOURCES,
64 PM_SET_RESOURCES,
65
66 /* base station management */
67 PM_EJECT,
68 PM_LOCK,
69};
70
71typedef int pm_request_t;
72
73/*
74 * Device types
75 */
76enum
77{
78 PM_UNKNOWN_DEV = 0, /* generic */
79 PM_SYS_DEV, /* system device (fan, KB controller, ...) */
80 PM_PCI_DEV, /* PCI device */
81 PM_USB_DEV, /* USB device */
82 PM_SCSI_DEV, /* SCSI device */
83 PM_ISA_DEV, /* ISA device */
84};
85
86typedef int pm_dev_t;
87
88/*
89 * System device hardware ID (PnP) values
90 */
91enum
92{
93 PM_SYS_UNKNOWN = 0x00000000, /* generic */
94 PM_SYS_KBC = 0x41d00303, /* keyboard controller */
95 PM_SYS_COM = 0x41d00500, /* serial port */
96 PM_SYS_IRDA = 0x41d00510, /* IRDA controller */
97 PM_SYS_FDC = 0x41d00700, /* floppy controller */
98 PM_SYS_VGA = 0x41d00900, /* VGA controller */
99 PM_SYS_PCMCIA = 0x41d00e00, /* PCMCIA controller */
100};
101
102/*
103 * Request handler callback
104 */
105struct pm_dev;
106
107typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
108
109/*
110 * Dynamic device information
111 */
112struct pm_dev
113{
114 pm_dev_t type;
115 unsigned long id;
116 pm_callback callback;
117 void *data;
118
119 unsigned long flags;
120 int state;
121 int prev_state;
122
123 struct list_head entry;
124};
125
126int pm_init(void);
127void pm_done(void);
128
129#define CONFIG_PM
130
131#define PM_IS_ACTIVE() 1
132
133/*
134 * Register a device with power management
135 */
136struct pm_dev *pm_register(pm_dev_t type,
137 unsigned long id,
138 pm_callback callback);
139
140/*
141 * Unregister a device with power management
142 */
143void pm_unregister(struct pm_dev *dev);
144
145/*
146 * Send a request to a single device
147 */
148int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
149
150#define fops_get(x) (x)
151#define fops_put(x) do { ; } while (0)
152
153#define __builtin_return_address(a) 0
154#define SetPageReserved(a) a
155#define ClearPageReserved(a) a
156#define set_current_state(a)
157#define try_inc_mod_count(x) ++(*(unsigned long *)x)
158#define try_module_get(x) try_inc_mod_count(x)
159static inline void module_put(struct module *module)
160{
161 if (module)
162 do {} while(0);
163}
164
165#define rwlock_init(x) *(x) = RW_LOCK_UNLOCKED;
166
167#define suser() 1
168
169#define snd_kill_fasync(fp, sig, band) kill_fasync(*(fp), sig, band)
170
171
172//what's this??
173#define capable(a) 1
174#define CAP_SYS_ADMIN 0
175
176#define BITS_PER_LONG 32
177
178#ifndef bitmap_member
179#define bitmap_member(name,bits) \
180 unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG]
181#endif
182
183#ifndef snd_card_set_dev
184#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
185#endif
186
187/* for easier backward-porting */
188#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
189#ifndef gameport_set_dev_parent
190#define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev))
191#define gameport_set_port_data(gp,r) ((gp)->port_data = (r))
192#define gameport_get_port_data(gp) (gp)->port_data
193#endif
194#endif
195
196#endif //__ALSA_CONFIG_H__
Note: See TracBrowser for help on using the repository browser.