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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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_KERNEL_H
  3 #define __SOUND_SEQ_KERNEL_H
  4 
  5 /*
  6  *  Main kernel header file for the ALSA sequencer
  7  *  Copyright (c) 1998 by Frank van de Pol <fvdpol@coil.demon.nl>
  8  */
  9 #include <linux/time.h>
 10 #include <sound/asequencer.h>
 11 
 12 typedef struct snd_seq_real_time snd_seq_real_time_t;
 13 typedef union snd_seq_timestamp snd_seq_timestamp_t;
 14 
 15 /* maximum number of queues */
 16 #define SNDRV_SEQ_MAX_QUEUES            32
 17 
 18 /* max number of concurrent clients */
 19 #define SNDRV_SEQ_MAX_CLIENTS           192
 20 
 21 /* max number of concurrent ports */
 22 #define SNDRV_SEQ_MAX_PORTS             254
 23 
 24 /* max number of events in memory pool */
 25 #define SNDRV_SEQ_MAX_EVENTS            2000
 26 
 27 /* default number of events in memory pool */
 28 #define SNDRV_SEQ_DEFAULT_EVENTS        500
 29 
 30 /* max number of events in memory pool for one client (outqueue) */
 31 #define SNDRV_SEQ_MAX_CLIENT_EVENTS     2000
 32 
 33 /* default number of events in memory pool for one client (outqueue) */
 34 #define SNDRV_SEQ_DEFAULT_CLIENT_EVENTS 200
 35 
 36 /* max delivery path length */
 37 /* NOTE: this shouldn't be greater than MAX_LOCKDEP_SUBCLASSES */
 38 #define SNDRV_SEQ_MAX_HOPS              8
 39 
 40 /* max size of event size */
 41 #define SNDRV_SEQ_MAX_EVENT_LEN         0x3fffffff
 42 
 43 /* call-backs for kernel port */
 44 struct snd_seq_port_callback {
 45         struct module *owner;
 46         void *private_data;
 47         int (*subscribe)(void *private_data, struct snd_seq_port_subscribe *info);
 48         int (*unsubscribe)(void *private_data, struct snd_seq_port_subscribe *info);
 49         int (*use)(void *private_data, struct snd_seq_port_subscribe *info);
 50         int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info);
 51         int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
 52         void (*private_free)(void *private_data);
 53         /*...*/
 54 };
 55 
 56 /* interface for kernel client */
 57 __printf(3, 4)
 58 int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
 59                                  const char *name_fmt, ...);
 60 int snd_seq_delete_kernel_client(int client);
 61 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev,
 62                                   struct file *file, bool blocking);
 63 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
 64 int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
 65 
 66 #define SNDRV_SEQ_EXT_MASK      0xc0000000
 67 #define SNDRV_SEQ_EXT_USRPTR    0x80000000
 68 #define SNDRV_SEQ_EXT_CHAINED   0x40000000
 69 
 70 typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
 71 int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
 72                              int in_kernel, int size_aligned);
 73 int snd_seq_expand_var_event_at(const struct snd_seq_event *event, int count,
 74                                 char *buf, int offset);
 75 int snd_seq_dump_var_event(const struct snd_seq_event *event,
 76                            snd_seq_dump_func_t func, void *private_data);
 77 
 78 /* size of the event packet; it can be greater than snd_seq_event size */
 79 static inline size_t snd_seq_event_packet_size(struct snd_seq_event *ev)
 80 {
 81         if (snd_seq_ev_is_ump(ev))
 82                 return sizeof(struct snd_seq_ump_event);
 83         return sizeof(struct snd_seq_event);
 84 }
 85 
 86 /* interface for OSS emulation */
 87 int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
 88 
 89 /* port callback routines */
 90 void snd_port_init_callback(struct snd_seq_port_callback *p);
 91 struct snd_seq_port_callback *snd_port_alloc_callback(void);
 92 
 93 /* port attach/detach */
 94 int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
 95                               int cap, int type, int midi_channels, int midi_voices, char *portname);
 96 int snd_seq_event_port_detach(int client, int port);
 97 
 98 #ifdef CONFIG_MODULES
 99 void snd_seq_autoload_init(void);
100 void snd_seq_autoload_exit(void);
101 #else
102 #define snd_seq_autoload_init()
103 #define snd_seq_autoload_exit()
104 #endif
105 
106 #endif /* __SOUND_SEQ_KERNEL_H */
107 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php