1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#ifndef __SEQ_OSS_EVENT_H
24#define __SEQ_OSS_EVENT_H
25
26#include "seq_oss_device.h"
27
28#define SHORT_EVENT_SIZE 4
29#define LONG_EVENT_SIZE 8
30
31
32struct evrec_short {
33 unsigned char code;
34 unsigned char parm1;
35 unsigned char dev;
36 unsigned char parm2;
37};
38
39
40struct evrec_note {
41 unsigned char code;
42 unsigned char chn;
43 unsigned char note;
44 unsigned char vel;
45};
46
47
48struct evrec_timer {
49 unsigned char code;
50 unsigned char cmd;
51 unsigned char dummy1, dummy2;
52 unsigned int time;
53};
54
55
56struct evrec_extended {
57 unsigned char code;
58 unsigned char cmd;
59 unsigned char dev;
60 unsigned char chn;
61 unsigned char p1, p2, p3, p4;
62};
63
64
65struct evrec_long {
66 unsigned char code;
67 unsigned char dev;
68 unsigned char cmd;
69 unsigned char chn;
70 unsigned char p1, p2;
71 unsigned short val;
72};
73
74
75struct evrec_voice {
76 unsigned char code;
77 unsigned char dev;
78 unsigned char cmd;
79 unsigned char chn;
80 unsigned char note, parm;
81 unsigned short dummy;
82};
83
84
85struct evrec_sysex {
86 unsigned char code;
87 unsigned char dev;
88 unsigned char buf[6];
89};
90
91
92union evrec {
93 struct evrec_short s;
94 struct evrec_note n;
95 struct evrec_long l;
96 struct evrec_voice v;
97 struct evrec_timer t;
98 struct evrec_extended e;
99 struct evrec_sysex x;
100 unsigned int echo;
101 unsigned char c[LONG_EVENT_SIZE];
102};
103
104#define ev_is_long(ev) ((ev)->s.code >= 128)
105#define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE)
106
107int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
108int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
109int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
110
111
112#endif
113