23 #include <linux/slab.h>
25 #include <linux/module.h>
32 static void inline snd_opl4_wait(
struct snd_opl4 *opl4)
82 spin_unlock_irqrestore(&opl4->
reg_lock, flags);
108 spin_unlock_irqrestore(&opl4->
reg_lock, flags);
113 static void snd_opl4_enable_opl4(
struct snd_opl4 *opl4)
123 static int snd_opl4_detect(
struct snd_opl4 *opl4)
127 snd_opl4_enable_opl4(opl4);
147 if (id1 != 0x00 || id2 != 0xff)
156 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
160 opl4->seq_dev =
NULL;
163 static int snd_opl4_create_seq_dev(
struct snd_opl4 *opl4,
int seq_device)
165 opl4->seq_dev_num = seq_device;
167 sizeof(
struct snd_opl4 *), &opl4->seq_dev) >= 0) {
168 strcpy(opl4->seq_dev->name,
"OPL4 Wavetable");
170 opl4->seq_dev->private_data = opl4;
171 opl4->seq_dev->private_free = snd_opl4_seq_dev_free;
177 static void snd_opl4_free(
struct snd_opl4 *opl4)
179 #ifdef CONFIG_PROC_FS
180 snd_opl4_free_proc(opl4);
229 err = snd_opl4_detect(opl4);
232 snd_printd(
"OPL4 chip not detected at %#lx/%#lx\n", fm_port, pcm_port);
249 snd_opl4_enable_opl4(opl4);
252 #ifdef CONFIG_PROC_FS
253 snd_opl4_create_proc(opl4);
256 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
257 opl4->seq_client = -1;
259 snd_opl4_create_seq_dev(opl4, seq_device);
271 static int __init alsa_opl4_init(
void)
276 static void __exit alsa_opl4_exit(
void)