linux/include/sound/ac97/regs.h

/* SPDX-License-Identifier: GPL-2.0+
 *
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *  Universal interface for Audio Codec '97
 *
 *  For more details look to AC '97 component specification revision 2.1
 *  by Intel Corporation (http://developer.intel.com).
 */
/*
 *  AC'97 codec registers
 */

#define AC97_RESET
#define AC97_MASTER
#define AC97_HEADPHONE
#define AC97_MASTER_MONO
#define AC97_MASTER_TONE
#define AC97_PC_BEEP
#define AC97_PHONE
#define AC97_MIC
#define AC97_LINE
#define AC97_CD
#define AC97_VIDEO
#define AC97_AUX
#define AC97_PCM
#define AC97_REC_SEL
#define AC97_REC_GAIN
#define AC97_REC_GAIN_MIC
#define AC97_GENERAL_PURPOSE
#define AC97_3D_CONTROL
#define AC97_INT_PAGING
#define AC97_POWERDOWN
/* range 0x28-0x3a - AUDIO AC'97 2.0 extensions */
#define AC97_EXTENDED_ID
#define AC97_EXTENDED_STATUS
#define AC97_PCM_FRONT_DAC_RATE
#define AC97_PCM_SURR_DAC_RATE
#define AC97_PCM_LFE_DAC_RATE
#define AC97_PCM_LR_ADC_RATE
#define AC97_PCM_MIC_ADC_RATE
#define AC97_CENTER_LFE_MASTER
#define AC97_SURROUND_MASTER
#define AC97_SPDIF
/* range 0x3c-0x58 - MODEM */
#define AC97_EXTENDED_MID
#define AC97_EXTENDED_MSTATUS
#define AC97_LINE1_RATE
#define AC97_LINE2_RATE
#define AC97_HANDSET_RATE
#define AC97_LINE1_LEVEL
#define AC97_LINE2_LEVEL
#define AC97_HANDSET_LEVEL
#define AC97_GPIO_CFG
#define AC97_GPIO_POLARITY
#define AC97_GPIO_STICKY
#define AC97_GPIO_WAKEUP
#define AC97_GPIO_STATUS
#define AC97_MISC_AFE
/* range 0x5a-0x7b - Vendor Specific */
#define AC97_VENDOR_ID1
#define AC97_VENDOR_ID2
/* range 0x60-0x6f (page 1) - extended codec registers */
#define AC97_CODEC_CLASS_REV
#define AC97_PCI_SVID
#define AC97_PCI_SID
#define AC97_FUNC_SELECT
#define AC97_FUNC_INFO
#define AC97_SENSE_INFO

/* volume controls */
#define AC97_MUTE_MASK_MONO
#define AC97_MUTE_MASK_STEREO

/* slot allocation */
#define AC97_SLOT_TAG
#define AC97_SLOT_CMD_ADDR
#define AC97_SLOT_CMD_DATA
#define AC97_SLOT_PCM_LEFT
#define AC97_SLOT_PCM_RIGHT
#define AC97_SLOT_MODEM_LINE1
#define AC97_SLOT_PCM_CENTER
#define AC97_SLOT_MIC
#define AC97_SLOT_SPDIF_LEFT1
#define AC97_SLOT_PCM_SLEFT
#define AC97_SLOT_PCM_LEFT_0
#define AC97_SLOT_SPDIF_LEFT
#define AC97_SLOT_PCM_SRIGHT
#define AC97_SLOT_PCM_RIGHT_0
#define AC97_SLOT_SPDIF_RIGHT
#define AC97_SLOT_LFE
#define AC97_SLOT_SPDIF_RIGHT1
#define AC97_SLOT_MODEM_LINE2
#define AC97_SLOT_PCM_LEFT_1
#define AC97_SLOT_SPDIF_LEFT2
#define AC97_SLOT_HANDSET
#define AC97_SLOT_PCM_RIGHT_1
#define AC97_SLOT_SPDIF_RIGHT2
#define AC97_SLOT_MODEM_GPIO
#define AC97_SLOT_PCM_CENTER_1

/* basic capabilities (reset register) */
#define AC97_BC_DEDICATED_MIC
#define AC97_BC_RESERVED1
#define AC97_BC_BASS_TREBLE
#define AC97_BC_SIM_STEREO
#define AC97_BC_HEADPHONE
#define AC97_BC_LOUDNESS
#define AC97_BC_16BIT_DAC
#define AC97_BC_18BIT_DAC
#define AC97_BC_20BIT_DAC
#define AC97_BC_DAC_MASK
#define AC97_BC_16BIT_ADC
#define AC97_BC_18BIT_ADC
#define AC97_BC_20BIT_ADC
#define AC97_BC_ADC_MASK
#define AC97_BC_3D_TECH_ID_MASK

