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