linux/include/sound/cs4231-regs.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_CS4231_REGS_H
#define __SOUND_CS4231_REGS_H

/*
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *  Definitions for CS4231 & InterWave chips & compatible chips registers
 */

/* IO ports */

#define CS4231P(x)

#define c_d_c_CS4231REGSEL
#define c_d_c_CS4231REG
#define c_d_c_CS4231STATUS
#define c_d_c_CS4231PIO

/* codec registers */

#define CS4231_LEFT_INPUT
#define CS4231_RIGHT_INPUT
#define CS4231_AUX1_LEFT_INPUT
#define CS4231_AUX1_RIGHT_INPUT
#define CS4231_AUX2_LEFT_INPUT
#define CS4231_AUX2_RIGHT_INPUT
#define CS4231_LEFT_OUTPUT
#define CS4231_RIGHT_OUTPUT
#define CS4231_PLAYBK_FORMAT
#define CS4231_IFACE_CTRL
#define CS4231_PIN_CTRL
#define CS4231_TEST_INIT
#define CS4231_MISC_INFO
#define CS4231_LOOPBACK
#define CS4231_PLY_UPR_CNT
#define CS4231_PLY_LWR_CNT
#define CS4231_ALT_FEATURE_1
#define AD1845_AF1_MIC_LEFT
#define CS4231_ALT_FEATURE_2
#define AD1845_AF2_MIC_RIGHT
#define CS4231_LEFT_LINE_IN
#define CS4231_RIGHT_LINE_IN
#define CS4231_TIMER_LOW
#define CS4231_TIMER_HIGH
#define CS4231_LEFT_MIC_INPUT
#define AD1845_UPR_FREQ_SEL
#define CS4231_RIGHT_MIC_INPUT
#define AD1845_LWR_FREQ_SEL
#define CS4236_EXT_REG
#define CS4231_IRQ_STATUS
#define CS4231_LINE_LEFT_OUTPUT
#define CS4231_VERSION
#define CS4231_MONO_CTRL
#define CS4231_LINE_RIGHT_OUTPUT
#define AD1845_PWR_DOWN
#define CS4235_LEFT_MASTER
#define CS4231_REC_FORMAT
#define AD1845_CLOCK
#define CS4235_RIGHT_MASTER
#define CS4231_REC_UPR_CNT
#define CS4231_REC_LWR_CNT

/* definitions for codec register select port - CODECP( REGSEL ) */

#define CS4231_INIT
#define CS4231_MCE
#define CS4231_TRD

/* definitions for codec status register - CODECP( STATUS ) */

#define CS4231_GLOBALIRQ

/* definitions for codec irq status */

#define CS4231_PLAYBACK_IRQ
#define CS4231_RECORD_IRQ
#define CS4231_TIMER_IRQ
#define CS4231_ALL_IRQS
#define CS4231_REC_UNDERRUN
#define CS4231_REC_OVERRUN
#define CS4231_PLY_OVERRUN
#define CS4231_PLY_UNDERRUN

/* definitions for CS4231_LEFT_INPUT and CS4231_RIGHT_INPUT registers */

#define CS4231_ENABLE_MIC_GAIN

#define CS4231_MIXS_LINE
#define CS4231_MIXS_AUX1
#define CS4231_MIXS_MIC
#define CS4231_MIXS_ALL

/* definitions for clock and data format register - CS4231_PLAYBK_FORMAT */

#define CS4231_LINEAR_8
#define CS4231_ALAW_8
#define CS4231_ULAW_8
#define CS4231_LINEAR_16
#define CS4231_LINEAR_16_BIG
#define CS4231_ADPCM_16
#define CS4231_STEREO
/* bits 3-1 define frequency divisor */
#define CS4231_XTAL1
#define CS4231_XTAL2

/* definitions for interface control register - CS4231_IFACE_CTRL */

#define CS4231_RECORD_PIO
#define CS4231_PLAYBACK_PIO
#define CS4231_CALIB_MODE
#define CS4231_AUTOCALIB
#define CS4231_SINGLE_DMA
#define CS4231_RECORD_ENABLE
#define CS4231_PLAYBACK_ENABLE

/* definitions for pin control register - CS4231_PIN_CTRL */

#define CS4231_IRQ_ENABLE
#define CS4231_XCTL1
#define CS4231_XCTL0

/* definitions for test and init register - CS4231_TEST_INIT */

#define CS4231_CALIB_IN_PROGRESS
#define CS4231_DMA_REQUEST

/* definitions for misc control register - CS4231_MISC_INFO */

#define CS4231_MODE2
#define CS4231_IW_MODE3
#define CS4231_4236_MODE3

/* definitions for alternate feature 1 register - CS4231_ALT_FEATURE_1 */

#define CS4231_DACZ
#define CS4231_TIMER_ENABLE
#define CS4231_OLB

/* definitions for Extended Registers - CS4236+ */

#define CS4236_REG(i23val)
#define CS4236_I23VAL(reg)

#define CS4236_LEFT_LINE
#define CS4236_RIGHT_LINE
#define CS4236_LEFT_MIC
#define CS4236_RIGHT_MIC
#define CS4236_LEFT_MIX_CTRL
#define CS4236_RIGHT_MIX_CTRL
#define CS4236_LEFT_FM
#define CS4236_RIGHT_FM
#define CS4236_LEFT_DSP
#define CS4236_RIGHT_DSP
#define CS4236_RIGHT_LOOPBACK
#define CS4236_DAC_MUTE
#define CS4236_ADC_RATE
#define CS4236_DAC_RATE
#define CS4236_LEFT_MASTER
#define CS4236_RIGHT_MASTER
#define CS4236_LEFT_WAVE
#define CS4236_RIGHT_WAVE
#define CS4236_VERSION

/* definitions for extended registers - OPTI93X */
#define OPTi931_AUX_LEFT_INPUT
#define OPTi931_AUX_RIGHT_INPUT
#define OPTi93X_MIC_LEFT_INPUT
#define OPTi93X_MIC_RIGHT_INPUT
#define OPTi93X_OUT_LEFT
#define OPTi93X_OUT_RIGHT

#endif /* __SOUND_CS4231_REGS_H */