~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/sound/seq_device.h

Version: ~ [ linux-5.18-rc6 ] ~ [ linux-5.17.6 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.38 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.114 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.192 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.241 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.277 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.312 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 #ifndef __SOUND_SEQ_DEVICE_H
  3 #define __SOUND_SEQ_DEVICE_H
  4 
  5 /*
  6  *  ALSA sequencer device management
  7  *  Copyright (c) 1999 by Takashi Iwai <tiwai@suse.de>
  8  */
  9 
 10 /*
 11  * registered device information
 12  */
 13 
 14 struct snd_seq_device {
 15         /* device info */
 16         struct snd_card *card;  /* sound card */
 17         int device;             /* device number */
 18         const char *id;         /* driver id */
 19         char name[80];          /* device name */
 20         int argsize;            /* size of the argument */
 21         void *driver_data;      /* private data for driver */
 22         void *private_data;     /* private data for the caller */
 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 /* sequencer driver */
 31 
 32 /* driver operators
 33  * probe:
 34  *      Initialize the device with given parameters.
 35  *      Typically,
 36  *              1. call snd_hwdep_new
 37  *              2. allocate private data and initialize it
 38  *              3. call snd_hwdep_register
 39  *              4. store the instance to dev->driver_data pointer.
 40  *              
 41  * remove:
 42  *      Release the private data.
 43  *      Typically, call snd_device_free(dev->card, dev->driver_data)
 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  * prototypes
 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  * id strings for generic devices
 78  */
 79 #define SNDRV_SEQ_DEV_ID_MIDISYNTH      "seq-midi"
 80 #define SNDRV_SEQ_DEV_ID_OPL3           "opl3-synth"
 81 
 82 #endif /* __SOUND_SEQ_DEVICE_H */
 83 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp