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