summaryrefslogtreecommitdiffstats
path: root/drivers/sound/msnd.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /drivers/sound/msnd.h
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'drivers/sound/msnd.h')
-rw-r--r--drivers/sound/msnd.h87
1 files changed, 42 insertions, 45 deletions
diff --git a/drivers/sound/msnd.h b/drivers/sound/msnd.h
index b0a330ca4..804cff425 100644
--- a/drivers/sound/msnd.h
+++ b/drivers/sound/msnd.h
@@ -24,16 +24,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: msnd.h,v 1.6 1998/07/18 00:12:15 andrewtv Exp $
+ * $Id: msnd.h,v 1.18 1998/09/04 18:43:40 andrewtv Exp $
*
********************************************************************/
#ifndef __MSND_H
#define __MSND_H
-#define VERSION "0.7.0"
+#define VERSION "0.7.13"
#define DEFSAMPLERATE DSP_DEFAULT_SPEED
-#define DEFSAMPLESIZE 8
+#define DEFSAMPLESIZE AFMT_U8
#define DEFCHANNELS 1
#define DEFFIFOSIZE 64
@@ -142,9 +142,9 @@
#define HDEX_MIDI_OUT_STOP (9 + HDEX_BASE)
#define HDEX_AUX_REQ (10 + HDEX_BASE)
-#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF ))
+#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))
#define LOWORD(l) ((WORD)(DWORD)(l))
-#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8 ) & 0xFF ))
+#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
#define LOBYTE(w) ((BYTE)(w))
#define MAKELONG(low,hi) ((long)(((WORD)(low))|(((DWORD)((WORD)(hi)))<<16)))
#define MAKEWORD(low,hi) ((WORD)(((BYTE)(low))|(((WORD)((BYTE)(hi)))<<8)))
@@ -166,33 +166,31 @@
# define spin_unlock_irqrestore(junk,flags) do { restore_flags(flags); } while (0)
#endif
-typedef unsigned char BYTE;
-typedef unsigned short USHORT;
-typedef unsigned short WORD;
-typedef unsigned int DWORD;
-typedef
-struct DAQueueDataStruct * LPDAQD;
-
-#define GCC_PACKED __attribute__ ((packed))
-
-struct JobQueueStruct {
- WORD wStart;
- WORD wSize;
- WORD wHead;
- WORD wTail;
-} GCC_PACKED;
-
-struct DAQueueDataStruct {
- WORD wStart;
- WORD wSize;
- WORD wFormat;
- WORD wSampleSize;
- WORD wChannels;
- WORD wSampleRate;
- WORD wIntMsg;
- WORD wFlags;
-} GCC_PACKED;
-
+/* JobQueueStruct */
+#define JQS_wStart 0x00
+#define JQS_wSize 0x02
+#define JQS_wHead 0x04
+#define JQS_wTail 0x06
+#define JQS__size 0x08
+
+/* DAQueueDataStruct */
+#define DAQDS_wStart 0x00
+#define DAQDS_wSize 0x02
+#define DAQDS_wFormat 0x04
+#define DAQDS_wSampleSize 0x06
+#define DAQDS_wChannels 0x08
+#define DAQDS_wSampleRate 0x0A
+#define DAQDS_wIntMsg 0x0C
+#define DAQDS_wFlags 0x0E
+#define DAQDS__size 0x10
+
+typedef u8 BYTE;
+typedef u16 USHORT;
+typedef u16 WORD;
+typedef u32 DWORD;
+typedef volatile BYTE * LPDAQD;
+
+/* Generic FIFO */
typedef struct {
size_t n, len;
char *data;
@@ -200,12 +198,12 @@ typedef struct {
} msnd_fifo;
typedef struct multisound_dev {
-
+ /* Linux device info */
char *name;
int dsp_minor, mixer_minor;
/* Hardware resources */
- unsigned int io, numio;
+ int io, numio;
int memid, irqid;
int irq, irq_ref;
unsigned char info;
@@ -214,16 +212,14 @@ typedef struct multisound_dev {
spinlock_t lock;
#endif
- /* MultiSound DDK variables */
- enum { msndClassic, msndPinnacle } type;
- struct SMA0_CommonData *SMA; /* diff. structure for classic vs. pinnacle */
- struct DAQueueDataStruct *CurDAQD;
- struct DAQueueDataStruct *CurDARQD;
- volatile WORD *pwDSPQData , *pwMIDQData , *pwMODQData;
- volatile struct JobQueueStruct *DAPQ , *DARQ , *MODQ , *MIDQ , *DSPQ;
- BYTE bCurrentMidiPatch;
+ /* Motorola 56k DSP SMA */
+ volatile BYTE *SMA;
+ volatile BYTE *CurDAQD, *CurDARQD;
+ volatile BYTE *DAPQ, *DARQ, *MODQ, *MIDQ, *DSPQ;
+ volatile WORD *pwDSPQData, *pwMIDQData, *pwMODQData;
/* State variables */
+ enum { msndClassic, msndPinnacle } type;
mode_t mode;
unsigned long flags;
#define F_BANKONE 0
@@ -236,27 +232,28 @@ typedef struct multisound_dev {
#define F_EXT_MIDI_INUSE 7
#define F_INT_MIDI_INUSE 8
#define F_WRITEFLUSH 9
-
+#define F_HAVEDIGITAL 10
struct wait_queue *writeblock, *readblock;
struct wait_queue *writeflush;
unsigned long recsrc;
int left_levels[16];
int right_levels[16];
+ int mixer_mod_count;
int calibrate_signal;
int sample_size;
int sample_rate;
int channels;
+ BYTE bCurrentMidiPatch;
void (*inc_ref)(void);
void (*dec_ref)(void);
/* Digital audio FIFOs */
- int fifosize;
msnd_fifo DAPF, DARF;
+ int fifosize;
int lastbank;
/* MIDI in callback */
void (*midi_in_interrupt)(struct multisound_dev *);
-
} multisound_dev_t;
#ifndef mdelay