linux/sound/soc/codecs/tas6424.h

// SPDX-License-Identifier: GPL-2.0
/*
 * ALSA SoC Texas Instruments TAS6424 Quad-Channel Audio Amplifier
 *
 * Copyright (C) 2016-2017 Texas Instruments Incorporated - https://www.ti.com/
 *	Author: Andreas Dannenberg <[email protected]>
 *	Andrew F. Davis <[email protected]>
 */

#ifndef __TAS6424_H__
#define __TAS6424_H__

#define TAS6424_RATES

#define TAS6424_FORMATS

/* Register Address Map */
#define TAS6424_MODE_CTRL
#define TAS6424_MISC_CTRL1
#define TAS6424_MISC_CTRL2
#define TAS6424_SAP_CTRL
#define TAS6424_CH_STATE_CTRL
#define TAS6424_CH1_VOL_CTRL
#define TAS6424_CH2_VOL_CTRL
#define TAS6424_CH3_VOL_CTRL
#define TAS6424_CH4_VOL_CTRL
#define TAS6424_DC_DIAG_CTRL1
#define TAS6424_DC_DIAG_CTRL2
#define TAS6424_DC_DIAG_CTRL3
#define TAS6424_DC_LOAD_DIAG_REP12
#define TAS6424_DC_LOAD_DIAG_REP34
#define TAS6424_DC_LOAD_DIAG_REPLO
#define TAS6424_CHANNEL_STATE
#define TAS6424_CHANNEL_FAULT
#define TAS6424_GLOB_FAULT1
#define TAS6424_GLOB_FAULT2
#define TAS6424_WARN
#define TAS6424_PIN_CTRL
#define TAS6424_AC_DIAG_CTRL1
#define TAS6424_AC_DIAG_CTRL2
#define TAS6424_AC_LOAD_DIAG_REP1
#define TAS6424_AC_LOAD_DIAG_REP2
#define TAS6424_AC_LOAD_DIAG_REP3
#define TAS6424_AC_LOAD_DIAG_REP4
#define TAS6424_MISC_CTRL3
#define TAS6424_CLIP_CTRL
#define TAS6424_CLIP_WINDOW
#define TAS6424_CLIP_WARN
#define TAS6424_CBC_STAT
#define TAS6424_MISC_CTRL4
#define TAS6424_MAX

/* TAS6424_MODE_CTRL_REG */
#define TAS6424_RESET

/* TAS6424_SAP_CTRL_REG */
#define TAS6424_SAP_RATE_MASK
#define TAS6424_SAP_RATE_44100
#define TAS6424_SAP_RATE_48000
#define TAS6424_SAP_RATE_96000
#define TAS6424_SAP_TDM_SLOT_LAST
#define TAS6424_SAP_TDM_SLOT_SZ_16
#define TAS6424_SAP_TDM_SLOT_SWAP
#define TAS6424_SAP_FMT_MASK
#define TAS6424_SAP_RIGHTJ_24
#define TAS6424_SAP_RIGHTJ_20
#define TAS6424_SAP_RIGHTJ_18
#define TAS6424_SAP_RIGHTJ_16
#define TAS6424_SAP_I2S
#define TAS6424_SAP_LEFTJ
#define TAS6424_SAP_DSP

/* TAS6424_CH_STATE_CTRL_REG */
#define TAS6424_CH1_STATE_MASK
#define TAS6424_CH1_STATE_PLAY
#define TAS6424_CH1_STATE_HIZ
#define TAS6424_CH1_STATE_MUTE
#define TAS6424_CH1_STATE_DIAG
#define TAS6424_CH2_STATE_MASK
#define TAS6424_CH2_STATE_PLAY
#define TAS6424_CH2_STATE_HIZ
#define TAS6424_CH2_STATE_MUTE
#define TAS6424_CH2_STATE_DIAG
#define TAS6424_CH3_STATE_MASK
#define TAS6424_CH3_STATE_PLAY
#define TAS6424_CH3_STATE_HIZ
#define TAS6424_CH3_STATE_MUTE
#define TAS6424_CH3_STATE_DIAG
#define TAS6424_CH4_STATE_MASK
#define TAS6424_CH4_STATE_PLAY
#define TAS6424_CH4_STATE_HIZ
#define TAS6424_CH4_STATE_MUTE
#define TAS6424_CH4_STATE_DIAG
#define TAS6424_ALL_STATE_PLAY
#define TAS6424_ALL_STATE_HIZ
#define TAS6424_ALL_STATE_MUTE
#define TAS6424_ALL_STATE_DIAG

/* TAS6424_DC_DIAG_CTRL1 */
#define TAS6424_LDGBYPASS_SHIFT
#define TAS6424_LDGBYPASS_MASK

/* TAS6424_GLOB_FAULT1_REG */
#define TAS6424_FAULT_OC_CH1
#define TAS6424_FAULT_OC_CH2
#define TAS6424_FAULT_OC_CH3
#define TAS6424_FAULT_OC_CH4
#define TAS6424_FAULT_DC_CH1
#define TAS6424_FAULT_DC_CH2
#define TAS6424_FAULT_DC_CH3
#define TAS6424_FAULT_DC_CH4

/* TAS6424_GLOB_FAULT1_REG */
#define TAS6424_FAULT_CLOCK
#define TAS6424_FAULT_PVDD_OV
#define TAS6424_FAULT_VBAT_OV
#define TAS6424_FAULT_PVDD_UV
#define TAS6424_FAULT_VBAT_UV

/* TAS6424_GLOB_FAULT2_REG */
#define TAS6424_FAULT_OTSD
#define TAS6424_FAULT_OTSD_CH1
#define TAS6424_FAULT_OTSD_CH2
#define TAS6424_FAULT_OTSD_CH3
#define TAS6424_FAULT_OTSD_CH4

/* TAS6424_WARN_REG */
#define TAS6424_WARN_VDD_UV
#define TAS6424_WARN_VDD_POR
#define TAS6424_WARN_VDD_OTW
#define TAS6424_WARN_VDD_OTW_CH1
#define TAS6424_WARN_VDD_OTW_CH2
#define TAS6424_WARN_VDD_OTW_CH3
#define TAS6424_WARN_VDD_OTW_CH4

/* TAS6424_MISC_CTRL3_REG */
#define TAS6424_CLEAR_FAULT
#define TAS6424_PBTL_CH_SEL
#define TAS6424_MASK_CBC_WARN
#define TAS6424_MASK_VDD_UV
#define TAS6424_OTSD_AUTO_RECOVERY

#endif /* __TAS6424_H__ */