Lines Matching refs:voices
209 voice = &chip->voices[idx]; in voice_alloc()
210 voice2 = pair ? &chip->voices[idx+1] : NULL; in voice_alloc()
328 if (ypcm->voices[1]) in snd_ymfpci_pcm_interrupt()
329 bank = &ypcm->voices[1]->bank[next_bank]; in snd_ymfpci_pcm_interrupt()
381 if (ypcm->voices[0] == NULL) { in snd_ymfpci_playback_trigger()
389 chip->ctrl_playback[ypcm->voices[0]->number + 1] = cpu_to_le32(ypcm->voices[0]->bank_addr); in snd_ymfpci_playback_trigger()
390 if (ypcm->voices[1] != NULL && !ypcm->use_441_slot) in snd_ymfpci_playback_trigger()
391 chip->ctrl_playback[ypcm->voices[1]->number + 1] = cpu_to_le32(ypcm->voices[1]->bank_addr); in snd_ymfpci_playback_trigger()
402 chip->ctrl_playback[ypcm->voices[0]->number + 1] = 0; in snd_ymfpci_playback_trigger()
403 if (ypcm->voices[1] != NULL && !ypcm->use_441_slot) in snd_ymfpci_playback_trigger()
404 chip->ctrl_playback[ypcm->voices[1]->number + 1] = 0; in snd_ymfpci_playback_trigger()
449 static int snd_ymfpci_pcm_voice_alloc(struct snd_ymfpci_pcm *ypcm, int voices) in snd_ymfpci_pcm_voice_alloc() argument
453 if (ypcm->voices[1] != NULL && voices < 2) { in snd_ymfpci_pcm_voice_alloc()
454 snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[1]); in snd_ymfpci_pcm_voice_alloc()
455 ypcm->voices[1] = NULL; in snd_ymfpci_pcm_voice_alloc()
457 if (voices == 1 && ypcm->voices[0] != NULL) in snd_ymfpci_pcm_voice_alloc()
459 if (voices == 2 && ypcm->voices[0] != NULL && ypcm->voices[1] != NULL) in snd_ymfpci_pcm_voice_alloc()
461 if (voices > 1) { in snd_ymfpci_pcm_voice_alloc()
462 if (ypcm->voices[0] != NULL && ypcm->voices[1] == NULL) { in snd_ymfpci_pcm_voice_alloc()
463 snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[0]); in snd_ymfpci_pcm_voice_alloc()
464 ypcm->voices[0] = NULL; in snd_ymfpci_pcm_voice_alloc()
467 err = snd_ymfpci_voice_alloc(ypcm->chip, YMFPCI_PCM, voices > 1, &ypcm->voices[0]); in snd_ymfpci_pcm_voice_alloc()
470 ypcm->voices[0]->ypcm = ypcm; in snd_ymfpci_pcm_voice_alloc()
471 ypcm->voices[0]->interrupt = snd_ymfpci_pcm_interrupt; in snd_ymfpci_pcm_voice_alloc()
472 if (voices > 1) { in snd_ymfpci_pcm_voice_alloc()
473 ypcm->voices[1] = &ypcm->chip->voices[ypcm->voices[0]->number + 1]; in snd_ymfpci_pcm_voice_alloc()
474 ypcm->voices[1]->ypcm = ypcm; in snd_ymfpci_pcm_voice_alloc()
483 struct snd_ymfpci_voice *voice = ypcm->voices[voiceidx]; in snd_ymfpci_pcm_init_voice()
645 if (ypcm->voices[1]) { in snd_ymfpci_playback_hw_free()
646 snd_ymfpci_voice_free(chip, ypcm->voices[1]); in snd_ymfpci_playback_hw_free()
647 ypcm->voices[1] = NULL; in snd_ymfpci_playback_hw_free()
649 if (ypcm->voices[0]) { in snd_ymfpci_playback_hw_free()
650 snd_ymfpci_voice_free(chip, ypcm->voices[0]); in snd_ymfpci_playback_hw_free()
651 ypcm->voices[0] = NULL; in snd_ymfpci_playback_hw_free()
738 struct snd_ymfpci_voice *voice = ypcm->voices[0]; in snd_ymfpci_playback_pointer()
783 voice = &chip->voices[nvoice]; in snd_ymfpci_interrupt()
2129 chip->voices[voice].number = voice; in snd_ymfpci_memalloc()
2130 chip->voices[voice].bank = (struct snd_ymfpci_playback_bank *)ptr; in snd_ymfpci_memalloc()
2131 chip->voices[voice].bank_addr = ptr_addr; in snd_ymfpci_memalloc()