linux/sound/soc/codecs/tas2780.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * TAS2780.h - ALSA SoC Texas Instruments TAS2780 Mono Audio Amplifier
 *
 * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com
 *
 * Author: Raphael Xu <[email protected]>
 */

#ifndef __TAS2780_H__
#define __TAS2780_H__

/* Book Control Register */
#define TAS2780_BOOKCTL_PAGE
#define TAS2780_BOOKCTL_REG
#define TAS2780_REG(page, reg)

/* Page */
#define TAS2780_PAGE
#define TAS2780_PAGE_PAGE_MASK

/* Software Reset */
#define TAS2780_SW_RST
#define TAS2780_RST

/* Power Control */
#define TAS2780_PWR_CTRL
#define TAS2780_PWR_CTRL_MASK
#define TAS2780_PWR_CTRL_ACTIVE
#define TAS2780_PWR_CTRL_MUTE
#define TAS2780_PWR_CTRL_SHUTDOWN

#define TAS2780_VSENSE_POWER_EN
#define TAS2780_ISENSE_POWER_EN

/* Digital Volume Control */
#define TAS2780_DVC
#define TAS2780_DVC_MAX

#define TAS2780_CHNL_0

/* TDM Configuration Reg0 */
#define TAS2780_TDM_CFG0
#define TAS2780_TDM_CFG0_SMP_MASK
#define TAS2780_TDM_CFG0_SMP_48KHZ
#define TAS2780_TDM_CFG0_SMP_44_1KHZ
#define TAS2780_TDM_CFG0_MASK
#define TAS2780_TDM_CFG0_44_1_48KHZ
#define TAS2780_TDM_CFG0_88_2_96KHZ

/* TDM Configuration Reg1 */
#define TAS2780_TDM_CFG1
#define TAS2780_TDM_CFG1_MASK
#define TAS2780_TDM_CFG1_51_SHIFT
#define TAS2780_TDM_CFG1_RX_MASK
#define TAS2780_TDM_CFG1_RX_RISING
#define TAS2780_TDM_CFG1_RX_FALLING

/* TDM Configuration Reg2 */
#define TAS2780_TDM_CFG2
#define TAS2780_TDM_CFG2_RXW_MASK
#define TAS2780_TDM_CFG2_RXW_16BITS
#define TAS2780_TDM_CFG2_RXW_24BITS
#define TAS2780_TDM_CFG2_RXW_32BITS
#define TAS2780_TDM_CFG2_RXS_MASK
#define TAS2780_TDM_CFG2_RXS_16BITS
#define TAS2780_TDM_CFG2_RXS_24BITS
#define TAS2780_TDM_CFG2_RXS_32BITS
#define TAS2780_TDM_CFG2_SCFG_MASK
#define TAS2780_TDM_CFG2_SCFG_I2S
#define TAS2780_TDM_CFG2_SCFG_LEFT_J
#define TAS2780_TDM_CFG2_SCFG_RIGHT_J

/* TDM Configuration Reg3 */
#define TAS2780_TDM_CFG3
#define TAS2780_TDM_CFG3_RXS_MASK
#define TAS2780_TDM_CFG3_RXS_SHIFT
#define TAS2780_TDM_CFG3_MASK

/* TDM Configuration Reg4 */
#define TAS2780_TDM_CFG4
#define TAS2780_TDM_CFG4_TX_OFFSET_MASK

/* TDM Configuration Reg5 */
#define TAS2780_TDM_CFG5
#define TAS2780_TDM_CFG5_VSNS_MASK
#define TAS2780_TDM_CFG5_VSNS_ENABLE
#define TAS2780_TDM_CFG5_50_MASK

/* TDM Configuration Reg6 */
#define TAS2780_TDM_CFG6
#define TAS2780_TDM_CFG6_ISNS_MASK
#define TAS2780_TDM_CFG6_ISNS_ENABLE
#define TAS2780_TDM_CFG6_50_MASK

/* IC CFG */
#define TAS2780_IC_CFG
#define TAS2780_IC_CFG_MASK
#define TAS2780_IC_CFG_ENABLE

#endif /* __TAS2780_H__ */