0001
0002 #ifndef __SOUND_SEQ_DEVICE_H
0003 #define __SOUND_SEQ_DEVICE_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 struct snd_seq_device {
0015
0016 struct snd_card *card;
0017 int device;
0018 const char *id;
0019 char name[80];
0020 int argsize;
0021 void *driver_data;
0022 void *private_data;
0023 void (*private_free)(struct snd_seq_device *device);
0024 struct device dev;
0025 };
0026
0027 #define to_seq_dev(_dev) \
0028 container_of(_dev, struct snd_seq_device, dev)
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 struct snd_seq_driver {
0046 struct device_driver driver;
0047 char *id;
0048 int argsize;
0049 };
0050
0051 #define to_seq_drv(_drv) \
0052 container_of(_drv, struct snd_seq_driver, driver)
0053
0054
0055
0056
0057 #ifdef CONFIG_MODULES
0058 void snd_seq_device_load_drivers(void);
0059 #else
0060 #define snd_seq_device_load_drivers()
0061 #endif
0062 int snd_seq_device_new(struct snd_card *card, int device, const char *id,
0063 int argsize, struct snd_seq_device **result);
0064
0065 #define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
0066
0067 int __must_check __snd_seq_driver_register(struct snd_seq_driver *drv,
0068 struct module *mod);
0069 #define snd_seq_driver_register(drv) \
0070 __snd_seq_driver_register(drv, THIS_MODULE)
0071 void snd_seq_driver_unregister(struct snd_seq_driver *drv);
0072
0073 #define module_snd_seq_driver(drv) \
0074 module_driver(drv, snd_seq_driver_register, snd_seq_driver_unregister)
0075
0076
0077
0078
0079 #define SNDRV_SEQ_DEV_ID_MIDISYNTH "seq-midi"
0080 #define SNDRV_SEQ_DEV_ID_OPL3 "opl3-synth"
0081
0082 #endif