Lines Matching refs:voices
214 voice = &chip->voices[idx]; in voice_alloc()
215 voice2 = pair ? &chip->voices[idx+1] : NULL; in voice_alloc()
333 if (ypcm->voices[1]) in snd_ymfpci_pcm_interrupt()
334 bank = &ypcm->voices[1]->bank[next_bank]; in snd_ymfpci_pcm_interrupt()
386 if (ypcm->voices[0] == NULL) { in snd_ymfpci_playback_trigger()
394 chip->ctrl_playback[ypcm->voices[0]->number + 1] = cpu_to_le32(ypcm->voices[0]->bank_addr); in snd_ymfpci_playback_trigger()
395 if (ypcm->voices[1] != NULL && !ypcm->use_441_slot) in snd_ymfpci_playback_trigger()
396 chip->ctrl_playback[ypcm->voices[1]->number + 1] = cpu_to_le32(ypcm->voices[1]->bank_addr); in snd_ymfpci_playback_trigger()
407 chip->ctrl_playback[ypcm->voices[0]->number + 1] = 0; in snd_ymfpci_playback_trigger()
408 if (ypcm->voices[1] != NULL && !ypcm->use_441_slot) in snd_ymfpci_playback_trigger()
409 chip->ctrl_playback[ypcm->voices[1]->number + 1] = 0; in snd_ymfpci_playback_trigger()
454 static int snd_ymfpci_pcm_voice_alloc(struct snd_ymfpci_pcm *ypcm, int voices) in snd_ymfpci_pcm_voice_alloc() argument
458 if (ypcm->voices[1] != NULL && voices < 2) { in snd_ymfpci_pcm_voice_alloc()
459 snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[1]); in snd_ymfpci_pcm_voice_alloc()
460 ypcm->voices[1] = NULL; in snd_ymfpci_pcm_voice_alloc()
462 if (voices == 1 && ypcm->voices[0] != NULL) in snd_ymfpci_pcm_voice_alloc()
464 if (voices == 2 && ypcm->voices[0] != NULL && ypcm->voices[1] != NULL) in snd_ymfpci_pcm_voice_alloc()
466 if (voices > 1) { in snd_ymfpci_pcm_voice_alloc()
467 if (ypcm->voices[0] != NULL && ypcm->voices[1] == NULL) { in snd_ymfpci_pcm_voice_alloc()
468 snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[0]); in snd_ymfpci_pcm_voice_alloc()
469 ypcm->voices[0] = NULL; in snd_ymfpci_pcm_voice_alloc()
472 err = snd_ymfpci_voice_alloc(ypcm->chip, YMFPCI_PCM, voices > 1, &ypcm->voices[0]); in snd_ymfpci_pcm_voice_alloc()
475 ypcm->voices[0]->ypcm = ypcm; in snd_ymfpci_pcm_voice_alloc()
476 ypcm->voices[0]->interrupt = snd_ymfpci_pcm_interrupt; in snd_ymfpci_pcm_voice_alloc()
477 if (voices > 1) { in snd_ymfpci_pcm_voice_alloc()
478 ypcm->voices[1] = &ypcm->chip->voices[ypcm->voices[0]->number + 1]; in snd_ymfpci_pcm_voice_alloc()
479 ypcm->voices[1]->ypcm = ypcm; in snd_ymfpci_pcm_voice_alloc()
488 struct snd_ymfpci_voice *voice = ypcm->voices[voiceidx]; in snd_ymfpci_pcm_init_voice()
650 if (ypcm->voices[1]) { in snd_ymfpci_playback_hw_free()
651 snd_ymfpci_voice_free(chip, ypcm->voices[1]); in snd_ymfpci_playback_hw_free()
652 ypcm->voices[1] = NULL; in snd_ymfpci_playback_hw_free()
654 if (ypcm->voices[0]) { in snd_ymfpci_playback_hw_free()
655 snd_ymfpci_voice_free(chip, ypcm->voices[0]); in snd_ymfpci_playback_hw_free()
656 ypcm->voices[0] = NULL; in snd_ymfpci_playback_hw_free()
743 struct snd_ymfpci_voice *voice = ypcm->voices[0]; in snd_ymfpci_playback_pointer()
788 voice = &chip->voices[nvoice]; in snd_ymfpci_interrupt()
2133 chip->voices[voice].number = voice; in snd_ymfpci_memalloc()
2134 chip->voices[voice].bank = (struct snd_ymfpci_playback_bank *)ptr; in snd_ymfpci_memalloc()
2135 chip->voices[voice].bank_addr = ptr_addr; in snd_ymfpci_memalloc()