This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / sound / emu10k1.h
index c1f6e99..31b0df1 100644 (file)
 #define FXGPREGBASE            0x100           /* FX general purpose registers base            */
 #define A_FXGPREGBASE          0x400           /* Audigy GPRs, 0x400 to 0x5ff                  */
 
-#define A_TANKMEMCTLREGBASE    0x100           /* Tank memory control registers base - only for Audigy */
-#define A_TANKMEMCTLREG_MASK   0x1f            /* only 5 bits used - only for Audigy */
-
 /* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is */
 /* decompressed back to 20 bits on a read.  There are a total of 160 locations, the last 32    */
 /* locations are for external TRAM.                                                            */
@@ -860,7 +857,7 @@ typedef struct {
        struct list_head list;          /* list link container */
        unsigned int vcount;
        unsigned int count;             /* count of GPR (1..16) */
-       unsigned short gpr[32];         /* GPR number(s) */
+       unsigned char gpr[32];          /* GPR number(s) */
        unsigned int value[32];
        unsigned int min;               /* minimum range */
        unsigned int max;               /* maximum range */
@@ -873,7 +870,7 @@ typedef void (snd_fx8010_irq_handler_t)(emu10k1_t *emu, void *private_data);
 typedef struct _snd_emu10k1_fx8010_irq {
        struct _snd_emu10k1_fx8010_irq *next;
        snd_fx8010_irq_handler_t *handler;
-       unsigned short gpr_running;
+       unsigned char gpr_running;
        void *private_data;
 } snd_emu10k1_fx8010_irq_t;
 
@@ -884,12 +881,12 @@ typedef struct {
        unsigned int channels;          /* 16-bit channels count */
        unsigned int tram_start;        /* initial ring buffer position in TRAM (in samples) */
        unsigned int buffer_size;       /* count of buffered samples */
-       unsigned short gpr_size;                /* GPR containing size of ring buffer in samples (host) */
-       unsigned short gpr_ptr;         /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
-       unsigned short gpr_count;       /* GPR containing count of samples between two interrupts (host) */
-       unsigned short gpr_tmpcount;    /* GPR containing current count of samples to interrupt (host = set, FX8010) */
-       unsigned short gpr_trigger;     /* GPR containing trigger (activate) information (host) */
-       unsigned short gpr_running;     /* GPR containing info if PCM is running (FX8010) */
+       unsigned char gpr_size;         /* GPR containing size of ring buffer in samples (host) */
+       unsigned char gpr_ptr;          /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
+       unsigned char gpr_count;        /* GPR containing count of samples between two interrupts (host) */
+       unsigned char gpr_tmpcount;     /* GPR containing current count of samples to interrupt (host = set, FX8010) */
+       unsigned char gpr_trigger;      /* GPR containing trigger (activate) information (host) */
+       unsigned char gpr_running;      /* GPR containing info if PCM is running (FX8010) */
        unsigned char etram[32];        /* external TRAM address & data */
        snd_pcm_indirect_t pcm_rec;
        unsigned int tram_pos;
@@ -1144,13 +1141,6 @@ int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
 #define ITRAM_ADDR(x)  (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */
 #define ETRAM_ADDR(x)  (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */
 
-#define A_ITRAM_DATA(x)        (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_DATA(x)        (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-#define A_ITRAM_ADDR(x)        (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_ADDR(x)        (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */
-#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */
-
 #define A_FXBUS(x)     (0x00 + (x))    /* x = 0x00 - 0x3f? */
 #define A_EXTIN(x)     (0x40 + (x))    /* x = 0x00 - 0x1f? */
 #define A_EXTOUT(x)    (0x60 + (x))    /* x = 0x00 - 0x1f? */
@@ -1279,11 +1269,8 @@ int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
 #define A_C_00100000   0xd5
 #define A_GPR_ACCU     0xd6            /* ACCUM, accumulator */
 #define A_GPR_COND     0xd7            /* CCR, condition register */
-#define A_GPR_NOISE0   0xd8            /* noise source */
-#define A_GPR_NOISE1   0xd9            /* noise source */
-#define A_GPR_IRQ      0xda            /* IRQ register */
-#define A_GPR_DBAC     0xdb            /* TRAM Delay Base Address Counter - internal */
-#define A_GPR_DBACE    0xde            /* TRAM Delay Base Address Counter - external */
+/* 0xd8 = noise1 */
+/* 0xd9 = noise2 */
 
 /* definitions for debug register */
 #define EMU10K1_DBG_ZC                 0x80000000      /* zero tram counter */
@@ -1323,7 +1310,7 @@ typedef struct {
        snd_ctl_elem_id_t id;           /* full control ID definition */
        unsigned int vcount;            /* visible count */
        unsigned int count;             /* count of GPR (1..16) */
-       unsigned short gpr[32];         /* GPR number(s) */
+       unsigned char gpr[32];          /* GPR number(s) */
        unsigned int value[32];         /* initial values */
        unsigned int min;               /* minimum range */
        unsigned int max;               /* maximum range */
@@ -1333,8 +1320,8 @@ typedef struct {
 typedef struct {
        char name[128];
 
-       DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
-       unsigned int gpr_map[0x200];      /* initializers */
+       unsigned long gpr_valid[0x100/(sizeof(unsigned long)*8)]; /* bitmask of valid initializers */
+       unsigned int gpr_map[0x100];      /* initializers */
 
        unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
        emu10k1_fx8010_control_gpr_t __user *gpr_add_controls; /* GPR controls to add/replace */
@@ -1346,12 +1333,12 @@ typedef struct {
        unsigned int gpr_list_control_total; /* total count of GPR controls */
        emu10k1_fx8010_control_gpr_t __user *gpr_list_controls; /* listed GPR controls */
 
-       DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
-       unsigned int tram_data_map[0x100]; /* data initializers */
-       unsigned int tram_addr_map[0x100]; /* map initializers */
+       unsigned long tram_valid[0xa0/(sizeof(unsigned long)*8)]; /* bitmask of valid initializers */
+       unsigned int tram_data_map[0xa0]; /* data initializers */
+       unsigned int tram_addr_map[0xa0]; /* map initializers */
 
-       DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
-       unsigned int code[1024][2];       /* one instruction - 64 bits */
+       unsigned long code_valid[512/(sizeof(unsigned long)*8)];  /* bitmask of valid instructions */
+       unsigned int code[512][2];        /* one instruction - 64 bits */
 } emu10k1_fx8010_code_t;
 
 typedef struct {
@@ -1367,12 +1354,12 @@ typedef struct {
        unsigned int channels;          /* 16-bit channels count, zero = remove this substream */
        unsigned int tram_start;        /* ring buffer position in TRAM (in samples) */
        unsigned int buffer_size;       /* count of buffered samples */
-       unsigned short gpr_size;                /* GPR containing size of ringbuffer in samples (host) */
-       unsigned short gpr_ptr;         /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
-       unsigned short gpr_count;       /* GPR containing count of samples between two interrupts (host) */
-       unsigned short gpr_tmpcount;    /* GPR containing current count of samples to interrupt (host = set, FX8010) */
-       unsigned short gpr_trigger;     /* GPR containing trigger (activate) information (host) */
-       unsigned short gpr_running;     /* GPR containing info if PCM is running (FX8010) */
+       unsigned char gpr_size;         /* GPR containing size of ringbuffer in samples (host) */
+       unsigned char gpr_ptr;          /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */
+       unsigned char gpr_count;        /* GPR containing count of samples between two interrupts (host) */
+       unsigned char gpr_tmpcount;     /* GPR containing current count of samples to interrupt (host = set, FX8010) */
+       unsigned char gpr_trigger;      /* GPR containing trigger (activate) information (host) */
+       unsigned char gpr_running;      /* GPR containing info if PCM is running (FX8010) */
        unsigned char pad;              /* reserved */
        unsigned char etram[32];        /* external TRAM address & data (one per channel) */
        unsigned int res2;              /* reserved */