Lines Matching defs:vc

199 	struct esa_voice *vc = hdl;
212 ch = &vc->play;
216 ch = &vc->rec;
254 struct esa_voice *vc = hdl;
255 struct esa_softc *sc = (struct esa_softc *)vc->parent;
256 struct audio_params *p = &vc->play.mode;
257 struct audio_params *r = &vc->rec.mode;
266 vc->play.data_offset = ESA_DAC_DATA + (data_bytes * vc->index);
272 vc->play.data_offset + ESA_SRC3_MODE_OFFSET,
279 vc->play.data_offset + ESA_SRC3_WORD_LENGTH_OFFSET,
285 vc->play.data_offset + ESA_CDATA_FREQUENCY, freq);
288 vc->rec.data_offset = ESA_DAC_DATA + (data_bytes * vc->index) +
295 vc->rec.data_offset + ESA_SRC3_MODE_OFFSET,
302 vc->rec.data_offset + ESA_SRC3_WORD_LENGTH_OFFSET,
308 vc->rec.data_offset + ESA_CDATA_FREQUENCY, freq);
316 struct esa_voice *vc = hdl;
321 vc->play.blksize = vc->rec.blksize = 4096;
323 return (vc->play.blksize);
329 struct esa_voice *vc = hdl;
330 struct esa_softc *sc = (struct esa_softc *)vc->parent;
335 if (vc->play.active == 0)
339 vc->play.active = 0;
342 ESA_CDATA_INSTANCE_READY + vc->play.data_offset, 0);
357 sc->mixer_list.indexmap[vc->index]);
359 esa_remove_list(vc, &sc->mixer_list, vc->index);
360 esa_remove_list(vc, &sc->dma_list, vc->index);
361 esa_remove_list(vc, &sc->msrc_list, vc->index);
369 struct esa_voice *vc = hdl;
370 struct esa_softc *sc = (struct esa_softc *)vc->parent;
375 if (vc->rec.active == 0)
379 vc->rec.active = 0;
392 esa_write_assp(sc, ESA_MEMTYPE_INTERNAL_DATA, vc->rec.data_offset +
398 esa_remove_list(vc, &sc->adc1_list, vc->index + ESA_NUM_VOICES);
399 esa_remove_list(vc, &sc->dma_list, vc->index + ESA_NUM_VOICES);
400 esa_remove_list(vc, &sc->msrc_list, vc->index + ESA_NUM_VOICES);
408 struct esa_voice *vc = hdl;
409 struct esa_softc *sc = (struct esa_softc *)vc->parent;
423 p->next = vc->dma;
424 vc->dma = p;
432 struct esa_voice *vc = hdl;
433 struct esa_softc *sc = (struct esa_softc *)vc->parent;
437 for (pp = &vc->dma; (p = *pp) != NULL; pp = &p->next)
449 struct esa_voice *vc = hdl;
450 struct esa_softc *sc = (struct esa_softc *)vc->parent;
458 struct esa_voice *vc = hdl;
459 struct esa_softc *sc = (struct esa_softc *)vc->parent;
467 struct esa_voice *vc = hdl;
468 struct esa_softc *sc = (struct esa_softc *)vc->parent;
476 struct esa_voice *vc = hdl;
481 vc->play.bufsize = vc->rec.bufsize = 65536;
483 return (vc->play.bufsize);
491 struct esa_voice *vc = hdl;
492 struct esa_softc *sc = (struct esa_softc *)vc->parent;
505 int dac_data = ESA_DAC_DATA + (data_bytes * vc->index);
511 if (vc->play.active)
514 for (p = vc->dma; p && KERNADDR(p) != start; p = p->next)
522 vc->play.active = 1;
523 vc->play.intr = intr;
524 vc->play.arg = intrarg;
525 vc->play.pos = 0;
526 vc->play.count = 0;
527 vc->play.buf = start;
530 vc->play.start = bufaddr;
575 vc->play.mode.sample_rate > 45000 ? 0xff : 0);
588 esa_add_list(vc, &sc->msrc_list, dac_data >> ESA_DP_SHIFT_COUNT,
589 vc->index);
590 esa_add_list(vc, &sc->dma_list, dac_data >> ESA_DP_SHIFT_COUNT,
591 vc->index);
592 esa_add_list(vc, &sc->mixer_list, dac_data >> ESA_DP_SHIFT_COUNT,
593 vc->index);
613 sc->mixer_list.indexmap[vc->index]);
623 struct esa_voice *vc = hdl;
624 struct esa_softc *sc = (struct esa_softc *)vc->parent;
636 int adc_data = ESA_DAC_DATA + (data_bytes * vc->index) +
642 vc->rec.data_offset = adc_data;
645 if (vc->index > 0)
648 if (vc->rec.active)
651 for (p = vc->dma; p && KERNADDR(p) != start; p = p->next)
659 vc->rec.active = 1;
660 vc->rec.intr = intr;
661 vc->rec.arg = intrarg;
662 vc->rec.pos = 0;
663 vc->rec.count = 0;
664 vc->rec.buf = start;
667 vc->rec.start = bufaddr;
718 esa_add_list(vc, &sc->adc1_list, adc_data >> ESA_DP_SHIFT_COUNT,
719 vc->index + ESA_NUM_VOICES);
720 esa_add_list(vc, &sc->msrc_list, adc_data >> ESA_DP_SHIFT_COUNT,
721 vc->index + ESA_NUM_VOICES);
722 esa_add_list(vc, &sc->dma_list, adc_data >> ESA_DP_SHIFT_COUNT,
723 vc->index + ESA_NUM_VOICES);
752 struct esa_voice *vc;
803 vc = &sc->voice[i];
804 if (vc->play.active) {
805 play_blksize = vc->play.blksize;
806 play_bufsize = vc->play.bufsize;
807 pos = esa_get_pointer(sc, &vc->play)
809 diff = (play_bufsize + pos - vc->play.pos)
811 vc->play.pos = pos;
812 vc->play.count += diff;
813 while(vc->play.count >= play_blksize) {
814 vc->play.count -= play_blksize;
815 (*vc->play.intr)(vc->play.arg);
818 if (vc->rec.active) {
819 rec_blksize = vc->rec.blksize;
820 rec_bufsize = vc->rec.bufsize;
821 pos = esa_get_pointer(sc, &vc->rec)
823 diff = (rec_bufsize + pos - vc->rec.pos)
825 vc->rec.pos = pos;
826 vc->rec.count += diff;
827 while(vc->rec.count >= rec_blksize) {
828 vc->rec.count -= rec_blksize;
829 (*vc->rec.intr)(vc->rec.arg);
1181 struct esa_voice *vc;
1255 vc = &sc->voice[i];
1256 vc->play.data_offset = ESA_DAC_DATA + (data_bytes * i);
1257 vc->rec.data_offset = ESA_DAC_DATA + (data_bytes * i * 2);
1440 esa_add_list(struct esa_voice *vc, struct esa_list *el,
1443 struct esa_softc *sc = (struct esa_softc *)vc->parent;
1454 esa_remove_list(struct esa_voice *vc, struct esa_list *el, int index)
1456 struct esa_softc *sc = (struct esa_softc *)vc->parent;