Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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