#define ALS_PCI_ID0 0x40004005
#define ALS_PCI_POWERREG 0xe0
#define ALS_CONFIG_SPACE_BYTES 128
#define ALS_GCR_DATA 0x08
#define ALS_GCR_INDEX 0x0c
# define ALS_GCR_MISC 0x8c
# define ALS_GCR_TEST 0x90
# define ALS_GCR_DMA0_START 0x91
# define ALS_GCR_DMA0_MODE 0x92
# define ALS_GCR_DMA1_START 0x93
# define ALS_GCR_DMA1_MODE 0x94
# define ALS_GCR_DMA3_START 0x95
# define ALS_GCR_DMA3_MODE 0x96
# define ALS_GCR_DMA_EMULATION 0x99
# define ALS_GCR_FIFO0_CURRENT 0xa0
# define ALS_GCR_FIFO0_STATUS 0xa1
# define ALS_GCR_FIFO1_START 0xa2
# define ALS_GCR_FIFO1_COUNT 0xa3
# define ALS_GCR_FIFO1_CURRENT 0xa4
# define ALS_GCR_FIFO1_STATUS 0xa5
# define ALS_GCR_POWER 0xa6
# define ALS_GCR_PIC_ACCESS 0xa7
#define ALS_SB_MPU_IRQ 0x0e
#define ALS_MIXER_DATA 0x15
#define ALS_MIXER_INDEX 0x14
# define ALS_SB16_RESET 0x00
# define ALS_SB16_DMA_SETUP 0x81
# define ALS_CONTROL 0xc0
# define ALS_SB16_CONFIG ALS_CONTROL + 0x00
# define ALS_MISC_CONTROL ALS_CONTROL + 0x02
# define ALS_FIFO1_LENGTH_LO ALS_CONTROL + 0x1c
# define ALS_FIFO1_LENGTH_HI ALS_CONTROL + 0x1d
# define ALS_FIFO1_CONTROL ALS_CONTROL + 0x1e
# define ALS_FIFO1_STOP 0x00
# define ALS_FIFO1_RUN 0x80
# define ALS_FIFO1_PAUSE 0x40
# define ALS_FIFO1_STEREO 0x20
# define ALS_FIFO1_SIGNED 0x10
# define ALS_FIFO1_8BIT 0x04
#define ALS_ESP_RST 0x16
#define ALS_CR1E_ACK_PORT 0x16
#define ALS_ESP_RD_DATA 0x1a
#define ALS_ESP_WR_DATA 0x1c
#define ALS_ESP_WR_STATUS 0x1c
#define ALS_ESP_RD_STATUS8 0x1e
#define ALS_ESP_RD_STATUS16 0x1f
# define ALS_ESP_SAMPLE_RATE 0x41
#define ALS_MIDI_DATA 0x30
#define ALS_MIDI_STATUS 0x31
#define ALS_IRQ_STATUS8 0x01
#define ALS_IRQ_STATUS16 0x02
#define ALS_IRQ_MPUIN 0x04
#define ALS_IRQ_CR1E 0x20
#define ALS_RATE_LOCK_PLAYBACK 0x01
#define ALS_RATE_LOCK_CAPTURE 0x02
#define ALS_RATE_LOCK 0x03