linux/sound/pci/au88x0/au8820.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
    Aureal Vortex Soundcard driver.

    IO addr collected from asp4core.vxd:
    function    address
    0005D5A0    13004
    00080674    14004
    00080AFF    12818

 */

#define CHIP_AU8820

#define CARD_NAME
#define CARD_NAME_SHORT

/* Number of ADB and WT channels */
#define NR_ADB
#define NR_WT
#define NR_SRC
#define NR_A3D
#define NR_MIXIN
#define NR_MIXOUT


/* ADBDMA */
#define VORTEX_ADBDMA_STAT
#define POS_MASK
#define POS_SHIFT
#define ADB_SUBBUF_MASK
#define ADB_SUBBUF_SHIFT
#define VORTEX_ADBDMA_CTRL
#define OFFSET_MASK
#define OFFSET_SHIFT
#define IE_MASK
#define IE_SHIFT
#define DIR_MASK
#define DIR_SHIFT
#define FMT_MASK
#define FMT_SHIFT
// The masks and shift also work for the wtdma, if not specified otherwise.
#define VORTEX_ADBDMA_BUFCFG0
#define VORTEX_ADBDMA_BUFCFG1
#define VORTEX_ADBDMA_BUFBASE
#define VORTEX_ADBDMA_START
#define VORTEX_ADBDMA_STATUS

/* ADB */
#define VORTEX_ADB_SR
#define VORTEX_ADB_RTBASE
#define VORTEX_ADB_RTBASE_COUNT
#define VORTEX_ADB_CHNBASE
#define VORTEX_ADB_CHNBASE_COUNT
#define ROUTE_MASK
#define ADB_MASK
#define ADB_SHIFT
//#define     ADB_MIX_MASK 0xf
/* ADB address */
#define OFFSET_ADBDMA
#define OFFSET_SRCOUT
#define OFFSET_SRCIN
#define OFFSET_MIXOUT
#define OFFSET_MIXIN
#define OFFSET_CODECIN
#define OFFSET_CODECOUT
#define OFFSET_SPORTOUT
#define OFFSET_SPORTIN
#define OFFSET_EFXOUT
#define OFFSET_EFXIN
#define OFFSET_A3DOUT
#define OFFSET_A3DIN
#define OFFSET_WTOUT

/* ADB route translate helper */
#define ADB_DMA(x)
#define ADB_SRCOUT(x)
#define ADB_SRCIN(x)
#define ADB_MIXOUT(x)
#define ADB_MIXIN(x)
#define ADB_CODECIN(x)
#define ADB_CODECOUT(x)
#define ADB_SPORTOUT(x)
#define ADB_SPORTIN(x)
#define ADB_A3DOUT(x)
#define ADB_A3DIN(x)
#define ADB_WTOUT(x,y)

/* WTDMA */
#define VORTEX_WTDMA_CTRL
#define VORTEX_WTDMA_STAT
#define WT_SUBBUF_MASK
#define WT_SUBBUF_SHIFT
#define VORTEX_WTDMA_BUFBASE
#define VORTEX_WTDMA_BUFCFG0
#define VORTEX_WTDMA_BUFCFG1
#define VORTEX_WTDMA_START

#define VORTEX_WT_BASE

/* MIXER */
#define VORTEX_MIXER_SR
#define VORTEX_MIXER_CLIP
#define VORTEX_MIXER_CHNBASE
#define VORTEX_MIXER_RTBASE
#define MIXER_RTBASE_SIZE
#define VORTEX_MIX_ENIN
#define VORTEX_MIX_SMP

/* MIX */
#define VORTEX_MIX_INVOL_A
#define VORTEX_MIX_INVOL_B
#define VORTEX_MIX_VOL_A
#define VORTEX_MIX_VOL_B

#define VOL_MIN
#define VOL_MAX

//#define MIX_OUTL    0xe
//#define MIX_OUTR    0xf
//#define MIX_INL     0xe
//#define MIX_INR     0xf
#define MIX_DEFIGAIN
#define MIX_DEFOGAIN

/* SRC */
#define VORTEX_SRCBLOCK_SR
#define VORTEX_SRC_CHNBASE
#define VORTEX_SRC_RTBASE
#define VORTEX_SRC_SOURCE
#define VORTEX_SRC_SOURCESIZE
#define VORTEX_SRC_U0
#define VORTEX_SRC_DRIFT0
#define VORTEX_SRC_DRIFT1
#define VORTEX_SRC_U1
#define VORTEX_SRC_DRIFT2
#define VORTEX_SRC_U2
#define VORTEX_SRC_DATA
#define VORTEX_SRC_DATA0
#define VORTEX_SRC_CONVRATIO
//#define     SRC_RATIO(x) ((((x<<15)/48000) + 1)/2) /* Playback */
//#define     SRC_RATIO2(x) ((((48000<<15)/x) + 1)/2) /* Recording */

/* FIFO */
#define VORTEX_FIFO_ADBCTRL
#define VORTEX_FIFO_WTCTRL
#define FIFO_RDONLY
#define FIFO_CTRL
#define FIFO_VALID
#define FIFO_EMPTY
#define FIFO_U0
#define FIFO_U1
#define FIFO_SIZE_BITS
#define FIFO_SIZE
#define FIFO_MASK
#define VORTEX_FIFO_ADBDATA
#define VORTEX_FIFO_WTDATA

/* CODEC */
#define VORTEX_CODEC_CTRL
#define VORTEX_CODEC_EN
#define EN_CODEC
#define EN_SPORT
#define EN_SPDIF
#define VORTEX_CODEC_CHN
#define VORTEX_CODEC_IO

#define VORTEX_SPDIF_FLAGS
#define VORTEX_SPDIF_CFG0
#define VORTEX_SPDIF_CFG1
#define VORTEX_SPDIF_SMPRATE

/* Sample timer */
#define VORTEX_SMP_TIME

/* IRQ */
#define VORTEX_IRQ_SOURCE
#define VORTEX_IRQ_CTRL

#define VORTEX_STAT

#define VORTEX_CTRL
#define CTRL_MIDI_EN
#define CTRL_MIDI_PORT
#define CTRL_GAME_EN
#define CTRL_GAME_PORT
#define CTRL_IRQ_ENABLE

/* write: Timer period config / read: TIMER IRQ ack. */
#define VORTEX_IRQ_STAT

/* DMA */
#define VORTEX_DMA_BUFFER
#define VORTEX_ENGINE_CTRL
#define ENGINE_INIT

		     /* MIDI *//* GAME. */
#define VORTEX_MIDI_DATA
#define VORTEX_MIDI_CMD
#define VORTEX_GAME_LEGACY
#define VORTEX_CTRL2
#define CTRL2_GAME_ADCMODE
#define VORTEX_GAME_AXIS
#define AXIS_SIZE
#define AXIS_RANGE