/* general purpose */
#define AC97_GP_DRSS_MASK
#define AC97_GP_DRSS_1011
#define AC97_GP_DRSS_78

/* powerdown bits */
#define AC97_PD_ADC_STATUS
#define AC97_PD_DAC_STATUS
#define AC97_PD_MIXER_STATUS
#define AC97_PD_VREF_STATUS
#define AC97_PD_PR0
#define AC97_PD_PR1
#define AC97_PD_PR2
#define AC97_PD_PR3
#define AC97_PD_PR4
#define AC97_PD_PR5
#define AC97_PD_PR6
#define AC97_PD_EAPD

/* extended audio ID bit defines */
#define AC97_EI_VRA
#define AC97_EI_DRA
#define AC97_EI_SPDIF
#define AC97_EI_VRM
#define AC97_EI_DACS_SLOT_MASK
#define AC97_EI_DACS_SLOT_SHIFT
#define AC97_EI_CDAC
#define AC97_EI_SDAC
#define AC97_EI_LDAC
#define AC97_EI_AMAP
#define AC97_EI_REV_MASK
#define AC97_EI_REV_22
#define AC97_EI_REV_23
#define AC97_EI_REV_SHIFT
#define AC97_EI_ADDR_MASK
#define AC97_EI_ADDR_SHIFT

/* extended audio status and control bit defines */
#define AC97_EA_VRA
#define AC97_EA_DRA
#define AC97_EA_SPDIF
#define AC97_EA_VRM
#define AC97_EA_SPSA_SLOT_MASK
#define AC97_EA_SPSA_SLOT_SHIFT
#define AC97_EA_SPSA_3_4
#define AC97_EA_SPSA_7_8
#define AC97_EA_SPSA_6_9
#define AC97_EA_SPSA_10_11
#define AC97_EA_CDAC
#define AC97_EA_SDAC
#define AC97_EA_LDAC
#define AC97_EA_MDAC
#define AC97_EA_SPCV
#define AC97_EA_PRI
#define AC97_EA_PRJ
#define AC97_EA_PRK
#define AC97_EA_PRL

/* S/PDIF control bit defines */
#define AC97_SC_PRO
#define AC97_SC_NAUDIO
#define AC97_SC_COPY
#define AC97_SC_PRE
#define AC97_SC_CC_MASK
#define AC97_SC_CC_SHIFT
#define AC97_SC_L
#define AC97_SC_SPSR_MASK
#define AC97_SC_SPSR_SHIFT
#define AC97_SC_SPSR_44K
#define AC97_SC_SPSR_48K
#define AC97_SC_SPSR_32K
#define AC97_SC_DRS
#define AC97_SC_V

/* Interrupt and Paging bit defines (AC'97 2.3) */
#define AC97_PAGE_MASK
#define AC97_PAGE_VENDOR
#define AC97_PAGE_1
#define AC97_INT_ENABLE
#define AC97_INT_SENSE
#define AC97_INT_CAUSE_SENSE
#define AC97_INT_CAUSE_GPIO
#define AC97_INT_STATUS

/* extended modem ID bit defines */
#define AC97_MEI_LINE1
#define AC97_MEI_LINE2
#define AC97_MEI_HANDSET
#define AC97_MEI_CID1
#define AC97_MEI_CID2
#define AC97_MEI_ADDR_MASK
#define AC97_MEI_ADDR_SHIFT

/* extended modem status and control bit defines */
#define AC97_MEA_GPIO
#define AC97_MEA_MREF
#define AC97_MEA_ADC1
#define AC97_MEA_DAC1
#define AC97_MEA_ADC2
#define AC97_MEA_DAC2
#define AC97_MEA_HADC
#define AC97_MEA_HDAC
#define AC97_MEA_PRA
#define AC97_MEA_PRB
#define AC97_MEA_PRC
#define AC97_MEA_PRD
#define AC97_MEA_PRE
#define AC97_MEA_PRF
#define AC97_MEA_PRG
#define AC97_MEA_PRH

/* modem gpio status defines */
#define AC97_GPIO_LINE1_OH
#define AC97_GPIO_LINE1_RI
#define AC97_GPIO_LINE1_CID
#define AC97_GPIO_LINE1_LCS
#define AC97_GPIO_LINE1_PULSE
#define AC97_GPIO_LINE1_HL1R
#define AC97_GPIO_LINE1_HOHD
#define AC97_GPIO_LINE12_AC
#define AC97_GPIO_LINE12_DC
#define AC97_GPIO_LINE12_RS
#define AC97_GPIO_LINE2_OH
#define AC97_GPIO_LINE2_RI
#define AC97_GPIO_LINE2_CID
#define AC97_GPIO_LINE2_LCS
#define AC97_GPIO_LINE2_PULSE
#define AC97_GPIO_LINE2_HL1R