Lines Matching refs:ALI_REG

156 #define ALI_REG(codec, x) ((codec)->port + x)  macro
284 return (unsigned int)inl(ALI_REG(codec, port)); in snd_ali_5451_peek()
291 outl((unsigned int)val, ALI_REG(codec, port)); in snd_ali_5451_poke()
413 ALI_REG(codec, ALI_AC97_GPIO)); in snd_ali_codec_write()
480 dwVal = inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_special_channel()
482 outl(dwVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_special_channel()
490 dwVal = inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_special_channel()
492 outl(dwVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_special_channel()
499 gc = inl(ALI_REG(codec, ALI_GC_CIR)); in snd_ali_enable_address_interrupt()
502 outl( gc, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_enable_address_interrupt()
509 gc = inl(ALI_REG(codec, ALI_GC_CIR)); in snd_ali_disable_address_interrupt()
512 outl(gc, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_disable_address_interrupt()
524 pchregs->data.ainten = inl(ALI_REG(codec, pchregs->regs.ainten)); in snd_ali_disable_voice_irq()
526 outl(pchregs->data.ainten, ALI_REG(codec, pchregs->regs.ainten)); in snd_ali_disable_voice_irq()
559 (inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)) & in snd_ali_find_free_channel()
577 (inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)) & in snd_ali_find_free_channel()
622 outl(mask, ALI_REG(codec, codec->chregs.regs.stop)); in snd_ali_stop_voice()
633 begintimer = inl(ALI_REG(codec, ALI_STIMER)); in snd_ali_delay()
634 currenttimer = inl(ALI_REG(codec, ALI_STIMER)); in snd_ali_delay()
639 currenttimer = inl(ALI_REG(codec, ALI_STIMER)); in snd_ali_delay()
650 bval = inb(ALI_REG(codec, ALI_SPDIF_CTRL + 1)); in snd_ali_detect_spdif_rate()
652 outb(bval, ALI_REG(codec, ALI_SPDIF_CTRL + 1)); in snd_ali_detect_spdif_rate()
657 bval = inb(ALI_REG(codec, ALI_SPDIF_CTRL + 1)); in snd_ali_detect_spdif_rate()
668 bval = inb(ALI_REG(codec,ALI_SPDIF_CTRL + 1)); in snd_ali_detect_spdif_rate()
682 wval = inw(ALI_REG(codec, ALI_SPDIF_CTRL + 2)); in snd_ali_detect_spdif_rate()
685 outw(wval, ALI_REG(codec, ALI_SPDIF_CTRL + 2)); in snd_ali_detect_spdif_rate()
687 bval = inb(ALI_REG(codec, ALI_SPDIF_CS + 3)) & 0xf0; in snd_ali_detect_spdif_rate()
688 outb(bval | 0x02, ALI_REG(codec, ALI_SPDIF_CS + 3)); in snd_ali_detect_spdif_rate()
690 wval = inw(ALI_REG(codec, ALI_SPDIF_CTRL + 2)); in snd_ali_detect_spdif_rate()
693 outw(wval, ALI_REG(codec, ALI_SPDIF_CTRL + 2)); in snd_ali_detect_spdif_rate()
695 bval = inb(ALI_REG(codec,ALI_SPDIF_CS + 3)) & 0xf0; in snd_ali_detect_spdif_rate()
696 outb(bval | 0x03, ALI_REG(codec, ALI_SPDIF_CS + 3)); in snd_ali_detect_spdif_rate()
705 bval = inb(ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_get_spdif_in_rate()
708 outb(bval, ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_get_spdif_in_rate()
712 bval = inb(ALI_REG(codec, ALI_SPDIF_CS + 3)); in snd_ali_get_spdif_in_rate()
729 dwVal = inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_in()
731 outl(dwVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_in()
733 dwVal = inb(ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_enable_spdif_in()
735 outb(dwVal, ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_enable_spdif_in()
744 dwVal = inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_spdif_in()
746 outl(dwVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_spdif_in()
763 bVal = inb(ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_set_spdif_out_rate()
767 outb(bVal, ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_set_spdif_out_rate()
768 outb(dwRate | 0x20, ALI_REG(codec, ALI_SPDIF_CS + 2)); in snd_ali_set_spdif_out_rate()
771 outb(bVal, ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_set_spdif_out_rate()
772 outw(rate | 0x10, ALI_REG(codec, ALI_SPDIF_CS + 2)); in snd_ali_set_spdif_out_rate()
796 bVal = inb(ALI_REG(codec, ALI_SCTRL)); in snd_ali_enable_spdif_out()
797 outb(bVal | ALI_SPDIF_OUT_ENABLE, ALI_REG(codec, ALI_SCTRL)); in snd_ali_enable_spdif_out()
799 bVal = inb(ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_enable_spdif_out()
800 outb(bVal & ALI_SPDIF_OUT_CH_STATUS, ALI_REG(codec, ALI_SPDIF_CTRL)); in snd_ali_enable_spdif_out()
802 wVal = inw(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_out()
804 outw(wVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_out()
812 wVal = inw(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_chnout()
814 outw(wVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_enable_spdif_chnout()
830 wVal = inw(ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_spdif_chnout()
832 outw(wVal, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_disable_spdif_chnout()
841 bVal = inb(ALI_REG(codec, ALI_SCTRL)); in snd_ali_disable_spdif_out()
842 outb(bVal & ~ALI_SPDIF_OUT_ENABLE, ALI_REG(codec, ALI_SCTRL)); in snd_ali_disable_spdif_out()
872 inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2)), in snd_ali_update_ptr()
873 (inl(ALI_REG(codec, ALI_CSPF)) & mask) == mask); in snd_ali_update_ptr()
891 outl(mask,ALI_REG(codec,pchregs->regs.aint)); in snd_ali_update_ptr()
905 audio_int = inl(ALI_REG(codec, ALI_MISCINT)); in snd_ali_card_interrupt()
912 pchregs->data.aint = inl(ALI_REG(codec, pchregs->regs.aint)); in snd_ali_card_interrupt()
917 ALI_REG(codec, ALI_MISCINT)); in snd_ali_card_interrupt()
1005 outb((unsigned char)(Channel & 0x001f), ALI_REG(codec, ALI_GC_CIR)); in snd_ali_write_voice_regs()
1016 outb(Channel, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_write_voice_regs()
1018 outl(ctlcmds[0], ALI_REG(codec, ALI_CSO_ALPHA_FMS)); in snd_ali_write_voice_regs()
1019 outl(ctlcmds[1], ALI_REG(codec, ALI_LBA)); in snd_ali_write_voice_regs()
1020 outl(ctlcmds[2], ALI_REG(codec, ALI_ESO_DELTA)); in snd_ali_write_voice_regs()
1021 outl(ctlcmds[3], ALI_REG(codec, ALI_GVSEL_PAN_VOC_CTRL_EC)); in snd_ali_write_voice_regs()
1023 outl(0x30000000, ALI_REG(codec, ALI_EBUF1)); /* Still Mode */ in snd_ali_write_voice_regs()
1024 outl(0x30000000, ALI_REG(codec, ALI_EBUF2)); /* Still Mode */ in snd_ali_write_voice_regs()
1133 outl(what, ALI_REG(codec, ALI_STOP)); in snd_ali_trigger()
1134 val = inl(ALI_REG(codec, ALI_AINTEN)); in snd_ali_trigger()
1139 outl(val, ALI_REG(codec, ALI_AINTEN)); in snd_ali_trigger()
1141 outl(what, ALI_REG(codec, ALI_START)); in snd_ali_trigger()
1239 (inl(ALI_REG(codec, ALI_GLOBAL_CONTROL)) & in snd_ali_playback_prepare()
1346 bValue = inb(ALI_REG(codec,ALI_SPDIF_CTRL)); in snd_ali_prepare()
1348 outb(bValue,ALI_REG(codec,ALI_SPDIF_CTRL)); in snd_ali_prepare()
1406 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_playback_pointer()
1407 cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2)); in snd_ali_playback_pointer()
1427 outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR)); in snd_ali_pointer()
1428 cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2)); in snd_ali_pointer()
1893 im->regs[ALI_MISCINT >> 2] = inl(ALI_REG(chip, ALI_MISCINT)); in ali_suspend()
1895 im->regs[ALI_STOP >> 2] = inl(ALI_REG(chip, ALI_STOP)); in ali_suspend()
1898 outl(0, ALI_REG(chip, ALI_MISCINT)); in ali_suspend()
1903 im->regs[i] = inl(ALI_REG(chip, i*4)); in ali_suspend()
1907 outb(i, ALI_REG(chip, ALI_GC_CIR)); in ali_suspend()
1909 im->channel_regs[i][j] = inl(ALI_REG(chip, j*4 + 0xe0)); in ali_suspend()
1913 outl(0xffffffff, ALI_REG(chip, ALI_STOP)); in ali_suspend()
1933 outb(i, ALI_REG(chip, ALI_GC_CIR)); in ali_resume()
1935 outl(im->channel_regs[i][j], ALI_REG(chip, j*4 + 0xe0)); in ali_resume()
1942 outl(im->regs[i], ALI_REG(chip, i*4)); in ali_resume()
1946 outl(im->regs[ALI_START >> 2], ALI_REG(chip, ALI_START)); in ali_resume()
1948 outl(im->regs[ALI_MISCINT >> 2], ALI_REG(chip, ALI_MISCINT)); in ali_resume()
2013 outl(0x80000001, ALI_REG(codec, ALI_GLOBAL_CONTROL)); in snd_ali_chip_init()
2014 outl(0x00000000, ALI_REG(codec, ALI_AINTEN)); in snd_ali_chip_init()
2015 outl(0xffffffff, ALI_REG(codec, ALI_AINT)); in snd_ali_chip_init()
2016 outl(0x00000000, ALI_REG(codec, ALI_VOLUME)); in snd_ali_chip_init()
2017 outb(0x10, ALI_REG(codec, ALI_MPUR2)); in snd_ali_chip_init()
2030 if (inl(ALI_REG(codec, ALI_SCTRL)) & ALI_SCTRL_CODEC2_READY) { in snd_ali_chip_init()
2032 outl(inl(ALI_REG(codec, ALI_SCTRL)) | in snd_ali_chip_init()
2035 ALI_REG(codec, ALI_SCTRL)); in snd_ali_chip_init()
2050 snd_iprintf(buf, "%02x: %08x\n", i, inl(ALI_REG(codec, i))); in snd_ali_proc_read()