diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-30 06:49:22 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:13 -0500 |
commit | 224a033252bba46c5c8b5df625f5e781ca138f48 (patch) | |
tree | 11bb0ad9a3bab736091c73bb46b79d42ee0ff34d /sound/drivers/opl3/opl3_seq.c | |
parent | ceac4bf34e14d9040d16b35fd97a92d6e951ccf4 (diff) |
[ALSA] opl3 - Use hwdep for patch loading
Use the hwdep device for loading OPL2/3 patch data instead of the
messy sequencer instrument layer.
Due to this change, the sbiload program should be updated, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/drivers/opl3/opl3_seq.c')
-rw-r--r-- | sound/drivers/opl3/opl3_seq.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c index 96762c9d4855..ff6da16b9178 100644 --- a/sound/drivers/opl3/opl3_seq.c +++ b/sound/drivers/opl3/opl3_seq.c | |||
@@ -152,15 +152,7 @@ static int snd_opl3_synth_event_input(struct snd_seq_event * ev, int direct, | |||
152 | { | 152 | { |
153 | struct snd_opl3 *opl3 = private_data; | 153 | struct snd_opl3 *opl3 = private_data; |
154 | 154 | ||
155 | if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN && | 155 | snd_midi_process_event(&opl3_ops, ev, opl3->chset); |
156 | ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) { | ||
157 | if (direct) { | ||
158 | snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, ev, | ||
159 | opl3->seq_client, atomic, hop); | ||
160 | } | ||
161 | } else { | ||
162 | snd_midi_process_event(&opl3_ops, ev, opl3->chset); | ||
163 | } | ||
164 | return 0; | 156 | return 0; |
165 | } | 157 | } |
166 | 158 | ||
@@ -249,16 +241,6 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev) | |||
249 | return err; | 241 | return err; |
250 | } | 242 | } |
251 | 243 | ||
252 | /* initialize instrument list */ | ||
253 | opl3->ilist = snd_seq_instr_list_new(); | ||
254 | if (opl3->ilist == NULL) { | ||
255 | snd_seq_delete_kernel_client(client); | ||
256 | opl3->seq_client = -1; | ||
257 | return -ENOMEM; | ||
258 | } | ||
259 | opl3->ilist->flags = SNDRV_SEQ_INSTR_FLG_DIRECT; | ||
260 | snd_seq_fm_init(&opl3->fm_ops, NULL); | ||
261 | |||
262 | /* setup system timer */ | 244 | /* setup system timer */ |
263 | init_timer(&opl3->tlist); | 245 | init_timer(&opl3->tlist); |
264 | opl3->tlist.function = snd_opl3_timer_func; | 246 | opl3->tlist.function = snd_opl3_timer_func; |
@@ -287,8 +269,6 @@ static int snd_opl3_seq_delete_device(struct snd_seq_device *dev) | |||
287 | snd_seq_delete_kernel_client(opl3->seq_client); | 269 | snd_seq_delete_kernel_client(opl3->seq_client); |
288 | opl3->seq_client = -1; | 270 | opl3->seq_client = -1; |
289 | } | 271 | } |
290 | if (opl3->ilist) | ||
291 | snd_seq_instr_list_free(&opl3->ilist); | ||
292 | return 0; | 272 | return 0; |
293 | } | 273 | } |
294 | 274 | ||