1
2 #ifndef __SOUND_SEQ_DEVICE_H
3 #define __SOUND_SEQ_DEVICE_H
4
5
6
7
8
9
10
11
12
13
14 struct snd_seq_device {
15
16 struct snd_card *card;
17 int device;
18 const char *id;
19 char name[80];
20 int argsize;
21 void *driver_data;
22 void *private_data;
23 void (*private_free)(struct snd_seq_device *device);
24 struct device dev;
25 };
26
27 #define to_seq_dev(_dev) \
28 container_of(_dev, struct snd_seq_device, dev)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 struct snd_seq_driver {
46 struct device_driver driver;
47 char *id;
48 int argsize;
49 };
50
51 #define to_seq_drv(_drv) \
52 container_of(_drv, struct snd_seq_driver, driver)
53
54
55
56
57 #ifdef CONFIG_MODULES
58 void snd_seq_device_load_drivers(void);
59 #else
60 #define snd_seq_device_load_drivers()
61 #endif
62 int snd_seq_device_new(struct snd_card *card, int device, const char *id,
63 int argsize, struct snd_seq_device **result);
64
65 #define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
66
67 int __must_check __snd_seq_driver_register(struct snd_seq_driver *drv,
68 struct module *mod);
69 #define snd_seq_driver_register(drv) \
70 __snd_seq_driver_register(drv, THIS_MODULE)
71 void snd_seq_driver_unregister(struct snd_seq_driver *drv);
72
73 #define module_snd_seq_driver(drv) \
74 module_driver(drv, snd_seq_driver_register, snd_seq_driver_unregister)
75
76
77
78
79 #define SNDRV_SEQ_DEV_ID_MIDISYNTH "seq-midi"
80 #define SNDRV_SEQ_DEV_ID_OPL3 "opl3-synth"
81
82 #endif