Lines Matching refs:opl3

60 	struct snd_opl3 *opl3 = private_data;  in snd_opl3_oss_event_input()  local
63 snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset); in snd_opl3_oss_event_input()
71 struct snd_opl3 *opl3 = private_data; in snd_opl3_oss_free_port() local
73 snd_midi_channel_free_set(opl3->oss_chset); in snd_opl3_oss_free_port()
76 static int snd_opl3_oss_create_port(struct snd_opl3 * opl3) in snd_opl3_oss_create_port() argument
82 voices = (opl3->hardware < OPL3_HW_OPL3) ? in snd_opl3_oss_create_port()
84 opl3->oss_chset = snd_midi_channel_alloc_set(voices); in snd_opl3_oss_create_port()
85 if (opl3->oss_chset == NULL) in snd_opl3_oss_create_port()
87 opl3->oss_chset->private_data = opl3; in snd_opl3_oss_create_port()
93 callbacks.private_data = opl3; in snd_opl3_oss_create_port()
95 opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8; in snd_opl3_oss_create_port()
98 opl3->oss_chset->client = opl3->seq_client; in snd_opl3_oss_create_port()
99 opl3->oss_chset->port = snd_seq_event_port_attach(opl3->seq_client, &callbacks, in snd_opl3_oss_create_port()
107 if (opl3->oss_chset->port < 0) { in snd_opl3_oss_create_port()
109 port = opl3->oss_chset->port; in snd_opl3_oss_create_port()
110 snd_midi_channel_free_set(opl3->oss_chset); in snd_opl3_oss_create_port()
119 void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name) in snd_opl3_init_seq_oss() argument
124 if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS, in snd_opl3_init_seq_oss()
128 opl3->oss_seq_dev = dev; in snd_opl3_init_seq_oss()
132 if (opl3->hardware < OPL3_HW_OPL3) { in snd_opl3_init_seq_oss()
140 arg->private_data = opl3; in snd_opl3_init_seq_oss()
142 if (snd_opl3_oss_create_port(opl3)) { in snd_opl3_init_seq_oss()
144 snd_device_register(opl3->card, dev); in snd_opl3_init_seq_oss()
149 void snd_opl3_free_seq_oss(struct snd_opl3 *opl3) in snd_opl3_free_seq_oss() argument
151 if (opl3->oss_seq_dev) { in snd_opl3_free_seq_oss()
153 opl3->oss_seq_dev = NULL; in snd_opl3_free_seq_oss()
162 struct snd_opl3 *opl3 = closure; in snd_opl3_open_seq_oss() local
168 if ((err = snd_opl3_synth_setup(opl3)) < 0) in snd_opl3_open_seq_oss()
172 arg->private_data = opl3; in snd_opl3_open_seq_oss()
173 arg->addr.client = opl3->oss_chset->client; in snd_opl3_open_seq_oss()
174 arg->addr.port = opl3->oss_chset->port; in snd_opl3_open_seq_oss()
176 if ((err = snd_opl3_synth_use_inc(opl3)) < 0) in snd_opl3_open_seq_oss()
179 opl3->synth_mode = SNDRV_OPL3_MODE_SYNTH; in snd_opl3_open_seq_oss()
186 struct snd_opl3 *opl3; in snd_opl3_close_seq_oss() local
190 opl3 = arg->private_data; in snd_opl3_close_seq_oss()
192 snd_opl3_synth_cleanup(opl3); in snd_opl3_close_seq_oss()
194 snd_opl3_synth_use_dec(opl3); in snd_opl3_close_seq_oss()
206 struct snd_opl3 *opl3; in snd_opl3_load_patch_seq_oss() local
213 opl3 = arg->private_data; in snd_opl3_load_patch_seq_oss()
238 err = snd_opl3_load_patch(opl3, sbi.channel, 127, type, name, NULL, in snd_opl3_load_patch_seq_oss()
250 struct snd_opl3 *opl3; in snd_opl3_ioctl_seq_oss() local
254 opl3 = arg->private_data; in snd_opl3_ioctl_seq_oss()
278 struct snd_opl3 *opl3; in snd_opl3_reset_seq_oss() local
282 opl3 = arg->private_data; in snd_opl3_reset_seq_oss()