1#ifndef __SOUND_ASOUND_FM_H
2#define __SOUND_ASOUND_FM_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29#define SNDRV_DM_FM_MODE_OPL2 0x00
30#define SNDRV_DM_FM_MODE_OPL3 0x01
31
32struct snd_dm_fm_info {
33 unsigned char fm_mode;
34 unsigned char rhythm;
35};
36
37
38
39
40
41struct snd_dm_fm_voice {
42 unsigned char op;
43 unsigned char voice;
44
45 unsigned char am;
46 unsigned char vibrato;
47 unsigned char do_sustain;
48 unsigned char kbd_scale;
49 unsigned char harmonic;
50 unsigned char scale_level;
51 unsigned char volume;
52
53 unsigned char attack;
54 unsigned char decay;
55 unsigned char sustain;
56 unsigned char release;
57
58 unsigned char feedback;
59 unsigned char connection;
60 unsigned char left;
61 unsigned char right;
62 unsigned char waveform;
63};
64
65
66
67
68
69
70struct snd_dm_fm_note {
71 unsigned char voice;
72 unsigned char octave;
73 unsigned int fnum;
74 unsigned char key_on;
75};
76
77
78
79
80
81struct snd_dm_fm_params {
82 unsigned char am_depth;
83 unsigned char vib_depth;
84 unsigned char kbd_split;
85 unsigned char rhythm;
86
87
88 unsigned char bass;
89 unsigned char snare;
90 unsigned char tomtom;
91 unsigned char cymbal;
92 unsigned char hihat;
93};
94
95
96
97
98
99#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info)
100#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21)
101#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note)
102#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice)
103#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params)
104#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int)
105
106#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int)
107
108#define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40)
109
110#define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20
111#define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21
112#define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22
113#define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23
114#define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24
115#define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25
116
117
118
119
120
121#define FM_KEY_SBI "SBI\032"
122#define FM_KEY_2OP "2OP\032"
123#define FM_KEY_4OP "4OP\032"
124
125struct sbi_patch {
126 unsigned char prog;
127 unsigned char bank;
128 char key[4];
129 char name[25];
130 char extension[7];
131 unsigned char data[32];
132};
133
134#endif
135