Lines Matching defs:emu
24 static int voice_alloc(struct snd_emu10k1 *emu, int type, int number,
30 for (i = emu->next_free_voice, j = 0; j < NUM_G; i = (i + skip) % NUM_G, j += skip) {
32 dev_dbg(emu->card->dev, "i %d j %d next free %d!\n",
33 i, j, emu->next_free_voice);
43 voice = &emu->voices[i + k];
51 voice = &emu->voices[i + k];
54 /* dev_dbg(emu->card->dev, "allocated voice %d\n", i + k); */
58 *rvoice = &emu->voices[i];
59 emu->next_free_voice = (i + number) % NUM_G;
67 static void voice_free(struct snd_emu10k1 *emu,
71 snd_emu10k1_voice_init(emu, pvoice->number);
77 int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int count, int channels,
89 guard(spinlock_irqsave)(&emu->voice_lock);
91 result = voice_alloc(emu, type, count, epcm, &rvoice[got]);
95 dev_dbg(emu->card->dev, "voice alloc - %i, %i of %i\n",
100 if (type != EMU10K1_SYNTH && emu->get_synth_voice) {
102 result = emu->get_synth_voice(emu);
104 voice_free(emu, &emu->voices[result]);
110 voice_free(emu, rvoice[i] + j);
121 int snd_emu10k1_voice_free(struct snd_emu10k1 *emu,
128 guard(spinlock_irqsave)(&emu->voice_lock);
131 voice_free(emu, pvoice++);