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