2 **********************************************************************
4 * Copyright 1999, 2000 Creative Labs, Inc.
6 **********************************************************************
8 * Date Author Summary of changes
9 * ---- ------ ------------------
10 * October 20, 1999 Bertrand Lee base code release
11 * November 2, 1999 Alan Cox cleaned up
13 **********************************************************************
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public
26 * License along with this program; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
30 **********************************************************************
37 #include <linux/interrupt.h>
42 STIN_3BYTE, /* 0x80, 0x90, 0xA0, 0xB0, 0xE0 */
43 STIN_3BYTE_KEY, /* Byte 1 */
44 STIN_3BYTE_VEL, /* Byte 1 */
45 STIN_2BYTE, /* 0xC0, 0xD0 */
46 STIN_2BYTE_KEY, /* Byte 1 */
47 STIN_SYS_COMMON_2, /* 0xF1, 0xF3 */
48 STIN_SYS_COMMON_2_KEY,
49 STIN_SYS_COMMON_3, /* 0xF2 */
50 STIN_SYS_COMMON_3_KEY,
51 STIN_SYS_COMMON_3_VEL,
52 STIN_SYS_EX_NORM, /* 0xF0, Normal mode */
57 /* flags for card MIDI in object */
58 #define FLAGS_MIDM_STARTED 0x00001000 // Data has started to come in after Midm Start
59 #define MIDIIN_MAX_BUFFER_SIZE 200 // Definition for struct emu10k1_mpuin
70 struct midi_queue *firstmidiq;
71 struct midi_queue *lastmidiq;
72 unsigned qhead, qtail;
73 struct midi_data midiq[MIDIIN_MAX_BUFFER_SIZE];
74 struct tasklet_struct tasklet;
75 struct midi_openinfo openinfo;
77 /* For MIDI state machine */
78 u8 status; /* For MIDI running status */
79 u8 fstatus; /* For 0xFn status only */
80 midi_in_state curstate;
81 midi_in_state laststate;
87 int emu10k1_mpuin_open(struct emu10k1_card *, struct midi_openinfo *);
88 int emu10k1_mpuin_close(struct emu10k1_card *);
89 int emu10k1_mpuin_add_buffer(struct emu10k1_mpuin *, struct midi_hdr *);
90 int emu10k1_mpuin_start(struct emu10k1_card *);
91 int emu10k1_mpuin_stop(struct emu10k1_card *);
92 int emu10k1_mpuin_reset(struct emu10k1_card *);
94 int emu10k1_mpuin_irqhandler(struct emu10k1_card *);
95 void emu10k1_mpuin_bh(unsigned long);
97 #endif /* _CARDMI_H */