Lines Matching refs:patch

231  * load a patch, obviously.
236 * name is the name string of the patch.
247 struct fm_patch *patch;
250 patch = snd_opl3_find_patch(opl3, prog, bank, 1);
251 if (!patch)
254 patch->type = type;
257 patch->inst.op[i].am_vib = data[AM_VIB + i];
258 patch->inst.op[i].ksl_level = data[KSL_LEVEL + i];
259 patch->inst.op[i].attack_decay = data[ATTACK_DECAY + i];
260 patch->inst.op[i].sustain_release = data[SUSTAIN_RELEASE + i];
261 patch->inst.op[i].wave_select = data[WAVE_SELECT + i];
263 patch->inst.feedback_connection[0] = data[CONNECTION];
267 patch->inst.op[i+2].am_vib =
269 patch->inst.op[i+2].ksl_level =
271 patch->inst.op[i+2].attack_decay =
273 patch->inst.op[i+2].sustain_release =
275 patch->inst.op[i+2].wave_select =
278 patch->inst.feedback_connection[1] =
283 patch->inst.echo_delay = ext[0];
284 patch->inst.echo_atten = ext[1];
285 patch->inst.chorus_spread = ext[2];
286 patch->inst.trnsps = ext[3];
287 patch->inst.fix_dur = ext[4];
288 patch->inst.modes = ext[5];
289 patch->inst.fix_key = ext[6];
293 strscpy(patch->name, name, sizeof(patch->name));
300 * find a patch with the given program and bank numbers, returns its pointer
301 * if no matching patch is found and create_patch is set, it creates a
302 * new patch object.
309 struct fm_patch *patch;
311 for (patch = opl3->patch_table[key]; patch; patch = patch->next) {
312 if (patch->prog == prog && patch->bank == bank)
313 return patch;
318 patch = kzalloc(sizeof(*patch), GFP_KERNEL);
319 if (!patch)
321 patch->prog = prog;
322 patch->bank = bank;
323 patch->next = opl3->patch_table[key];
324 opl3->patch_table[key] = patch;
325 return patch;
336 struct fm_patch *patch, *next;
337 for (patch = opl3->patch_table[i]; patch; patch = next) {
338 next = patch->next;
339 kfree(patch);