patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / sound / pci / au88x0 / au88x0.h
index 2ab68cf..815de18 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __SOUND_AU88X0_H
 #define __SOUND_AU88X0_H
 
+#ifdef __KERNEL__
 #include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/pci.h>
@@ -28,6 +29,8 @@
 #include <sound/hwdep.h>
 #include <sound/ac97_codec.h>
 
+#endif
+
 #ifndef CHIP_AU8820
 #include "au88x0_eq.h"
 #include "au88x0_a3d.h"
 #define IRQ_MODEM      0x4000
 
 /* ADB Resource */
-#define VORTEX_RESOURCE_DMA            0x00000000
-#define VORTEX_RESOURCE_SRC            0x00000001
+#define VORTEX_RESOURCE_DMA    0x00000000
+#define VORTEX_RESOURCE_SRC    0x00000001
 #define VORTEX_RESOURCE_MIXIN  0x00000002
 #define VORTEX_RESOURCE_MIXOUT 0x00000003
-#define VORTEX_RESOURCE_A3D            0x00000004
+#define VORTEX_RESOURCE_A3D    0x00000004
 #define VORTEX_RESOURCE_LAST   0x00000005
 
 /* Check for SDAC bit in "Extended audio ID" AC97 register */
-#define VORTEX_IS_QUAD(x) ((x->codec == NULL) ?  0 : (x->codec->ext_id|0x80))
+#define VORTEX_IS_QUAD(x) ((x->codec == NULL) ?  0 : (x->codec->ext_id&0x80))
 /* Check if chip has bug. */
 #define IS_BAD_CHIP(x) (\
-       (x->rev < 3 && x->device == PCI_DEVICE_ID_AUREAL_VORTEX) || \
-       (x->rev < 0xfe && x->device == PCI_DEVICE_ID_AUREAL_VORTEX2) || \
-       (x->rev < 0xfe && x->device == PCI_DEVICE_ID_AUREAL_ADVANTAGE))
+       (x->rev == 0xfe && x->device == PCI_DEVICE_ID_AUREAL_VORTEX_2) || \
+       (x->rev == 0xfe && x->device == PCI_DEVICE_ID_AUREAL_ADVANTAGE))
 
 
 /* PCM devices */