21 #include <linux/export.h>
26 static int snd_opl3_ioctl_seq_oss(
struct snd_seq_oss_arg *
arg,
unsigned int cmd,
unsigned long ioarg);
50 .open = snd_opl3_open_seq_oss,
51 .close = snd_opl3_close_seq_oss,
52 .ioctl = snd_opl3_ioctl_seq_oss,
53 .load_patch = snd_opl3_load_patch_seq_oss,
54 .reset = snd_opl3_reset_seq_oss,
69 static void snd_opl3_oss_free_port(
void *private_data)
76 static int snd_opl3_oss_create_port(
struct snd_opl3 * opl3)
85 if (opl3->oss_chset ==
NULL)
89 memset(&callbacks, 0,
sizeof(callbacks));
91 callbacks.event_input = snd_opl3_oss_event_input;
92 callbacks.private_free = snd_opl3_oss_free_port;
93 callbacks.private_data = opl3;
96 sprintf(name,
"OPL%i OSS Port", opl_ver);
98 opl3->oss_chset->client = opl3->seq_client;
107 if (opl3->oss_chset->port < 0) {
109 port = opl3->oss_chset->port;
128 opl3->oss_seq_dev =
dev;
139 arg->
oper = oss_callback;
142 if (snd_opl3_oss_create_port(opl3)) {
151 if (opl3->oss_seq_dev) {
153 opl3->oss_seq_dev =
NULL;
173 arg->
addr.client = opl3->oss_chset->client;
174 arg->
addr.port = opl3->oss_chset->port;
179 opl3->synth_mode = SNDRV_OPL3_MODE_SYNTH;
201 #define SBFM_MAXINSTR 256
222 if (count < (
int)
sizeof(sbi)) {
235 memset(name, 0,
sizeof(name));
238 err = snd_opl3_load_patch(opl3, sbi.
channel, 127, type, name,
NULL,
258 "Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. "
259 "Fix the program.\n");