• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/synth/emux/

Lines Matching defs:patch

103  * close the patch if the patch was opened by this client.
120 * Deal with a soundfont patch. Any driver could use these routines
131 struct soundfont_patch_info patch;
135 if (count < (long)sizeof(patch)) {
136 snd_printk(KERN_ERR "patch record too small %ld\n", count);
139 if (copy_from_user(&patch, data, sizeof(patch)))
142 count -= sizeof(patch);
143 data += sizeof(patch);
145 if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) {
146 snd_printk(KERN_ERR "The wrong kind of patch %x\n", patch.key);
149 if (count < patch.len) {
151 count, patch.len);
154 if (patch.len < 0) {
155 snd_printk(KERN_ERR "poor length %d\n", patch.len);
159 if (patch.type == SNDRV_SFNT_OPEN_PATCH) {
167 /* check if other client already opened patch */
177 switch (patch.type) {
188 /*rc = replace_data(&patch, data, count);*/
194 rc = probe_data(sflist, patch.optarg);
197 /* patch must be opened */
200 "patch not opened\n");
204 bank = ((unsigned short)patch.optarg >> 8) & 0xff;
205 instr = (unsigned short)patch.optarg & 0xff;
229 /* open patch; create sf list */
313 * Close the current patch.
335 /* patch must be opened */
528 /* patch must be opened */
536 printk(KERN_ERR "Soundfont error: invalid patch zone length\n");
553 "patch length(%ld) is smaller than nvoices(%d)\n",
714 /* patch must be opened */
946 /* load GUS patch */
951 struct patch_info patch;
958 if (count < (long)sizeof(patch)) {
959 snd_printk(KERN_ERR "patch record too small %ld\n", count);
962 if (copy_from_user(&patch, data, sizeof(patch)))
965 count -= sizeof(patch);
966 data += sizeof(patch);
976 smp->v.end = patch.len;
977 smp->v.loopstart = patch.loop_start;
978 smp->v.loopend = patch.loop_end;
979 smp->v.size = patch.len;
983 if (!(patch.mode & WAVE_16_BITS))
985 if (patch.mode & WAVE_UNSIGNED)
988 if (!(patch.mode & (WAVE_LOOPING|WAVE_BIDIR_LOOP|WAVE_LOOP_BACK)))
990 if (patch.mode & WAVE_BIDIR_LOOP)
992 if (patch.mode & WAVE_LOOP_BACK)
995 if (patch.mode & WAVE_16_BITS) {
1032 zone->v.rate_offset = calc_rate_offset(patch.base_freq);
1033 note = freq_to_note(patch.base_note);
1036 zone->v.low = (freq_to_note(patch.low_note) + 99) / 100;
1037 zone->v.high = freq_to_note(patch.high_note) / 100;
1039 zone->v.pan = (patch.panning + 128) / 2;
1043 if (patch.mode & WAVE_ENVELOPES) {
1046 (patch.env_rate[0], 0, patch.env_offset[0]);
1048 (patch.env_rate[1], patch.env_offset[0],
1049 patch.env_offset[1]);
1051 (patch.env_rate[2], patch.env_offset[1],
1052 patch.env_offset[2]);
1054 (patch.env_rate[3], patch.env_offset[1],
1055 patch.env_offset[4]);
1057 (patch.env_rate[4], patch.env_offset[3],
1058 patch.env_offset[4]);
1060 (patch.env_rate[5], patch.env_offset[4],
1061 patch.env_offset[5]);
1065 zone->v.parm.voldcysus = (calc_gus_sustain(patch.env_offset[2]) << 8) |
1068 zone->v.attenuation = calc_gus_attenuation(patch.env_offset[0]);
1072 if (patch.mode & WAVE_FAST_RELEASE) {
1077 if (patch.mode & WAVE_TREMOLO) {
1078 int rate = (patch.tremolo_rate * 1000 / 38) / 42;
1079 zone->v.parm.tremfrq = ((patch.tremolo_depth / 2) << 8) | rate;
1082 if (patch.mode & WAVE_VIBRATO) {
1083 int rate = (patch.vibrato_rate * 1000 / 38) / 42;
1084 zone->v.parm.fm2frq2 = ((patch.vibrato_depth / 6) << 8) | rate;
1097 zone->instr = patch.instr_no;
1109 /* load GUS patch */