24 #include <linux/module.h>
42 #ifdef SNDRV_SEQ_OSS_DEBUG
52 static int register_device(
void);
53 static void unregister_device(
void);
55 static int register_proc(
void);
56 static void unregister_proc(
void);
58 static inline int register_proc(
void) {
return 0; }
59 static inline void unregister_proc(
void) {}
66 static long odev_ioctl(
struct file *
file,
unsigned int cmd,
unsigned long arg);
74 static int __init alsa_seq_oss_init(
void)
83 if ((rc = register_device()) < 0)
85 if ((rc = register_proc()) < 0) {
111 static void __exit alsa_seq_oss_exit(
void)
133 if (iminor(inode) == SNDRV_MINOR_OSS_MUSIC)
163 odev_read(
struct file *file,
char __user *
buf,
size_t count, loff_t *
offset)
174 odev_write(
struct file *file,
const char __user *buf,
size_t count, loff_t *offset)
184 odev_ioctl(
struct file *file,
unsigned int cmd,
unsigned long arg)
194 #define odev_ioctl_compat odev_ioctl
196 #define odev_ioctl_compat NULL
219 .release = odev_release,
221 .unlocked_ioctl = odev_ioctl,
227 register_device(
void)
232 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
234 &seq_oss_f_ops,
NULL,
240 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
242 &seq_oss_f_ops,
NULL,
245 snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
NULL, 0);
255 unregister_device(
void)
259 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
NULL, 0) < 0)
261 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
NULL, 0) < 0)
270 #ifdef CONFIG_PROC_FS
297 entry->
c.
text.read = info_read;
298 if (snd_info_register(entry) < 0) {
299 snd_info_free_entry(entry);
307 unregister_proc(
void)
309 snd_info_free_entry(info_entry);