• Home
  • Raw
  • Download

Lines Matching refs:opl4

49 static int snd_opl4_seq_use_inc(struct snd_opl4 *opl4)  in snd_opl4_seq_use_inc()  argument
51 if (!try_module_get(opl4->card->module)) in snd_opl4_seq_use_inc()
56 static void snd_opl4_seq_use_dec(struct snd_opl4 *opl4) in snd_opl4_seq_use_dec() argument
58 module_put(opl4->card->module); in snd_opl4_seq_use_dec()
63 struct snd_opl4 *opl4 = private_data; in snd_opl4_seq_use() local
66 mutex_lock(&opl4->access_mutex); in snd_opl4_seq_use()
68 if (opl4->used) { in snd_opl4_seq_use()
69 mutex_unlock(&opl4->access_mutex); in snd_opl4_seq_use()
72 opl4->used++; in snd_opl4_seq_use()
75 err = snd_opl4_seq_use_inc(opl4); in snd_opl4_seq_use()
77 mutex_unlock(&opl4->access_mutex); in snd_opl4_seq_use()
82 mutex_unlock(&opl4->access_mutex); in snd_opl4_seq_use()
84 snd_opl4_synth_reset(opl4); in snd_opl4_seq_use()
90 struct snd_opl4 *opl4 = private_data; in snd_opl4_seq_unuse() local
92 snd_opl4_synth_shutdown(opl4); in snd_opl4_seq_unuse()
94 mutex_lock(&opl4->access_mutex); in snd_opl4_seq_unuse()
95 opl4->used--; in snd_opl4_seq_unuse()
96 mutex_unlock(&opl4->access_mutex); in snd_opl4_seq_unuse()
99 snd_opl4_seq_use_dec(opl4); in snd_opl4_seq_unuse()
114 struct snd_opl4 *opl4 = private_data; in snd_opl4_seq_event_input() local
116 snd_midi_process_event(&opl4_ops, ev, opl4->chset); in snd_opl4_seq_event_input()
122 struct snd_opl4 *opl4 = private_data; in snd_opl4_seq_free_port() local
124 snd_midi_channel_free_set(opl4->chset); in snd_opl4_seq_free_port()
130 struct snd_opl4 *opl4; in snd_opl4_seq_probe() local
134 opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev); in snd_opl4_seq_probe()
135 if (!opl4) in snd_opl4_seq_probe()
138 if (snd_yrw801_detect(opl4) < 0) in snd_opl4_seq_probe()
141 opl4->chset = snd_midi_channel_alloc_set(16); in snd_opl4_seq_probe()
142 if (!opl4->chset) in snd_opl4_seq_probe()
144 opl4->chset->private_data = opl4; in snd_opl4_seq_probe()
147 client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num, in snd_opl4_seq_probe()
150 snd_midi_channel_free_set(opl4->chset); in snd_opl4_seq_probe()
153 opl4->seq_client = client; in snd_opl4_seq_probe()
154 opl4->chset->client = client; in snd_opl4_seq_probe()
163 pcallbacks.private_data = opl4; in snd_opl4_seq_probe()
165 opl4->chset->port = snd_seq_event_port_attach(client, &pcallbacks, in snd_opl4_seq_probe()
174 if (opl4->chset->port < 0) { in snd_opl4_seq_probe()
175 int err = opl4->chset->port; in snd_opl4_seq_probe()
176 snd_midi_channel_free_set(opl4->chset); in snd_opl4_seq_probe()
178 opl4->seq_client = -1; in snd_opl4_seq_probe()
187 struct snd_opl4 *opl4; in snd_opl4_seq_remove() local
189 opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev); in snd_opl4_seq_remove()
190 if (!opl4) in snd_opl4_seq_remove()
193 if (opl4->seq_client >= 0) { in snd_opl4_seq_remove()
194 snd_seq_delete_kernel_client(opl4->seq_client); in snd_opl4_seq_remove()
195 opl4->seq_client = -1; in snd_opl4_seq_remove()