26 static char snd_opl3_drum_table[47] =
83 static void snd_opl3_drum_voice_set(
struct snd_opl3 *opl3,
87 unsigned char voice_offset = data->
voice;
88 unsigned short opl3_reg;
118 static void snd_opl3_drum_note_set(
struct snd_opl3 *opl3,
121 unsigned char voice_offset = data->
voice;
122 unsigned short opl3_reg;
136 static void snd_opl3_drum_vol_set(
struct snd_opl3 *opl3,
141 unsigned char voice_offset = data->
voice;
143 unsigned short opl3_reg;
149 opl3->
command(opl3, opl3_reg, reg_val);
154 if (chan->gm_pan < 43)
156 if (chan->gm_pan > 85)
159 opl3->
command(opl3, opl3_reg, reg_val);
167 snd_opl3_drum_voice_set(opl3, &bass_op0);
168 snd_opl3_drum_voice_set(opl3, &bass_op1);
169 snd_opl3_drum_note_set(opl3, &bass_note);
171 snd_opl3_drum_voice_set(opl3, &hihat);
173 snd_opl3_drum_voice_set(opl3, &snare);
174 snd_opl3_drum_note_set(opl3, &snare_note);
176 snd_opl3_drum_voice_set(opl3, &tomtom);
177 snd_opl3_drum_note_set(opl3, &tomtom_note);
179 snd_opl3_drum_voice_set(opl3, &cymbal);
188 unsigned char drum_mask;
194 if ((note < 35) || (note > 81))
196 drum_mask = snd_opl3_drum_table[note - 35];
201 drum_voice = &bass_op1;
210 drum_voice = &tomtom;
213 drum_voice = &cymbal;
216 drum_voice = &tomtom;
219 snd_opl3_drum_vol_set(opl3, drum_voice, vel, chan);
220 opl3->drum_reg |= drum_mask;
222 opl3->drum_reg &= ~drum_mask;