1 /* SPDX-License-Identifier: GPL-2.0-or-later * 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 #ifndef __SOUND_SEQ_OSS_H 2 #ifndef __SOUND_SEQ_OSS_H 3 #define __SOUND_SEQ_OSS_H 3 #define __SOUND_SEQ_OSS_H 4 4 5 /* 5 /* 6 * OSS compatible sequencer driver 6 * OSS compatible sequencer driver 7 * 7 * 8 * Copyright (C) 1998,99 Takashi Iwai 8 * Copyright (C) 1998,99 Takashi Iwai 9 */ 9 */ 10 10 11 #include <sound/asequencer.h> 11 #include <sound/asequencer.h> 12 #include <sound/seq_kernel.h> 12 #include <sound/seq_kernel.h> 13 13 14 /* 14 /* 15 * argument structure for synthesizer operatio 15 * argument structure for synthesizer operations 16 */ 16 */ 17 struct snd_seq_oss_arg { 17 struct snd_seq_oss_arg { 18 /* given by OSS sequencer */ 18 /* given by OSS sequencer */ 19 int app_index; /* application unique 19 int app_index; /* application unique index */ 20 int file_mode; /* file mode - see bel 20 int file_mode; /* file mode - see below */ 21 int seq_mode; /* sequencer mode - se 21 int seq_mode; /* sequencer mode - see below */ 22 22 23 /* following must be initialized in op 23 /* following must be initialized in open callback */ 24 struct snd_seq_addr addr; /* ope 24 struct snd_seq_addr addr; /* opened port address */ 25 void *private_data; /* private dat 25 void *private_data; /* private data for lowlevel drivers */ 26 26 27 /* note-on event passing mode: initial 27 /* note-on event passing mode: initially given by OSS seq, 28 * but configurable by drivers - see b 28 * but configurable by drivers - see below 29 */ 29 */ 30 int event_passing; 30 int event_passing; 31 }; 31 }; 32 32 33 33 34 /* 34 /* 35 * synthesizer operation callbacks 35 * synthesizer operation callbacks 36 */ 36 */ 37 struct snd_seq_oss_callback { 37 struct snd_seq_oss_callback { 38 struct module *owner; 38 struct module *owner; 39 int (*open)(struct snd_seq_oss_arg *p, 39 int (*open)(struct snd_seq_oss_arg *p, void *closure); 40 int (*close)(struct snd_seq_oss_arg *p 40 int (*close)(struct snd_seq_oss_arg *p); 41 int (*ioctl)(struct snd_seq_oss_arg *p 41 int (*ioctl)(struct snd_seq_oss_arg *p, unsigned int cmd, unsigned long arg); 42 int (*load_patch)(struct snd_seq_oss_a 42 int (*load_patch)(struct snd_seq_oss_arg *p, int format, const char __user *buf, int offs, int count); 43 int (*reset)(struct snd_seq_oss_arg *p 43 int (*reset)(struct snd_seq_oss_arg *p); 44 int (*raw_event)(struct snd_seq_oss_ar 44 int (*raw_event)(struct snd_seq_oss_arg *p, unsigned char *data); 45 }; 45 }; 46 46 47 /* flag: file_mode */ 47 /* flag: file_mode */ 48 #define SNDRV_SEQ_OSS_FILE_ACMODE 48 #define SNDRV_SEQ_OSS_FILE_ACMODE 3 49 #define SNDRV_SEQ_OSS_FILE_READ 1 49 #define SNDRV_SEQ_OSS_FILE_READ 1 50 #define SNDRV_SEQ_OSS_FILE_WRITE 50 #define SNDRV_SEQ_OSS_FILE_WRITE 2 51 #define SNDRV_SEQ_OSS_FILE_NONBLOCK 4 51 #define SNDRV_SEQ_OSS_FILE_NONBLOCK 4 52 52 53 /* flag: seq_mode */ 53 /* flag: seq_mode */ 54 #define SNDRV_SEQ_OSS_MODE_SYNTH 54 #define SNDRV_SEQ_OSS_MODE_SYNTH 0 55 #define SNDRV_SEQ_OSS_MODE_MUSIC 55 #define SNDRV_SEQ_OSS_MODE_MUSIC 1 56 56 57 /* flag: event_passing */ 57 /* flag: event_passing */ 58 #define SNDRV_SEQ_OSS_PROCESS_EVENTS 0 58 #define SNDRV_SEQ_OSS_PROCESS_EVENTS 0 /* key == 255 is processed as velocity change */ 59 #define SNDRV_SEQ_OSS_PASS_EVENTS 59 #define SNDRV_SEQ_OSS_PASS_EVENTS 1 /* pass all events to callback */ 60 #define SNDRV_SEQ_OSS_PROCESS_KEYPRESS 2 60 #define SNDRV_SEQ_OSS_PROCESS_KEYPRESS 2 /* key >= 128 will be processed as key-pressure */ 61 61 62 /* default control rate: fixed */ 62 /* default control rate: fixed */ 63 #define SNDRV_SEQ_OSS_CTRLRATE 100 63 #define SNDRV_SEQ_OSS_CTRLRATE 100 64 64 65 /* default max queue length: configurable by m 65 /* default max queue length: configurable by module option */ 66 #define SNDRV_SEQ_OSS_MAX_QLEN 1024 66 #define SNDRV_SEQ_OSS_MAX_QLEN 1024 67 67 68 68 69 /* 69 /* 70 * data pointer to snd_seq_register_device 70 * data pointer to snd_seq_register_device 71 */ 71 */ 72 struct snd_seq_oss_reg { 72 struct snd_seq_oss_reg { 73 int type; 73 int type; 74 int subtype; 74 int subtype; 75 int nvoices; 75 int nvoices; 76 struct snd_seq_oss_callback oper; 76 struct snd_seq_oss_callback oper; 77 void *private_data; 77 void *private_data; 78 }; 78 }; 79 79 80 /* device id */ 80 /* device id */ 81 #define SNDRV_SEQ_DEV_ID_OSS "seq-o 81 #define SNDRV_SEQ_DEV_ID_OSS "seq-oss" 82 82 83 #endif /* __SOUND_SEQ_OSS_H */ 83 #endif /* __SOUND_SEQ_OSS_H */ 84 84
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.