require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&SYS_DEV_PCI_ENVYREG_H)) {
    eval 'sub SYS_DEV_PCI_ENVYREG_H () {1;}' unless defined(&SYS_DEV_PCI_ENVYREG_H);
    eval 'sub ENVY_CTL_BAR () {0x10;}' unless defined(&ENVY_CTL_BAR);
    eval 'sub ENVY_MT_BAR {
        my($isht) = @_;
	    eval q((($isht) ? 0x14 : 0x1c));
    }' unless defined(&ENVY_MT_BAR);
    eval 'sub ENVY_CONF () {0x60;}' unless defined(&ENVY_CONF);
    eval 'sub ENVY_CTL () {0x;}' unless defined(&ENVY_CTL);
    eval 'sub ENVY_CTL_RESET () {0x80;}' unless defined(&ENVY_CTL_RESET);
    eval 'sub ENVY_CTL_NATIVE () {0x1;}' unless defined(&ENVY_CTL_NATIVE);
    eval 'sub ENVY_CCS_INTMASK () {0x1;}' unless defined(&ENVY_CCS_INTMASK);
    eval 'sub ENVY_CCS_INT_MT () {0x10;}' unless defined(&ENVY_CCS_INT_MT);
    eval 'sub ENVY_CCS_INT_MIDI1 () {0x80;}' unless defined(&ENVY_CCS_INT_MIDI1);
    eval 'sub ENVY_CCS_INT_TMR () {0x80;}' unless defined(&ENVY_CCS_INT_TMR);
    eval 'sub ENVY_CCS_INT_MIDI0 () {0x80;}' unless defined(&ENVY_CCS_INT_MIDI0);
    eval 'sub ENVY_CCS_INTSTAT () {0x2;}' unless defined(&ENVY_CCS_INTSTAT);
    eval 'sub ENVY_CCS_CONF () {0x4;}' unless defined(&ENVY_CCS_CONF);
    eval 'sub ENVY_CCS_ACLINK () {0x5;}' unless defined(&ENVY_CCS_ACLINK);
    eval 'sub ENVY_CCS_I2S () {0x6;}' unless defined(&ENVY_CCS_I2S);
    eval 'sub ENVY_CCS_SPDIF () {0x7;}' unless defined(&ENVY_CCS_SPDIF);
    eval 'sub ENVY_CCS_GPIODATA0 () {0x14;}' unless defined(&ENVY_CCS_GPIODATA0);
    eval 'sub ENVY_CCS_GPIODATA1 () {0x15;}' unless defined(&ENVY_CCS_GPIODATA1);
    eval 'sub ENVY_CCS_GPIODATA2 () {0x1e;}' unless defined(&ENVY_CCS_GPIODATA2);
    eval 'sub ENVY_CCS_GPIOMASK0 () {0x16;}' unless defined(&ENVY_CCS_GPIOMASK0);
    eval 'sub ENVY_CCS_GPIOMASK1 () {0x17;}' unless defined(&ENVY_CCS_GPIOMASK1);
    eval 'sub ENVY_CCS_GPIOMASK2 () {0x1f;}' unless defined(&ENVY_CCS_GPIOMASK2);
    eval 'sub ENVY_CCS_GPIODIR0 () {0x18;}' unless defined(&ENVY_CCS_GPIODIR0);
    eval 'sub ENVY_CCS_GPIODIR1 () {0x19;}' unless defined(&ENVY_CCS_GPIODIR1);
    eval 'sub ENVY_CCS_GPIODIR2 () {0x1a;}' unless defined(&ENVY_CCS_GPIODIR2);
    eval 'sub ENVY_CCI_INDEX () {0x3;}' unless defined(&ENVY_CCI_INDEX);
    eval 'sub ENVY_CCI_DATA () {0x4;}' unless defined(&ENVY_CCI_DATA);
    eval 'sub ENVY_I2C_DEV () {0x10;}' unless defined(&ENVY_I2C_DEV);
    eval 'sub ENVY_I2C_DEV_SHIFT () {0x1;}' unless defined(&ENVY_I2C_DEV_SHIFT);
    eval 'sub ENVY_I2C_DEV_WRITE () {0x1;}' unless defined(&ENVY_I2C_DEV_WRITE);
    eval 'sub ENVY_I2C_DEV_EEPROM () {0x50;}' unless defined(&ENVY_I2C_DEV_EEPROM);
    eval 'sub ENVY_I2C_ADDR () {0x11;}' unless defined(&ENVY_I2C_ADDR);
    eval 'sub ENVY_I2C_DATA () {0x12;}' unless defined(&ENVY_I2C_DATA);
    eval 'sub ENVY_I2C_CTL () {0x13;}' unless defined(&ENVY_I2C_CTL);
    eval 'sub ENVY_I2C_CTL_BUSY () {0x1;}' unless defined(&ENVY_I2C_CTL_BUSY);
    eval 'sub ENVY_CCI_GPIODATA () {0x20;}' unless defined(&ENVY_CCI_GPIODATA);
    eval 'sub ENVY_CCI_GPIOMASK () {0x21;}' unless defined(&ENVY_CCI_GPIOMASK);
    eval 'sub ENVY_CCI_GPIODIR () {0x22;}' unless defined(&ENVY_CCI_GPIODIR);
    eval 'sub ENVY_GPIO_CLK () {0x2;}' unless defined(&ENVY_GPIO_CLK);
    eval 'sub ENVY_GPIO_DOUT () {0x8;}' unless defined(&ENVY_GPIO_DOUT);
    eval 'sub ENVY_GPIO_CSMASK () {0x70;}' unless defined(&ENVY_GPIO_CSMASK);
    eval 'sub ENVY_GPIO_CS {
        my($dev) = @_;
	    eval q((($dev) << 4));
    }' unless defined(&ENVY_GPIO_CS);
    eval 'sub ENVY_EEPROM_CONF () {6;}' unless defined(&ENVY_EEPROM_CONF);
    eval 'sub ENVY_EEPROM_ACLINK () {7;}' unless defined(&ENVY_EEPROM_ACLINK);
    eval 'sub ENVY_EEPROM_I2S () {8;}' unless defined(&ENVY_EEPROM_I2S);
    eval 'sub ENVY_EEPROM_SPDIF () {9;}' unless defined(&ENVY_EEPROM_SPDIF);
    eval 'sub ENVY_EEPROM_GPIOMASK {
        my($s) = @_;
	    eval q((($s)-> &isht ? 13: 10));
    }' unless defined(&ENVY_EEPROM_GPIOMASK);
    eval 'sub ENVY_EEPROM_GPIOST {
        my($s) = @_;
	    eval q((($s)-> &isht ? 16: 11));
    }' unless defined(&ENVY_EEPROM_GPIOST);
    eval 'sub ENVY_EEPROM_GPIODIR {
        my($s) = @_;
	    eval q((($s)-> &isht ? 10: 12));
    }' unless defined(&ENVY_EEPROM_GPIODIR);
    eval 'sub ENVY_MT_INTR () {0;}' unless defined(&ENVY_MT_INTR);
    eval 'sub ENVY_MT_INTR_PACK () {0x1;}' unless defined(&ENVY_MT_INTR_PACK);
    eval 'sub ENVY_MT_INTR_RACK () {0x2;}' unless defined(&ENVY_MT_INTR_RACK);
    eval 'sub ENVY_MT_INTR_ERR () {0x8;}' unless defined(&ENVY_MT_INTR_ERR);
    eval 'sub ENVY_MT_INTR_PMASK () {0x40;}' unless defined(&ENVY_MT_INTR_PMASK);
    eval 'sub ENVY_MT_INTR_RMASK () {0x80;}' unless defined(&ENVY_MT_INTR_RMASK);
    eval 'sub ENVY_MT_RATE () {1;}' unless defined(&ENVY_MT_RATE);
    eval 'sub ENVY_MT_RATEMASK () {0xf;}' unless defined(&ENVY_MT_RATEMASK);
    eval 'sub ENVY_MT_IMASK () {3;}' unless defined(&ENVY_MT_IMASK);
    eval 'sub ENVY_MT_IMASK_PDMA0 () {0x1;}' unless defined(&ENVY_MT_IMASK_PDMA0);
    eval 'sub ENVY_MT_IMASK_RDMA0 () {0x2;}' unless defined(&ENVY_MT_IMASK_RDMA0);
    eval 'sub ENVY_MT_IMASK_ERR () {0x8;}' unless defined(&ENVY_MT_IMASK_ERR);
    eval 'sub ENVY_MT_AC97_IDX () {4;}' unless defined(&ENVY_MT_AC97_IDX);
    eval 'sub ENVY_MT_AC97_CMD () {5;}' unless defined(&ENVY_MT_AC97_CMD);
    eval 'sub ENVY_MT_AC97_READY () {0x8;}' unless defined(&ENVY_MT_AC97_READY);
    eval 'sub ENVY_MT_AC97_CMD_MASK () {0x30;}' unless defined(&ENVY_MT_AC97_CMD_MASK);
    eval 'sub ENVY_MT_AC97_CMD_RD () {0x10;}' unless defined(&ENVY_MT_AC97_CMD_RD);
    eval 'sub ENVY_MT_AC97_CMD_WR () {0x20;}' unless defined(&ENVY_MT_AC97_CMD_WR);
    eval 'sub ENVY_MT_AC97_CMD_RST () {0x80;}' unless defined(&ENVY_MT_AC97_CMD_RST);
    eval 'sub ENVY_MT_AC97_DATA () {6;}' unless defined(&ENVY_MT_AC97_DATA);
    eval 'sub ENVY_MT_PADDR () {0x10;}' unless defined(&ENVY_MT_PADDR);
    eval 'sub ENVY_MT_PBUFSZ () {0x14;}' unless defined(&ENVY_MT_PBUFSZ);
    eval 'sub ENVY_MT_PBLKSZ {
        my($s) = @_;
	    eval q((($s)-> &isht ? 0x1c : 0x16));
    }' unless defined(&ENVY_MT_PBLKSZ);
    eval 'sub ENVY_MT_CTL () {0x18;}' unless defined(&ENVY_MT_CTL);
    eval 'sub ENVY_MT_CTL_PSTART () {0x1;}' unless defined(&ENVY_MT_CTL_PSTART);
    eval 'sub ENVY_MT_CTL_RSTART {
        my($s) = @_;
	    eval q((($s)-> &isht ? 0x2 : 0x4));
    }' unless defined(&ENVY_MT_CTL_RSTART);
    eval 'sub ENVY_MT_NSTREAM () {0x19;}' unless defined(&ENVY_MT_NSTREAM);
    eval 'sub ENVY_MT_ERR () {0x1a;}' unless defined(&ENVY_MT_ERR);
    eval 'sub ENVY_MT_RADDR () {0x20;}' unless defined(&ENVY_MT_RADDR);
    eval 'sub ENVY_MT_RBUFSZ () {0x24;}' unless defined(&ENVY_MT_RBUFSZ);
    eval 'sub ENVY_MT_RBLKSZ () {0x26;}' unless defined(&ENVY_MT_RBLKSZ);
    eval 'sub ENVY_MT_MONDATA () {0x38;}' unless defined(&ENVY_MT_MONDATA);
    eval 'sub ENVY_MT_MONVAL_BITS () {7;}' unless defined(&ENVY_MT_MONVAL_BITS);
    eval 'sub ENVY_MT_MONVAL_MASK () {((1<<  &ENVY_MT_MONVAL_BITS) - 1);}' unless defined(&ENVY_MT_MONVAL_MASK);
    eval 'sub ENVY_MT_MONIDX () {0x3a;}' unless defined(&ENVY_MT_MONIDX);
    eval 'sub ENVY_MT_OUTSRC () {0x30;}' unless defined(&ENVY_MT_OUTSRC);
    eval 'sub ENVY_MT_OUTSRC_DMA () {0x;}' unless defined(&ENVY_MT_OUTSRC_DMA);
    eval 'sub ENVY_MT_OUTSRC_MON () {0x1;}' unless defined(&ENVY_MT_OUTSRC_MON);
    eval 'sub ENVY_MT_OUTSRC_LINE () {0x2;}' unless defined(&ENVY_MT_OUTSRC_LINE);
    eval 'sub ENVY_MT_OUTSRC_SPD () {0x3;}' unless defined(&ENVY_MT_OUTSRC_SPD);
    eval 'sub ENVY_MT_OUTSRC_MASK () {0x3;}' unless defined(&ENVY_MT_OUTSRC_MASK);
    eval 'sub ENVY_MT_SPDROUTE () {0x32;}' unless defined(&ENVY_MT_SPDROUTE);
    eval 'sub ENVY_MT_SPDSRC_DMA () {0x;}' unless defined(&ENVY_MT_SPDSRC_DMA);
    eval 'sub ENVY_MT_SPDSRC_MON () {0x1;}' unless defined(&ENVY_MT_SPDSRC_MON);
    eval 'sub ENVY_MT_SPDSRC_LINE () {0x2;}' unless defined(&ENVY_MT_SPDSRC_LINE);
    eval 'sub ENVY_MT_SPDSRC_SPD () {0x3;}' unless defined(&ENVY_MT_SPDSRC_SPD);
    eval 'sub ENVY_MT_SPDSRC_BITS () {0x2;}' unless defined(&ENVY_MT_SPDSRC_BITS);
    eval 'sub ENVY_MT_SPDSRC_MASK () {((1<<  &ENVY_MT_SPDSRC_BITS) - 1);}' unless defined(&ENVY_MT_SPDSRC_MASK);
    eval 'sub ENVY_MT_SPDSEL_BITS () {0x4;}' unless defined(&ENVY_MT_SPDSEL_BITS);
    eval 'sub ENVY_MT_SPDSEL_MASK () {((1<<  &ENVY_MT_SPDSEL_BITS) - 1);}' unless defined(&ENVY_MT_SPDSEL_MASK);
    eval 'sub ENVY_MT_INSEL () {0x34;}' unless defined(&ENVY_MT_INSEL);
    eval 'sub ENVY_MT_INSEL_BITS () {0x4;}' unless defined(&ENVY_MT_INSEL_BITS);
    eval 'sub ENVY_MT_INSEL_MASK () {((1<<  &ENVY_MT_INSEL_BITS) - 1);}' unless defined(&ENVY_MT_INSEL_MASK);
    eval 'sub ENVY_MT_HTSRC () {0x2c;}' unless defined(&ENVY_MT_HTSRC);
    eval 'sub ENVY_MT_HTSRC_DMA () {0x;}' unless defined(&ENVY_MT_HTSRC_DMA);
    eval 'sub ENVY_MT_HTSRC_LINE () {0x2;}' unless defined(&ENVY_MT_HTSRC_LINE);
    eval 'sub ENVY_MT_HTSRC_SPD () {0x4;}' unless defined(&ENVY_MT_HTSRC_SPD);
    eval 'sub ENVY_MT_HTSRC_MASK () {0x7;}' unless defined(&ENVY_MT_HTSRC_MASK);
    eval 'sub AK4524_PWR () {0x;}' unless defined(&AK4524_PWR);
    eval 'sub AK4524_PWR_DA () {0x1;}' unless defined(&AK4524_PWR_DA);
    eval 'sub AK4524_PWR_AD () {0x2;}' unless defined(&AK4524_PWR_AD);
    eval 'sub AK4524_PWR_VREF () {0x4;}' unless defined(&AK4524_PWR_VREF);
    eval 'sub AK4524_RST () {0x1;}' unless defined(&AK4524_RST);
    eval 'sub AK4524_RST_DA () {0x1;}' unless defined(&AK4524_RST_DA);
    eval 'sub AK4524_RST_AD () {0x2;}' unless defined(&AK4524_RST_AD);
    eval 'sub AK4524_FMT () {0x2;}' unless defined(&AK4524_FMT);
    eval 'sub AK4524_FMT_NORM () {0;}' unless defined(&AK4524_FMT_NORM);
    eval 'sub AK4524_FMT_DBL () {0x1;}' unless defined(&AK4524_FMT_DBL);
    eval 'sub AK4524_FMT_QUA () {0x2;}' unless defined(&AK4524_FMT_QUA);
    eval 'sub AK4524_FMT_QAUDFILT () {0x4;}' unless defined(&AK4524_FMT_QAUDFILT);
    eval 'sub AK4524_FMT_256 () {0;}' unless defined(&AK4524_FMT_256);
    eval 'sub AK4524_FMT_512 () {0x4;}' unless defined(&AK4524_FMT_512);
    eval 'sub AK4524_FMT_1024 () {0x8;}' unless defined(&AK4524_FMT_1024);
    eval 'sub AK4524_FMT_384 () {0x10;}' unless defined(&AK4524_FMT_384);
    eval 'sub AK4524_FMT_768 () {0x14;}' unless defined(&AK4524_FMT_768);
    eval 'sub AK4524_FMT_LSB16 () {0;}' unless defined(&AK4524_FMT_LSB16);
    eval 'sub AK4524_FMT_LSB20 () {0x20;}' unless defined(&AK4524_FMT_LSB20);
    eval 'sub AK4524_FMT_MSB24 () {0x40;}' unless defined(&AK4524_FMT_MSB24);
    eval 'sub AK4524_FMT_IIS24 () {0x60;}' unless defined(&AK4524_FMT_IIS24);
    eval 'sub AK4524_FMT_LSB24 () {0x80;}' unless defined(&AK4524_FMT_LSB24);
    eval 'sub AK4524_DEEMVOL () {0x3;}' unless defined(&AK4524_DEEMVOL);
    eval 'sub AK4524_DEEM_44K1 () {0x;}' unless defined(&AK4524_DEEM_44K1);
    eval 'sub AK4524_DEEM_OFF () {0x1;}' unless defined(&AK4524_DEEM_OFF);
    eval 'sub AK4524_DEEM_48K () {0x2;}' unless defined(&AK4524_DEEM_48K);
    eval 'sub AK4524_DEEM_32K () {0x3;}' unless defined(&AK4524_DEEM_32K);
    eval 'sub AK4524_MUTE () {0x80;}' unless defined(&AK4524_MUTE);
    eval 'sub AK4524_ADC_GAIN0 () {0x4;}' unless defined(&AK4524_ADC_GAIN0);
    eval 'sub AK4524_ADC_GAIN1 () {0x5;}' unless defined(&AK4524_ADC_GAIN1);
    eval 'sub AK4524_DAC_GAIN0 () {0x6;}' unless defined(&AK4524_DAC_GAIN0);
    eval 'sub AK4524_DAC_GAIN1 () {0x7;}' unless defined(&AK4524_DAC_GAIN1);
    eval 'sub AK4358_ATT {
        my($chan) = @_;
	    eval q((($chan) <= 5? 0x4 + ($chan) : 0xb - 6+ ($chan)));
    }' unless defined(&AK4358_ATT);
    eval 'sub AK4358_ATT_EN () {0x80;}' unless defined(&AK4358_ATT_EN);
    eval 'sub AK5365_RST () {0x;}' unless defined(&AK5365_RST);
    eval 'sub AK5365_RST_NORM () {0x1;}' unless defined(&AK5365_RST_NORM);
    eval 'sub AK5365_SRC () {0x1;}' unless defined(&AK5365_SRC);
    eval 'sub AK5365_SRC_MASK () {0x7;}' unless defined(&AK5365_SRC_MASK);
    eval 'sub AK5365_CTRL () {0x2;}' unless defined(&AK5365_CTRL);
    eval 'sub AK5365_CTRL_MUTE () {0x1;}' unless defined(&AK5365_CTRL_MUTE);
    eval 'sub AK5365_CTRL_I2S () {0x8;}' unless defined(&AK5365_CTRL_I2S);
    eval 'sub AK5365_ATT {
        my($chan) = @_;
	    eval q((0x4 + ($chan)));
    }' unless defined(&AK5365_ATT);
    eval 'sub ENVY_RCHANS () {12;}' unless defined(&ENVY_RCHANS);
    eval 'sub ENVY_PCHANS () {10;}' unless defined(&ENVY_PCHANS);
    eval 'sub ENVY_RFRAME_SIZE () {(4*  &ENVY_RCHANS);}' unless defined(&ENVY_RFRAME_SIZE);
    eval 'sub ENVY_PFRAME_SIZE () {(4*  &ENVY_PCHANS);}' unless defined(&ENVY_PFRAME_SIZE);
}
1;
