1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __SOUND_SFNT_INFO_H 20 #define __SOUND_SFNT_INFO_H 21 #include <sound/asound.h> 22 #ifdef SNDRV_BIG_ENDIAN 23 #define SNDRV_OSS_PATCHKEY(id) (0xfd00 | id) 24 #else 25 #define SNDRV_OSS_PATCHKEY(id) ((id << 8) | 0xfd) 26 #endif 27 struct soundfont_patch_info { 28 unsigned short key; 29 #define SNDRV_OSS_SOUNDFONT_PATCH SNDRV_OSS_PATCHKEY(0x07) 30 short device_no; 31 unsigned short sf_id; 32 short optarg; 33 int len; 34 short type; 35 #define SNDRV_SFNT_LOAD_INFO 0 36 #define SNDRV_SFNT_LOAD_DATA 1 37 #define SNDRV_SFNT_OPEN_PATCH 2 38 #define SNDRV_SFNT_CLOSE_PATCH 3 39 #define SNDRV_SFNT_REPLACE_DATA 5 40 #define SNDRV_SFNT_MAP_PRESET 6 41 #define SNDRV_SFNT_PROBE_DATA 8 42 #define SNDRV_SFNT_REMOVE_INFO 9 43 short reserved; 44 }; 45 #define SNDRV_SFNT_PATCH_NAME_LEN 32 46 struct soundfont_open_parm { 47 unsigned short type; 48 #define SNDRV_SFNT_PAT_TYPE_MISC 0 49 #define SNDRV_SFNT_PAT_TYPE_GUS 6 50 #define SNDRV_SFNT_PAT_TYPE_MAP 7 51 #define SNDRV_SFNT_PAT_LOCKED 0x100 52 #define SNDRV_SFNT_PAT_SHARED 0x200 53 short reserved; 54 char name[SNDRV_SFNT_PATCH_NAME_LEN]; 55 }; 56 struct soundfont_voice_parm { 57 unsigned short moddelay; 58 unsigned short modatkhld; 59 unsigned short moddcysus; 60 unsigned short modrelease; 61 short modkeyhold, modkeydecay; 62 unsigned short voldelay; 63 unsigned short volatkhld; 64 unsigned short voldcysus; 65 unsigned short volrelease; 66 short volkeyhold, volkeydecay; 67 unsigned short lfo1delay; 68 unsigned short lfo2delay; 69 unsigned short pefe; 70 unsigned short fmmod; 71 unsigned short tremfrq; 72 unsigned short fm2frq2; 73 unsigned char cutoff; 74 unsigned char filterQ; 75 unsigned char chorus; 76 unsigned char reverb; 77 unsigned short reserved[4]; 78 }; 79 struct soundfont_voice_info { 80 unsigned short sf_id; 81 unsigned short sample; 82 int start, end; 83 int loopstart, loopend; 84 short rate_offset; 85 unsigned short mode; 86 #define SNDRV_SFNT_MODE_ROMSOUND 0x8000 87 #define SNDRV_SFNT_MODE_STEREO 1 88 #define SNDRV_SFNT_MODE_LOOPING 2 89 #define SNDRV_SFNT_MODE_NORELEASE 4 90 #define SNDRV_SFNT_MODE_INIT_PARM 8 91 short root; 92 short tune; 93 unsigned char low, high; 94 unsigned char vellow, velhigh; 95 signed char fixkey, fixvel; 96 signed char pan, fixpan; 97 short exclusiveClass; 98 unsigned char amplitude; 99 unsigned char attenuation; 100 short scaleTuning; 101 struct soundfont_voice_parm parm; 102 unsigned short sample_mode; 103 }; 104 struct soundfont_voice_rec_hdr { 105 unsigned char bank; 106 unsigned char instr; 107 char nvoices; 108 char write_mode; 109 #define SNDRV_SFNT_WR_APPEND 0 110 #define SNDRV_SFNT_WR_EXCLUSIVE 1 111 #define SNDRV_SFNT_WR_REPLACE 2 112 }; 113 struct soundfont_sample_info { 114 unsigned short sf_id; 115 unsigned short sample; 116 int start, end; 117 int loopstart, loopend; 118 int size; 119 short dummy; 120 unsigned short mode_flags; 121 #define SNDRV_SFNT_SAMPLE_8BITS 1 122 #define SNDRV_SFNT_SAMPLE_UNSIGNED 2 123 #define SNDRV_SFNT_SAMPLE_NO_BLANK 4 124 #define SNDRV_SFNT_SAMPLE_SINGLESHOT 8 125 #define SNDRV_SFNT_SAMPLE_BIDIR_LOOP 16 126 #define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 127 #define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 128 #define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 129 unsigned int truesize; 130 }; 131 struct soundfont_voice_map { 132 int map_bank, map_instr, map_key; 133 int src_bank, src_instr, src_key; 134 }; 135 #define SNDRV_EMUX_HWDEP_NAME "Emux WaveTable" 136 #define SNDRV_EMUX_VERSION ((1 << 16) | (0 << 8) | 0) 137 struct snd_emux_misc_mode { 138 int port; 139 int mode; 140 int value; 141 int value2; 142 }; 143 #define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) 144 #define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info) 145 #define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82) 146 #define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83) 147 #define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int) 148 #define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode) 149 #endif 150