Changeset 442 for GPL/trunk/alsa-kernel/include/sound/config.h
- Timestamp:
- Jun 6, 2009, 11:07:11 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/include/sound/config.h
r441 r442 1 #ifndef __ALSA_CONFIG_H__ 2 #define __ALSA_CONFIG_H__ 3 1 4 /* 2 5 * Configuration header file for compilation of the ALSA driver 3 6 */ 4 7 5 #ifndef __ALSA_CONFIG_H__6 #define __ALSA_CONFIG_H__7 8 #define inline __inline9 #define INLINE inline10 #define __attribute__11 8 12 9 #include <linux/version.h> … … 40 37 #include <sys/cdefs.h> 41 38 #include <stdio.h> 42 43 typedef unsigned int fmode_t;44 45 /*46 * ==========================================================================47 */48 49 #ifdef ALSA_BUILD50 #undef MODULE51 #define MODULE52 #endif53 54 39 #include <linux/config.h> 55 #include <linux/version.h>56 57 #define LINUX_2_258 59 #ifdef ALSA_BUILD60 #if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)61 #define MODVERSIONS62 #include <linux/modversions.h>63 #include "sndversions.h"64 #endif65 #endif /* ALSA_BUILD */66 67 #ifndef SNDRV_MAIN_OBJECT_FILE68 #define __NO_VERSION__69 #endif70 40 #include <linux/module.h> 71 72 41 #include <linux/utsname.h> 73 42 #include <linux/errno.h> … … 76 45 #include <linux/malloc.h> 77 46 #include <linux/delay.h> 78 79 47 #include <linux/ioport.h> 80 81 48 #include <asm/io.h> 82 49 #include <asm/irq.h> … … 85 52 #include <asm/system.h> 86 53 #include <asm/string.h> 87 88 54 #include <linux/pci.h> 89 55 #include <linux/interrupt.h> … … 95 61 #include <linux/reboot.h> 96 62 #include <linux/init.h> 63 #include <linux/lockdep.h> 97 64 #include "compat_22.h" 98 99 #if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))100 #if (defined(CONFIG_ISAPNP_KERNEL) && defined(ALSA_BUILD)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 30) && !defined(ALSA_BUILD))101 #include <linux/isapnp.h>102 #define isapnp_dev pci_dev103 #define isapnp_card pci_bus104 #else105 #include "isapnp.h"106 #endif107 #undef __ISAPNP__108 #define __ISAPNP__109 #endif110 65 111 66 #include <sound/asound.h> 112 67 #include <sound/asoundef.h> 113 114 115 int snd_compat_schedule_work(struct work_struct *work);116 #define schedule_work(w) snd_compat_schedule_work(w)117 void snd_compat_flush_workqueue(struct workqueue_struct *wq);118 #define flush_workqueue(wq) snd_compat_flush_workqueue((wq));119 120 /* Name change */121 typedef struct timeval snd_timestamp_t;122 typedef union sndrv_pcm_sync_id snd_pcm_sync_id_t;123 124 #ifdef CONFIG_SND_DEBUG_MEMORY125 void *snd_wrapper_kmalloc(size_t, int);126 #undef kmalloc127 void snd_wrapper_kfree(const void *);128 #undef kfree129 void *snd_wrapper_vmalloc(size_t);130 #undef vmalloc131 void snd_wrapper_vfree(void *);132 #undef vfree133 #endif134 68 135 69 /* … … 137 71 */ 138 72 139 extern int this_module[64]; 140 #define THIS_MODULE (void *)&this_module[0] 141 #define MODULE_GENERIC_TABLE(gtype,name) 142 #define MODULE_DEVICE_TABLE(type,name) 73 #define ATTRIBUTE_UNUSED 74 #define CONFIG_HAS_DMA 75 #define CONFIG_HAVE_KZALLOC 76 #define CONFIG_HAVE_KCALLOC 77 #define CONFIG_HAVE_KSTRDUP 78 #define CONFIG_HAVE_MSLEEP 79 #define CONFIG_HAVE_PCI_DEV_PRESENT 80 #define CONFIG_PCI 81 #define CONFIG_PM 143 82 #define CONFIG_PROC_FS 144 #define CONFIG_PM 145 #define PCI_NEW_SUSPEND 146 #define CONFIG_PCI 147 #define CONFIG_HAS_DMA 148 #define CONFIG_SND_SEQUENCER 149 #define CONFIG_SND_OSSEMUL 150 #define CONFIG_SND_PCM_OSS 151 #define SNDRV_LITTLE_ENDIAN 152 #define EXPORT_SYMBOL(a) 153 #define CONFIG_SOUND 154 #define ATTRIBUTE_UNUSED 83 #define CONFIG_SND_DEBUG_DETECT 84 #define CONFIG_SND_DEBUG_VERBOSE 85 #define CONFIG_SND_HDA_CODEC_ANALOG 86 #define CONFIG_SND_HDA_CODEC_ATIHDMI 87 #define CONFIG_SND_HDA_CODEC_CONEXANT 88 #define CONFIG_SND_HDA_CODEC_CMEDIA 155 89 #define CONFIG_SND_HDA_CODEC_REALTEK 156 #define CONFIG_SND_HDA_CODEC_CMEDIA157 #define CONFIG_SND_HDA_CODEC_ANALOG158 90 #define CONFIG_SND_HDA_CODEC_SIGMATEL 159 91 #define CONFIG_SND_HDA_CODEC_SI3054 160 #define CONFIG_SND_HDA_CODEC_ATIHDMI161 #define CONFIG_SND_HDA_CODEC_CONEXANT162 92 #define CONFIG_SND_HDA_CODEC_VIA 163 93 #define CONFIG_SND_HDA_GENERIC 164 94 #define CONFIG_SND_HDA_HWDEP 165 #define CONFIG_ PM166 #define CONFIG_ HAVE_PCI_DEV_PRESENT167 #define CONFIG_SND_ DEBUG_DETECT168 #define CONFIG_S ND_DEBUG_VERBOSE95 #define CONFIG_SND_OSSEMUL 96 #define CONFIG_SND_PCM_OSS 97 #define CONFIG_SND_SEQUENCER 98 #define CONFIG_SOUND 169 99 #define CONFIG_SYSFS_DEPRECATED 100 #define PCI_NEW_SUSPEND 101 #define SNDRV_LITTLE_ENDIAN 102 103 104 /* Still need to work out where the following really belong */ 170 105 #undef interrupt 171 172 106 #define __builtin_return_address(a) 0 173 107 #define __builtin_expect(x, expected_value) (x) 174 175 176 #ifndef CONFIG_HAVE_KZALLOC177 void *snd_compat_kzalloc(size_t n, gfp_t gfp_flags);178 #define kzalloc(s,f) snd_compat_kzalloc(s,f)179 #endif180 181 #ifndef CONFIG_HAVE_KSTRDUP182 char *snd_compat_kstrdup(const char *s, unsigned int __nocast gfp_flags);183 #define kstrdup(s,f) snd_compat_kstrdup(s,f)184 #endif185 186 #ifndef CONFIG_HAVE_KCALLOC187 void *snd_compat_kcalloc(size_t n, size_t size, unsigned int __nocast gfp_flags);188 #define kcalloc(n,s,f) snd_compat_kcalloc(n,s,f)189 #endif190 191 struct workqueue_struct *snd_compat_create_workqueue(const char *name);192 #define create_workqueue(name) snd_compat_create_workqueue((name))193 void snd_compat_destroy_workqueue(struct workqueue_struct *wq);194 #define destroy_workqueue(wq) snd_compat_destroy_workqueue((wq))195 int snd_compat_queue_work(struct workqueue_struct *wq, struct work_struct *work);196 #define queue_work(wq, work) snd_compat_queue_work((wq), (work))197 198 #ifndef BUG_ON199 108 #define BUG_ON(x) /* nothing */ 200 #endif201 202 int snd_compat_devfs_mk_dir(const char *dir, ...);203 #define devfs_mk_dir snd_compat_devfs_mk_dir204 int snd_compat_devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...);205 #define devfs_mk_cdev snd_compat_devfs_mk_cdev206 void snd_compat_devfs_remove(const char *fmt, ...);207 #define devfs_remove snd_compat_devfs_remove208 #define SINGLE_DEPTH_NESTING 1209 210 #ifndef roundup211 #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))212 #endif213 214 215 /* msleep */216 #ifndef CONFIG_HAVE_MSLEEP217 void snd_compat_msleep(unsigned int msecs);218 #define msleep snd_compat_msleep219 #endif220 221 109 #define assert(a) 222 223 /* memdup_user() wrapper */224 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)225 #include <linux/err.h>226 #include <asm/uaccess.h>227 static inline void *memdup_user(void __user *src, size_t len)228 {229 void *p = kmalloc(len, GFP_KERNEL);230 if (!p)231 return ERR_PTR(-ENOMEM);232 if (copy_from_user(p, src, len)) {233 kfree(p);234 return ERR_PTR(-EFAULT);235 }236 return p;237 }238 #endif239 110 240 111 #endif //__ALSA_CONFIG_H__
Note:
See TracChangeset
for help on using the changeset viewer.