122851890Sopenharmony_ci/*
222851890Sopenharmony_ci * This header was generated from the Linux kernel headers by update_headers.py,
322851890Sopenharmony_ci * to provide necessary information from kernel to userspace, such as constants,
422851890Sopenharmony_ci * structures, and macros, and thus, contains no copyrightable information.
522851890Sopenharmony_ci */
622851890Sopenharmony_ci#ifndef __SOUND_SFNT_INFO_H
722851890Sopenharmony_ci#define __SOUND_SFNT_INFO_H
822851890Sopenharmony_ci#include <sound/asound.h>
922851890Sopenharmony_ci#ifdef SNDRV_BIG_ENDIAN
1022851890Sopenharmony_ci#define SNDRV_OSS_PATCHKEY(id) (0xfd00|id)
1122851890Sopenharmony_ci#else
1222851890Sopenharmony_ci#define SNDRV_OSS_PATCHKEY(id) ((id<<8)|0xfd)
1322851890Sopenharmony_ci#endif
1422851890Sopenharmony_cistruct soundfont_patch_info {
1522851890Sopenharmony_ci	unsigned short key;
1622851890Sopenharmony_ci#define SNDRV_OSS_SOUNDFONT_PATCH		SNDRV_OSS_PATCHKEY(0x07)
1722851890Sopenharmony_ci	short device_no;
1822851890Sopenharmony_ci	unsigned short sf_id;
1922851890Sopenharmony_ci	short optarg;
2022851890Sopenharmony_ci	int len;
2122851890Sopenharmony_ci	short type;
2222851890Sopenharmony_ci#define SNDRV_SFNT_LOAD_INFO		0
2322851890Sopenharmony_ci#define SNDRV_SFNT_LOAD_DATA		1
2422851890Sopenharmony_ci#define SNDRV_SFNT_OPEN_PATCH	2
2522851890Sopenharmony_ci#define SNDRV_SFNT_CLOSE_PATCH	3
2622851890Sopenharmony_ci
2722851890Sopenharmony_ci#define SNDRV_SFNT_REPLACE_DATA	5
2822851890Sopenharmony_ci#define SNDRV_SFNT_MAP_PRESET	6
2922851890Sopenharmony_ci
3022851890Sopenharmony_ci#define SNDRV_SFNT_PROBE_DATA		8
3122851890Sopenharmony_ci#define SNDRV_SFNT_REMOVE_INFO		9
3222851890Sopenharmony_ci	short reserved;
3322851890Sopenharmony_ci
3422851890Sopenharmony_ci};
3522851890Sopenharmony_ci#define SNDRV_SFNT_PATCH_NAME_LEN	32
3622851890Sopenharmony_cistruct soundfont_open_parm {
3722851890Sopenharmony_ci	unsigned short type;
3822851890Sopenharmony_ci#define SNDRV_SFNT_PAT_TYPE_MISC	0
3922851890Sopenharmony_ci#define SNDRV_SFNT_PAT_TYPE_GUS	6
4022851890Sopenharmony_ci#define SNDRV_SFNT_PAT_TYPE_MAP	7
4122851890Sopenharmony_ci#define SNDRV_SFNT_PAT_LOCKED	0x100
4222851890Sopenharmony_ci#define SNDRV_SFNT_PAT_SHARED	0x200
4322851890Sopenharmony_ci	short reserved;
4422851890Sopenharmony_ci	char name[SNDRV_SFNT_PATCH_NAME_LEN];
4522851890Sopenharmony_ci};
4622851890Sopenharmony_cistruct soundfont_voice_parm {
4722851890Sopenharmony_ci	unsigned short moddelay;
4822851890Sopenharmony_ci	unsigned short modatkhld;
4922851890Sopenharmony_ci	unsigned short moddcysus;
5022851890Sopenharmony_ci	unsigned short modrelease;
5122851890Sopenharmony_ci	short modkeyhold, modkeydecay;
5222851890Sopenharmony_ci	unsigned short voldelay;
5322851890Sopenharmony_ci	unsigned short volatkhld;
5422851890Sopenharmony_ci	unsigned short voldcysus;
5522851890Sopenharmony_ci	unsigned short volrelease;
5622851890Sopenharmony_ci	short volkeyhold, volkeydecay;
5722851890Sopenharmony_ci	unsigned short lfo1delay;
5822851890Sopenharmony_ci	unsigned short lfo2delay;
5922851890Sopenharmony_ci	unsigned short pefe;
6022851890Sopenharmony_ci	unsigned short fmmod;
6122851890Sopenharmony_ci	unsigned short tremfrq;
6222851890Sopenharmony_ci	unsigned short fm2frq2;
6322851890Sopenharmony_ci	unsigned char cutoff;
6422851890Sopenharmony_ci	unsigned char filterQ;
6522851890Sopenharmony_ci	unsigned char chorus;
6622851890Sopenharmony_ci	unsigned char reverb;
6722851890Sopenharmony_ci	unsigned short reserved[4];
6822851890Sopenharmony_ci};
6922851890Sopenharmony_cistruct soundfont_voice_info {
7022851890Sopenharmony_ci	unsigned short sf_id;
7122851890Sopenharmony_ci	unsigned short sample;
7222851890Sopenharmony_ci	int start, end;
7322851890Sopenharmony_ci	int loopstart, loopend;
7422851890Sopenharmony_ci	short rate_offset;
7522851890Sopenharmony_ci	unsigned short mode;
7622851890Sopenharmony_ci#define SNDRV_SFNT_MODE_ROMSOUND		0x8000
7722851890Sopenharmony_ci#define SNDRV_SFNT_MODE_STEREO		1
7822851890Sopenharmony_ci#define SNDRV_SFNT_MODE_LOOPING		2
7922851890Sopenharmony_ci#define SNDRV_SFNT_MODE_NORELEASE		4
8022851890Sopenharmony_ci#define SNDRV_SFNT_MODE_INIT_PARM		8
8122851890Sopenharmony_ci	short root;
8222851890Sopenharmony_ci	short tune;
8322851890Sopenharmony_ci	unsigned char low, high;
8422851890Sopenharmony_ci	unsigned char vellow, velhigh;
8522851890Sopenharmony_ci	signed char fixkey, fixvel;
8622851890Sopenharmony_ci	signed char pan, fixpan;
8722851890Sopenharmony_ci	short exclusiveClass;
8822851890Sopenharmony_ci	unsigned char amplitude;
8922851890Sopenharmony_ci	unsigned char attenuation;
9022851890Sopenharmony_ci	short scaleTuning;
9122851890Sopenharmony_ci	struct soundfont_voice_parm parm;
9222851890Sopenharmony_ci	unsigned short sample_mode;
9322851890Sopenharmony_ci};
9422851890Sopenharmony_cistruct soundfont_voice_rec_hdr {
9522851890Sopenharmony_ci	unsigned char bank;
9622851890Sopenharmony_ci	unsigned char instr;
9722851890Sopenharmony_ci	char nvoices;
9822851890Sopenharmony_ci	char write_mode;
9922851890Sopenharmony_ci#define SNDRV_SFNT_WR_APPEND		0
10022851890Sopenharmony_ci#define SNDRV_SFNT_WR_EXCLUSIVE		1
10122851890Sopenharmony_ci#define SNDRV_SFNT_WR_REPLACE		2
10222851890Sopenharmony_ci};
10322851890Sopenharmony_cistruct soundfont_sample_info {
10422851890Sopenharmony_ci	unsigned short sf_id;
10522851890Sopenharmony_ci	unsigned short sample;
10622851890Sopenharmony_ci	int start, end;
10722851890Sopenharmony_ci	int loopstart, loopend;
10822851890Sopenharmony_ci	int size;
10922851890Sopenharmony_ci	short dummy;
11022851890Sopenharmony_ci	unsigned short mode_flags;
11122851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_8BITS		1
11222851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_UNSIGNED	2
11322851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_NO_BLANK	4
11422851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_SINGLESHOT	8
11522851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_BIDIR_LOOP	16
11622851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_STEREO_LEFT	32
11722851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_STEREO_RIGHT	64
11822851890Sopenharmony_ci#define SNDRV_SFNT_SAMPLE_REVERSE_LOOP	128
11922851890Sopenharmony_ci	unsigned int truesize;
12022851890Sopenharmony_ci};
12122851890Sopenharmony_cistruct soundfont_voice_map {
12222851890Sopenharmony_ci	int map_bank, map_instr, map_key;
12322851890Sopenharmony_ci	int src_bank, src_instr, src_key;
12422851890Sopenharmony_ci};
12522851890Sopenharmony_ci#define SNDRV_EMUX_HWDEP_NAME	"Emux WaveTable"
12622851890Sopenharmony_ci#define SNDRV_EMUX_VERSION	((1 << 16) | (0 << 8) | 0)
12722851890Sopenharmony_cistruct snd_emux_misc_mode {
12822851890Sopenharmony_ci	int port;
12922851890Sopenharmony_ci	int mode;
13022851890Sopenharmony_ci	int value;
13122851890Sopenharmony_ci	int value2;
13222851890Sopenharmony_ci};
13322851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_VERSION	_IOR('H', 0x80, unsigned int)
13422851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_LOAD_PATCH	_IOWR('H', 0x81, struct soundfont_patch_info)
13522851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_RESET_SAMPLES	_IO('H', 0x82)
13622851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83)
13722851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_MEM_AVAIL	_IOW('H', 0x84, int)
13822851890Sopenharmony_ci#define SNDRV_EMUX_IOCTL_MISC_MODE	_IOWR('H', 0x84, struct snd_emux_misc_mode)
13922851890Sopenharmony_ci#endif
140