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