Lines Matching refs:vc

256 	struct esa_voice *vc = hdl;  in esa_set_params()  local
270 ch = &vc->play; in esa_set_params()
274 ch = &vc->rec; in esa_set_params()
339 struct esa_voice *vc = hdl; in esa_commit_settings() local
340 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_commit_settings()
341 struct audio_params *p = &vc->play.mode; in esa_commit_settings()
342 struct audio_params *r = &vc->rec.mode; in esa_commit_settings()
351 vc->play.data_offset = ESA_DAC_DATA + (data_bytes * vc->index); in esa_commit_settings()
357 vc->play.data_offset + ESA_SRC3_MODE_OFFSET, in esa_commit_settings()
364 vc->play.data_offset + ESA_SRC3_WORD_LENGTH_OFFSET, in esa_commit_settings()
370 vc->play.data_offset + ESA_CDATA_FREQUENCY, freq); in esa_commit_settings()
373 vc->rec.data_offset = ESA_DAC_DATA + (data_bytes * vc->index) + in esa_commit_settings()
380 vc->rec.data_offset + ESA_SRC3_MODE_OFFSET, in esa_commit_settings()
387 vc->rec.data_offset + ESA_SRC3_WORD_LENGTH_OFFSET, in esa_commit_settings()
393 vc->rec.data_offset + ESA_CDATA_FREQUENCY, freq); in esa_commit_settings()
401 struct esa_voice *vc = hdl; in esa_round_blocksize() local
406 vc->play.blksize = vc->rec.blksize = 4096; in esa_round_blocksize()
408 return (vc->play.blksize); in esa_round_blocksize()
414 struct esa_voice *vc = hdl; in esa_halt_output() local
415 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_halt_output()
420 if (vc->play.active == 0) in esa_halt_output()
423 vc->play.active = 0; in esa_halt_output()
426 ESA_CDATA_INSTANCE_READY + vc->play.data_offset, 0); in esa_halt_output()
441 sc->mixer_list.indexmap[vc->index]); in esa_halt_output()
443 esa_remove_list(vc, &sc->mixer_list, vc->index); in esa_halt_output()
444 esa_remove_list(vc, &sc->dma_list, vc->index); in esa_halt_output()
445 esa_remove_list(vc, &sc->msrc_list, vc->index); in esa_halt_output()
453 struct esa_voice *vc = hdl; in esa_halt_input() local
454 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_halt_input()
459 if (vc->rec.active == 0) in esa_halt_input()
462 vc->rec.active = 0; in esa_halt_input()
475 esa_write_assp(sc, ESA_MEMTYPE_INTERNAL_DATA, vc->rec.data_offset + in esa_halt_input()
481 esa_remove_list(vc, &sc->adc1_list, vc->index + ESA_NUM_VOICES); in esa_halt_input()
482 esa_remove_list(vc, &sc->dma_list, vc->index + ESA_NUM_VOICES); in esa_halt_input()
483 esa_remove_list(vc, &sc->msrc_list, vc->index + ESA_NUM_VOICES); in esa_halt_input()
491 struct esa_voice *vc = hdl; in esa_malloc() local
492 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_malloc()
506 p->next = vc->dma; in esa_malloc()
507 vc->dma = p; in esa_malloc()
515 struct esa_voice *vc = hdl; in esa_free() local
516 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_free()
520 for (pp = &vc->dma; (p = *pp) != NULL; pp = &p->next) in esa_free()
541 struct esa_voice *vc = hdl; in esa_set_port() local
542 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_set_port()
550 struct esa_voice *vc = hdl; in esa_get_port() local
551 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_get_port()
559 struct esa_voice *vc = hdl; in esa_query_devinfo() local
560 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_query_devinfo()
568 struct esa_voice *vc = hdl; in esa_round_buffersize() local
573 vc->play.bufsize = vc->rec.bufsize = 65536; in esa_round_buffersize()
575 return (vc->play.bufsize); in esa_round_buffersize()
590 struct esa_voice *vc = hdl; in esa_trigger_output() local
591 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_trigger_output()
604 int dac_data = ESA_DAC_DATA + (data_bytes * vc->index); in esa_trigger_output()
610 if (vc->play.active) in esa_trigger_output()
613 for (p = vc->dma; p && KERNADDR(p) != start; p = p->next) in esa_trigger_output()
621 vc->play.active = 1; in esa_trigger_output()
622 vc->play.intr = intr; in esa_trigger_output()
623 vc->play.arg = intrarg; in esa_trigger_output()
624 vc->play.pos = 0; in esa_trigger_output()
625 vc->play.count = 0; in esa_trigger_output()
626 vc->play.buf = start; in esa_trigger_output()
629 vc->play.start = bufaddr; in esa_trigger_output()
673 vc->play.mode.sample_rate > 45000 ? 0xff : 0); in esa_trigger_output()
686 esa_add_list(vc, &sc->msrc_list, dac_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_output()
687 vc->index); in esa_trigger_output()
688 esa_add_list(vc, &sc->dma_list, dac_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_output()
689 vc->index); in esa_trigger_output()
690 esa_add_list(vc, &sc->mixer_list, dac_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_output()
691 vc->index); in esa_trigger_output()
714 sc->mixer_list.indexmap[vc->index]); in esa_trigger_output()
724 struct esa_voice *vc = hdl; in esa_trigger_input() local
725 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_trigger_input()
737 int adc_data = ESA_DAC_DATA + (data_bytes * vc->index) + in esa_trigger_input()
743 vc->rec.data_offset = adc_data; in esa_trigger_input()
746 if (vc->index > 0) in esa_trigger_input()
749 if (vc->rec.active) in esa_trigger_input()
752 for (p = vc->dma; p && KERNADDR(p) != start; p = p->next) in esa_trigger_input()
760 vc->rec.active = 1; in esa_trigger_input()
761 vc->rec.intr = intr; in esa_trigger_input()
762 vc->rec.arg = intrarg; in esa_trigger_input()
763 vc->rec.pos = 0; in esa_trigger_input()
764 vc->rec.count = 0; in esa_trigger_input()
765 vc->rec.buf = start; in esa_trigger_input()
768 vc->rec.start = bufaddr; in esa_trigger_input()
819 esa_add_list(vc, &sc->adc1_list, adc_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_input()
820 vc->index + ESA_NUM_VOICES); in esa_trigger_input()
821 esa_add_list(vc, &sc->msrc_list, adc_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_input()
822 vc->index + ESA_NUM_VOICES); in esa_trigger_input()
823 esa_add_list(vc, &sc->dma_list, adc_data >> ESA_DP_SHIFT_COUNT, in esa_trigger_input()
824 vc->index + ESA_NUM_VOICES); in esa_trigger_input()
856 struct esa_voice *vc; in esa_intr() local
903 vc = &sc->voice[i]; in esa_intr()
904 if (vc->play.active) { in esa_intr()
905 play_blksize = vc->play.blksize; in esa_intr()
906 play_bufsize = vc->play.bufsize; in esa_intr()
907 pos = esa_get_pointer(sc, &vc->play) in esa_intr()
909 diff = (play_bufsize + pos - vc->play.pos) in esa_intr()
911 vc->play.pos = pos; in esa_intr()
912 vc->play.count += diff; in esa_intr()
913 while(vc->play.count >= play_blksize) { in esa_intr()
914 vc->play.count -= play_blksize; in esa_intr()
915 (*vc->play.intr)(vc->play.arg); in esa_intr()
918 if (vc->rec.active) { in esa_intr()
919 rec_blksize = vc->rec.blksize; in esa_intr()
920 rec_bufsize = vc->rec.bufsize; in esa_intr()
921 pos = esa_get_pointer(sc, &vc->rec) in esa_intr()
923 diff = (rec_bufsize + pos - vc->rec.pos) in esa_intr()
925 vc->rec.pos = pos; in esa_intr()
926 vc->rec.count += diff; in esa_intr()
927 while(vc->rec.count >= rec_blksize) { in esa_intr()
928 vc->rec.count -= rec_blksize; in esa_intr()
929 (*vc->rec.intr)(vc->rec.arg); in esa_intr()
1294 struct esa_voice *vc; in esa_init() local
1368 vc = &sc->voice[i]; in esa_init()
1369 vc->play.data_offset = ESA_DAC_DATA + (data_bytes * i); in esa_init()
1370 vc->rec.data_offset = ESA_DAC_DATA + (data_bytes * i * 2); in esa_init()
1553 esa_add_list(struct esa_voice *vc, struct esa_list *el, in esa_add_list() argument
1556 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_add_list()
1567 esa_remove_list(struct esa_voice *vc, struct esa_list *el, int index) in esa_remove_list() argument
1569 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_remove_list()
1721 struct esa_voice *vc = addr; in esa_mappage() local
1722 struct esa_softc *sc = (struct esa_softc *)vc->parent; in esa_mappage()
1727 for (p = vc->dma; p && KERNADDR(p) != mem; p = p->next) in esa_mappage()