Blame view
include/sound/seq_device.h
2.11 KB
1a59d1b8e treewide: Replace... |
1 |
/* SPDX-License-Identifier: GPL-2.0-or-later */ |
1da177e4c Linux-2.6.12-rc2 |
2 3 4 5 6 7 |
#ifndef __SOUND_SEQ_DEVICE_H #define __SOUND_SEQ_DEVICE_H /* * ALSA sequencer device management * Copyright (c) 1999 by Takashi Iwai <tiwai@suse.de> |
1da177e4c Linux-2.6.12-rc2 |
8 |
*/ |
1da177e4c Linux-2.6.12-rc2 |
9 10 11 |
/* * registered device information */ |
1da177e4c Linux-2.6.12-rc2 |
12 13 |
struct snd_seq_device { /* device info */ |
c7e0b5bf9 [ALSA] Remove xxx... |
14 |
struct snd_card *card; /* sound card */ |
1da177e4c Linux-2.6.12-rc2 |
15 |
int device; /* device number */ |
af03c243a ALSA: seq: Clean ... |
16 |
const char *id; /* driver id */ |
1da177e4c Linux-2.6.12-rc2 |
17 18 19 |
char name[80]; /* device name */ int argsize; /* size of the argument */ void *driver_data; /* private data for driver */ |
1da177e4c Linux-2.6.12-rc2 |
20 |
void *private_data; /* private data for the caller */ |
c7e0b5bf9 [ALSA] Remove xxx... |
21 |
void (*private_free)(struct snd_seq_device *device); |
7c37ae5c6 ALSA: seq: Rewrit... |
22 |
struct device dev; |
1da177e4c Linux-2.6.12-rc2 |
23 |
}; |
7c37ae5c6 ALSA: seq: Rewrit... |
24 25 |
#define to_seq_dev(_dev) \ container_of(_dev, struct snd_seq_device, dev) |
1da177e4c Linux-2.6.12-rc2 |
26 |
|
056622053 ALSA: seq: Define... |
27 |
/* sequencer driver */ |
1da177e4c Linux-2.6.12-rc2 |
28 |
/* driver operators |
056622053 ALSA: seq: Define... |
29 |
* probe: |
1da177e4c Linux-2.6.12-rc2 |
30 31 32 33 34 35 36 |
* Initialize the device with given parameters. * Typically, * 1. call snd_hwdep_new * 2. allocate private data and initialize it * 3. call snd_hwdep_register * 4. store the instance to dev->driver_data pointer. * |
056622053 ALSA: seq: Define... |
37 |
* remove: |
1da177e4c Linux-2.6.12-rc2 |
38 39 40 |
* Release the private data. * Typically, call snd_device_free(dev->card, dev->driver_data) */ |
056622053 ALSA: seq: Define... |
41 42 43 44 |
struct snd_seq_driver { struct device_driver driver; char *id; int argsize; |
1da177e4c Linux-2.6.12-rc2 |
45 |
}; |
056622053 ALSA: seq: Define... |
46 47 |
#define to_seq_drv(_drv) \ container_of(_drv, struct snd_seq_driver, driver) |
1da177e4c Linux-2.6.12-rc2 |
48 49 50 |
/* * prototypes */ |
72496edcf ALSA: seq: Don't ... |
51 |
#ifdef CONFIG_MODULES |
1da177e4c Linux-2.6.12-rc2 |
52 |
void snd_seq_device_load_drivers(void); |
72496edcf ALSA: seq: Don't ... |
53 54 55 |
#else #define snd_seq_device_load_drivers() #endif |
af03c243a ALSA: seq: Clean ... |
56 57 |
int snd_seq_device_new(struct snd_card *card, int device, const char *id, int argsize, struct snd_seq_device **result); |
1da177e4c Linux-2.6.12-rc2 |
58 |
|
c7e0b5bf9 [ALSA] Remove xxx... |
59 |
#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device)) |
1da177e4c Linux-2.6.12-rc2 |
60 |
|
056622053 ALSA: seq: Define... |
61 62 63 64 65 66 67 68 |
int __must_check __snd_seq_driver_register(struct snd_seq_driver *drv, struct module *mod); #define snd_seq_driver_register(drv) \ __snd_seq_driver_register(drv, THIS_MODULE) void snd_seq_driver_unregister(struct snd_seq_driver *drv); #define module_snd_seq_driver(drv) \ module_driver(drv, snd_seq_driver_register, snd_seq_driver_unregister) |
1da177e4c Linux-2.6.12-rc2 |
69 70 71 72 73 74 |
/* * id strings for generic devices */ #define SNDRV_SEQ_DEV_ID_MIDISYNTH "seq-midi" #define SNDRV_SEQ_DEV_ID_OPL3 "opl3-synth" |
1da177e4c Linux-2.6.12-rc2 |
75 |
#endif /* __SOUND_SEQ_DEVICE_H */ |