Lines Matching refs:patch
119 struct soundfont_patch_info patch; in snd_soundfont_load() local
123 if (count < (long)sizeof(patch)) { in snd_soundfont_load()
127 if (copy_from_user(&patch, data, sizeof(patch))) in snd_soundfont_load()
130 count -= sizeof(patch); in snd_soundfont_load()
131 data += sizeof(patch); in snd_soundfont_load()
133 if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) { in snd_soundfont_load()
134 snd_printk(KERN_ERR "The wrong kind of patch %x\n", patch.key); in snd_soundfont_load()
137 if (count < patch.len) { in snd_soundfont_load()
139 count, patch.len); in snd_soundfont_load()
142 if (patch.len < 0) { in snd_soundfont_load()
143 snd_printk(KERN_ERR "poor length %d\n", patch.len); in snd_soundfont_load()
147 if (patch.type == SNDRV_SFNT_OPEN_PATCH) { in snd_soundfont_load()
165 switch (patch.type) { in snd_soundfont_load()
182 rc = probe_data(sflist, patch.optarg); in snd_soundfont_load()
192 bank = ((unsigned short)patch.optarg >> 8) & 0xff; in snd_soundfont_load()
193 instr = (unsigned short)patch.optarg & 0xff; in snd_soundfont_load()
947 struct patch_info patch; in load_guspatch() local
954 if (count < (long)sizeof(patch)) { in load_guspatch()
958 if (copy_from_user(&patch, data, sizeof(patch))) in load_guspatch()
961 count -= sizeof(patch); in load_guspatch()
962 data += sizeof(patch); in load_guspatch()
973 smp->v.end = patch.len; in load_guspatch()
974 smp->v.loopstart = patch.loop_start; in load_guspatch()
975 smp->v.loopend = patch.loop_end; in load_guspatch()
976 smp->v.size = patch.len; in load_guspatch()
980 if (!(patch.mode & WAVE_16_BITS)) in load_guspatch()
982 if (patch.mode & WAVE_UNSIGNED) in load_guspatch()
985 if (!(patch.mode & (WAVE_LOOPING|WAVE_BIDIR_LOOP|WAVE_LOOP_BACK))) in load_guspatch()
987 if (patch.mode & WAVE_BIDIR_LOOP) in load_guspatch()
989 if (patch.mode & WAVE_LOOP_BACK) in load_guspatch()
992 if (patch.mode & WAVE_16_BITS) { in load_guspatch()
1031 zone->v.rate_offset = calc_rate_offset(patch.base_freq); in load_guspatch()
1032 note = freq_to_note(patch.base_note); in load_guspatch()
1035 zone->v.low = (freq_to_note(patch.low_note) + 99) / 100; in load_guspatch()
1036 zone->v.high = freq_to_note(patch.high_note) / 100; in load_guspatch()
1038 zone->v.pan = (patch.panning + 128) / 2; in load_guspatch()
1042 (int)patch.base_freq, zone->v.rate_offset, in load_guspatch()
1048 if (patch.mode & WAVE_ENVELOPES) { in load_guspatch()
1051 (patch.env_rate[0], 0, patch.env_offset[0]); in load_guspatch()
1053 (patch.env_rate[1], patch.env_offset[0], in load_guspatch()
1054 patch.env_offset[1]); in load_guspatch()
1056 (patch.env_rate[2], patch.env_offset[1], in load_guspatch()
1057 patch.env_offset[2]); in load_guspatch()
1059 (patch.env_rate[3], patch.env_offset[1], in load_guspatch()
1060 patch.env_offset[4]); in load_guspatch()
1062 (patch.env_rate[4], patch.env_offset[3], in load_guspatch()
1063 patch.env_offset[4]); in load_guspatch()
1065 (patch.env_rate[5], patch.env_offset[4], in load_guspatch()
1066 patch.env_offset[5]); in load_guspatch()
1070 zone->v.parm.voldcysus = (calc_gus_sustain(patch.env_offset[2]) << 8) | in load_guspatch()
1073 zone->v.attenuation = calc_gus_attenuation(patch.env_offset[0]); in load_guspatch()
1085 if (patch.mode & WAVE_FAST_RELEASE) { in load_guspatch()
1090 if (patch.mode & WAVE_TREMOLO) { in load_guspatch()
1091 int rate = (patch.tremolo_rate * 1000 / 38) / 42; in load_guspatch()
1092 zone->v.parm.tremfrq = ((patch.tremolo_depth / 2) << 8) | rate; in load_guspatch()
1095 if (patch.mode & WAVE_VIBRATO) { in load_guspatch()
1096 int rate = (patch.vibrato_rate * 1000 / 38) / 42; in load_guspatch()
1097 zone->v.parm.fm2frq2 = ((patch.vibrato_depth / 6) << 8) | rate; in load_guspatch()
1110 zone->instr = patch.instr_no; in load_guspatch()