Lines Matching refs:zp
31 struct snd_soundfont *sf, struct snd_sf_zone *zp);
52 static void delete_preset(struct snd_sf_list *sflist, struct snd_sf_zone *zp);
337 struct snd_sf_zone *zp) in set_zone_counter() argument
339 zp->counter = sflist->zone_counter++; in set_zone_counter()
350 struct snd_sf_zone *zp; in sf_zone_new() local
352 if ((zp = kzalloc(sizeof(*zp), GFP_KERNEL)) == NULL) in sf_zone_new()
354 zp->next = sf->zones; in sf_zone_new()
355 sf->zones = zp; in sf_zone_new()
357 init_voice_info(&zp->v); in sf_zone_new()
359 set_zone_counter(sflist, sf, zp); in sf_zone_new()
360 return zp; in sf_zone_new()
414 struct snd_sf_zone *zp, *prevp; in load_map() local
432 for (zp = sf->zones; zp; prevp = zp, zp = zp->next) { in load_map()
433 if (zp->mapped && in load_map()
434 zp->instr == map.map_instr && in load_map()
435 zp->bank == map.map_bank && in load_map()
436 zp->v.low == map.map_key && in load_map()
437 zp->v.start == map.src_instr && in load_map()
438 zp->v.end == map.src_bank && in load_map()
439 zp->v.fixkey == map.src_key) { in load_map()
443 prevp->next = zp->next; in load_map()
444 zp->next = sf->zones; in load_map()
445 sf->zones = zp; in load_map()
448 set_zone_counter(sflist, sf, zp); in load_map()
454 if ((zp = sf_zone_new(sflist, sf)) == NULL) in load_map()
457 zp->bank = map.map_bank; in load_map()
458 zp->instr = map.map_instr; in load_map()
459 zp->mapped = 1; in load_map()
461 zp->v.low = map.map_key; in load_map()
462 zp->v.high = map.map_key; in load_map()
464 zp->v.start = map.src_instr; in load_map()
465 zp->v.end = map.src_bank; in load_map()
466 zp->v.fixkey = map.src_key; in load_map()
467 zp->v.sf_id = sf->id; in load_map()
469 add_preset(sflist, zp); in load_map()
1195 delete_preset(struct snd_sf_list *sflist, struct snd_sf_zone *zp) in delete_preset() argument
1200 if ((index = get_index(zp->bank, zp->instr, zp->v.low)) < 0) in delete_preset()
1203 while (p->next_instr == zp) { in delete_preset()
1204 p->next_instr = zp->next_instr; in delete_preset()
1205 zp = zp->next_zone; in delete_preset()
1206 if (zp == NULL) in delete_preset()
1258 struct snd_sf_zone *zp; in search_first_zone() local
1262 for (zp = sflist->presets[index]; zp; zp = zp->next_instr) { in search_first_zone()
1263 if (zp->instr == preset && zp->bank == bank) in search_first_zone()
1264 return zp; in search_first_zone()
1278 struct snd_sf_zone *zp; in search_zones() local
1281 zp = search_first_zone(sflist, bank, preset, *notep); in search_zones()
1283 for (; zp; zp = zp->next_zone) { in search_zones()
1284 if (*notep >= zp->v.low && *notep <= zp->v.high && in search_zones()
1285 vel >= zp->v.vellow && vel <= zp->v.velhigh) { in search_zones()
1286 if (zp->mapped) { in search_zones()
1288 int key = zp->v.fixkey; in search_zones()
1289 preset = zp->v.start; in search_zones()
1290 bank = zp->v.end; in search_zones()
1303 table[nvoices++] = zp; in search_zones()
1358 struct snd_sf_zone *zp, *nextzp; in snd_sf_clear() local
1363 for (zp = sf->zones; zp; zp = nextzp) { in snd_sf_clear()
1364 nextzp = zp->next; in snd_sf_clear()
1365 kfree(zp); in snd_sf_clear()
1446 struct snd_sf_zone *zp, *nextzp; in snd_soundfont_remove_unlocked() local
1458 for (zp = sf->zones; zp; zp = nextzp) { in snd_soundfont_remove_unlocked()
1459 if (zp->counter < sflist->zone_locked) in snd_soundfont_remove_unlocked()
1461 nextzp = zp->next; in snd_soundfont_remove_unlocked()
1463 kfree(zp); in snd_soundfont_remove_unlocked()