#ifndef __SOUND_AU88X0_H
#define __SOUND_AU88X0_H
+#ifdef __KERNEL__
#include <sound/driver.h>
#include <linux/init.h>
#include <linux/pci.h>
#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 */