viadev 133 sound/pci/via82xx.c #define VIADEV_REG(viadev, x) ((viadev)->port + VIA_REG_##x) viadev 377 sound/pci/via82xx.c struct viadev devs[VIA_MAX_DEVS]; viadev 597 sound/pci/via82xx.c VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 598 sound/pci/via82xx.c inb(VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 601 sound/pci/via82xx.c outb(0x00, VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 603 sound/pci/via82xx.c outb(0x03, VIADEV_REG(viadev, OFFSET_STATUS)); viadev 604 sound/pci/via82xx.c outb(0x00, VIADEV_REG(viadev, OFFSET_TYPE)); /* for via686 */ viadev 606 sound/pci/via82xx.c viadev->lastpos = 0; viadev 607 sound/pci/via82xx.c viadev->hwptr_done = 0; viadev 632 sound/pci/via82xx.c struct viadev *viadev = &chip->devs[i]; viadev 633 sound/pci/via82xx.c unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); viadev 636 sound/pci/via82xx.c if (viadev->substream && viadev->running) { viadev 643 sound/pci/via82xx.c viadev->hwptr_done = 0; viadev 645 sound/pci/via82xx.c viadev->hwptr_done += viadev->fragsize; viadev 646 sound/pci/via82xx.c viadev->in_interrupt = c_status; viadev 648 sound/pci/via82xx.c snd_pcm_period_elapsed(viadev->substream); viadev 650 sound/pci/via82xx.c viadev->in_interrupt = 0; viadev 652 sound/pci/via82xx.c outb(c_status, VIADEV_REG(viadev, OFFSET_STATUS)); /* ack */ viadev 673 sound/pci/via82xx.c struct viadev *viadev = &chip->devs[i]; viadev 677 sound/pci/via82xx.c shadow_status = (status >> viadev->shadow_shift) & viadev 684 sound/pci/via82xx.c substream = viadev->substream; viadev 685 sound/pci/via82xx.c if (substream && viadev->running) { viadev 692 sound/pci/via82xx.c viadev->hwptr_done = 0; viadev 694 sound/pci/via82xx.c viadev->hwptr_done += viadev->fragsize; viadev 695 sound/pci/via82xx.c viadev->in_interrupt = c_status; viadev 697 sound/pci/via82xx.c viadev->in_interrupt |= VIA_REG_STAT_ACTIVE; viadev 703 sound/pci/via82xx.c viadev->in_interrupt = 0; viadev 705 sound/pci/via82xx.c outb(c_status, VIADEV_REG(viadev, OFFSET_STATUS)); /* ack */ viadev 722 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 733 sound/pci/via82xx.c viadev->running = 1; viadev 738 sound/pci/via82xx.c viadev->running = 0; viadev 742 sound/pci/via82xx.c viadev->running = 0; viadev 745 sound/pci/via82xx.c viadev->running = 1; viadev 750 sound/pci/via82xx.c outb(val, VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 752 sound/pci/via82xx.c snd_via82xx_channel_reset(chip, viadev); viadev 766 sound/pci/via82xx.c ((pos) < viadev->lastpos && ((pos) >= viadev->bufsize2 ||\ viadev 767 sound/pci/via82xx.c viadev->lastpos < viadev->bufsize2)) viadev 774 sound/pci/via82xx.c size = viadev->idx_table[idx].size; viadev 775 sound/pci/via82xx.c base = viadev->idx_table[idx].offset; viadev 777 sound/pci/via82xx.c if (res >= viadev->bufsize) viadev 778 sound/pci/via82xx.c res -= viadev->bufsize; viadev 784 sound/pci/via82xx.c res = viadev->lastpos; viadev 791 sound/pci/via82xx.c int delta = res - viadev->lastpos; viadev 793 sound/pci/via82xx.c delta += viadev->bufsize; viadev 794 sound/pci/via82xx.c if ((unsigned int)delta > viadev->fragsize) viadev 797 sound/pci/via82xx.c if (check_invalid_pos(viadev, res)) { viadev 801 sound/pci/via82xx.c "count = 0x%x\n", idx, viadev->tbl_entries, viadev 802 sound/pci/via82xx.c viadev->lastpos, viadev->bufsize2, viadev 803 sound/pci/via82xx.c viadev->idx_table[idx].offset, viadev 804 sound/pci/via82xx.c viadev->idx_table[idx].size, count); viadev 808 sound/pci/via82xx.c if (check_invalid_pos(viadev, res)) { viadev 811 sound/pci/via82xx.c res = viadev->lastpos; viadev 824 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 827 sound/pci/via82xx.c if (snd_BUG_ON(!viadev->tbl_entries)) viadev 829 sound/pci/via82xx.c if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) viadev 833 sound/pci/via82xx.c count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)) & 0xffffff; viadev 837 sound/pci/via82xx.c ptr = inl(VIADEV_REG(viadev, OFFSET_CURR_PTR)); viadev 838 sound/pci/via82xx.c if (ptr <= (unsigned int)viadev->table.addr) viadev 841 sound/pci/via82xx.c idx = ((ptr - (unsigned int)viadev->table.addr) / 8 - 1) % viadev->tbl_entries; viadev 842 sound/pci/via82xx.c res = calc_linear_pos(viadev, idx, count); viadev 843 sound/pci/via82xx.c viadev->lastpos = res; /* remember the last position */ viadev 855 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 859 sound/pci/via82xx.c if (snd_BUG_ON(!viadev->tbl_entries)) viadev 863 sound/pci/via82xx.c count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)); viadev 864 sound/pci/via82xx.c status = viadev->in_interrupt; viadev 866 sound/pci/via82xx.c status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); viadev 879 sound/pci/via82xx.c if (idx >= viadev->tbl_entries) { viadev 882 sound/pci/via82xx.c viadev->tbl_entries); viadev 884 sound/pci/via82xx.c res = viadev->lastpos; viadev 887 sound/pci/via82xx.c res = calc_linear_pos(viadev, idx, count); viadev 890 sound/pci/via82xx.c res = viadev->hwptr_done; viadev 891 sound/pci/via82xx.c if (!viadev->in_interrupt) { viadev 896 sound/pci/via82xx.c res += viadev->fragsize; viadev 901 sound/pci/via82xx.c viadev->lastpos = res; viadev 916 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 922 sound/pci/via82xx.c err = build_via_table(viadev, substream, chip->pci, viadev 938 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 940 sound/pci/via82xx.c clean_via_table(viadev, substream, chip->pci); viadev 952 sound/pci/via82xx.c outl((u32)viadev->table.addr, VIADEV_REG(viadev, OFFSET_TABLE_PTR)); viadev 963 sound/pci/via82xx.c snd_via82xx_channel_reset(chip, viadev); viadev 965 sound/pci/via82xx.c snd_via82xx_set_table_ptr(chip, viadev); viadev 969 sound/pci/via82xx.c ((viadev->reg_offset & 0x10) == 0 ? VIA_REG_TYPE_INT_LSAMPLE : 0) | viadev 971 sound/pci/via82xx.c VIA_REG_TYPE_INT_FLAG, VIADEV_REG(viadev, OFFSET_TYPE)); viadev 977 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 982 sound/pci/via82xx.c via686_setup_format(chip, viadev, runtime); viadev 989 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 993 sound/pci/via82xx.c via686_setup_format(chip, viadev, runtime); viadev 1023 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 1034 sound/pci/via82xx.c if (chip->spdif_on && viadev->reg_offset == 0x30) viadev 1043 sound/pci/via82xx.c snd_via82xx_channel_reset(chip, viadev); viadev 1044 sound/pci/via82xx.c snd_via82xx_set_table_ptr(chip, viadev); viadev 1045 sound/pci/via82xx.c outb(chip->playback_volume[viadev->reg_offset / 0x10][0], viadev 1046 sound/pci/via82xx.c VIADEV_REG(viadev, OFS_PLAYBACK_VOLUME_L)); viadev 1047 sound/pci/via82xx.c outb(chip->playback_volume[viadev->reg_offset / 0x10][1], viadev 1048 sound/pci/via82xx.c VIADEV_REG(viadev, OFS_PLAYBACK_VOLUME_R)); viadev 1053 sound/pci/via82xx.c VIADEV_REG(viadev, OFFSET_STOP_IDX)); viadev 1065 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 1076 sound/pci/via82xx.c snd_via82xx_channel_reset(chip, viadev); viadev 1077 sound/pci/via82xx.c snd_via82xx_set_table_ptr(chip, viadev); viadev 1082 sound/pci/via82xx.c outb(fmt, VIADEV_REG(viadev, OFS_MULTPLAY_FORMAT)); viadev 1102 sound/pci/via82xx.c outl(0xff000000 | slots, VIADEV_REG(viadev, OFFSET_STOP_IDX)); viadev 1114 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 1120 sound/pci/via82xx.c snd_via82xx_channel_reset(chip, viadev); viadev 1121 sound/pci/via82xx.c snd_via82xx_set_table_ptr(chip, viadev); viadev 1122 sound/pci/via82xx.c outb(VIA_REG_CAPTURE_FIFO_ENABLE, VIADEV_REG(viadev, OFS_CAPTURE_FIFO)); viadev 1126 sound/pci/via82xx.c VIADEV_REG(viadev, OFFSET_STOP_IDX)); viadev 1171 sound/pci/via82xx.c ratep = &chip->rates[viadev->direction]; viadev 1174 sound/pci/via82xx.c if (chip->spdif_on && viadev->reg_offset == 0x30) { viadev 1178 sound/pci/via82xx.c } else if (chip->dxs_fixed && viadev->reg_offset < 0x40) { viadev 1182 sound/pci/via82xx.c } else if (chip->dxs_src && viadev->reg_offset < 0x40) { viadev 1189 sound/pci/via82xx.c int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC; viadev 1204 sound/pci/via82xx.c runtime->private_data = viadev; viadev 1205 sound/pci/via82xx.c viadev->substream = substream; viadev 1217 sound/pci/via82xx.c struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number]; viadev 1220 sound/pci/via82xx.c if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0) viadev 1231 sound/pci/via82xx.c struct viadev *viadev = &chip->devs[chip->multi_devno]; viadev 1245 sound/pci/via82xx.c if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0) viadev 1261 sound/pci/via82xx.c struct viadev *viadev = &chip->devs[chip->capture_devno + substream->pcm->device]; viadev 1263 sound/pci/via82xx.c return snd_via82xx_pcm_open(chip, viadev, substream); viadev 1272 sound/pci/via82xx.c struct viadev *viadev = substream->runtime->private_data; viadev 1276 sound/pci/via82xx.c ratep = &chip->rates[viadev->direction]; viadev 1283 sound/pci/via82xx.c if (! viadev->direction) { viadev 1294 sound/pci/via82xx.c viadev->substream = NULL; viadev 78 sound/pci/via82xx_modem.c #define VIADEV_REG(viadev, x) ((viadev)->port + VIA_REG_##x) viadev 250 sound/pci/via82xx_modem.c struct viadev devs[VIA_MAX_MODEM_DEVS]; viadev 461 sound/pci/via82xx_modem.c VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 462 sound/pci/via82xx_modem.c inb(VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 465 sound/pci/via82xx_modem.c outb(0x00, VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 467 sound/pci/via82xx_modem.c outb(0x03, VIADEV_REG(viadev, OFFSET_STATUS)); viadev 468 sound/pci/via82xx_modem.c outb(0x00, VIADEV_REG(viadev, OFFSET_TYPE)); /* for via686 */ viadev 470 sound/pci/via82xx_modem.c viadev->lastpos = 0; viadev 493 sound/pci/via82xx_modem.c struct viadev *viadev = &chip->devs[i]; viadev 494 sound/pci/via82xx_modem.c unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); viadev 498 sound/pci/via82xx_modem.c if (viadev->substream && viadev->running) { viadev 500 sound/pci/via82xx_modem.c snd_pcm_period_elapsed(viadev->substream); viadev 503 sound/pci/via82xx_modem.c outb(c_status, VIADEV_REG(viadev, OFFSET_STATUS)); /* ack */ viadev 519 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 526 sound/pci/via82xx_modem.c viadev->running = 1; viadev 530 sound/pci/via82xx_modem.c viadev->running = 0; viadev 534 sound/pci/via82xx_modem.c viadev->running = 0; viadev 537 sound/pci/via82xx_modem.c viadev->running = 1; viadev 542 sound/pci/via82xx_modem.c outb(val, VIADEV_REG(viadev, OFFSET_CONTROL)); viadev 544 sound/pci/via82xx_modem.c snd_via82xx_channel_reset(chip, viadev); viadev 557 sound/pci/via82xx_modem.c ((pos) < viadev->lastpos && ((pos) >= viadev->bufsize2 ||\ viadev 558 sound/pci/via82xx_modem.c viadev->lastpos < viadev->bufsize2)) viadev 565 sound/pci/via82xx_modem.c size = viadev->idx_table[idx].size; viadev 566 sound/pci/via82xx_modem.c res = viadev->idx_table[idx].offset + size - count; viadev 572 sound/pci/via82xx_modem.c res = viadev->lastpos; viadev 573 sound/pci/via82xx_modem.c } else if (check_invalid_pos(viadev, res)) { viadev 577 sound/pci/via82xx_modem.c "count = 0x%x\n", idx, viadev->tbl_entries, viadev->lastpos, viadev 578 sound/pci/via82xx_modem.c viadev->bufsize2, viadev->idx_table[idx].offset, viadev 579 sound/pci/via82xx_modem.c viadev->idx_table[idx].size, count); viadev 584 sound/pci/via82xx_modem.c res = viadev->lastpos; viadev 588 sound/pci/via82xx_modem.c res = viadev->idx_table[idx].offset; viadev 593 sound/pci/via82xx_modem.c res = viadev->idx_table[idx].offset + size; viadev 594 sound/pci/via82xx_modem.c if (check_invalid_pos(viadev, res)) { viadev 597 sound/pci/via82xx_modem.c res = viadev->lastpos; viadev 601 sound/pci/via82xx_modem.c viadev->lastpos = res; /* remember the last position */ viadev 602 sound/pci/via82xx_modem.c if (res >= viadev->bufsize) viadev 603 sound/pci/via82xx_modem.c res -= viadev->bufsize; viadev 613 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 616 sound/pci/via82xx_modem.c if (snd_BUG_ON(!viadev->tbl_entries)) viadev 618 sound/pci/via82xx_modem.c if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) viadev 622 sound/pci/via82xx_modem.c count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)) & 0xffffff; viadev 626 sound/pci/via82xx_modem.c ptr = inl(VIADEV_REG(viadev, OFFSET_CURR_PTR)); viadev 627 sound/pci/via82xx_modem.c if (ptr <= (unsigned int)viadev->table.addr) viadev 630 sound/pci/via82xx_modem.c idx = ((ptr - (unsigned int)viadev->table.addr) / 8 - 1) % viadev 631 sound/pci/via82xx_modem.c viadev->tbl_entries; viadev 632 sound/pci/via82xx_modem.c res = calc_linear_pos(viadev, idx, count); viadev 646 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 652 sound/pci/via82xx_modem.c err = build_via_table(viadev, substream, chip->pci, viadev 671 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 673 sound/pci/via82xx_modem.c clean_via_table(viadev, substream, chip->pci); viadev 685 sound/pci/via82xx_modem.c outl((u32)viadev->table.addr, VIADEV_REG(viadev, OFFSET_TABLE_PTR)); viadev 696 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 698 sound/pci/via82xx_modem.c snd_via82xx_channel_reset(chip, viadev); viadev 700 sound/pci/via82xx_modem.c snd_via82xx_set_table_ptr(chip, viadev); viadev 702 sound/pci/via82xx_modem.c VIADEV_REG(viadev, OFFSET_TYPE)); viadev 757 sound/pci/via82xx_modem.c runtime->private_data = viadev; viadev 758 sound/pci/via82xx_modem.c viadev->substream = substream; viadev 770 sound/pci/via82xx_modem.c struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number]; viadev 772 sound/pci/via82xx_modem.c return snd_via82xx_modem_pcm_open(chip, viadev, substream); viadev 781 sound/pci/via82xx_modem.c struct viadev *viadev = &chip->devs[chip->capture_devno + substream->pcm->device]; viadev 783 sound/pci/via82xx_modem.c return snd_via82xx_modem_pcm_open(chip, viadev, substream); viadev 791 sound/pci/via82xx_modem.c struct viadev *viadev = substream->runtime->private_data; viadev 793 sound/pci/via82xx_modem.c viadev->substream = NULL;