linux/sound/soc/codecs/tas5720.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * tas5720.h - ALSA SoC Texas Instruments TAS5720 Mono Audio Amplifier
 *
 * Copyright (C)2015-2016 Texas Instruments Incorporated -  https://www.ti.com
 *
 * Author: Andreas Dannenberg <[email protected]>
 */

#ifndef __TAS5720_H__
#define __TAS5720_H__

/* Register Address Map - first 3 regs are common for all variants */
#define TAS5720_DEVICE_ID_REG
#define TAS5720_POWER_CTRL_REG
#define TAS5720_DIGITAL_CTRL1_REG
#define TAS5720_DIGITAL_CTRL2_REG
#define TAS5720_VOLUME_CTRL_REG
#define TAS5720_ANALOG_CTRL_REG
#define TAS5720_FAULT_REG
#define TAS5720_DIGITAL_CLIP2_REG
#define TAS5720_DIGITAL_CLIP1_REG
#define TAS5720_MAX_REG

/* Additional TAS5722-specific Registers */
#define TAS5722_DIGITAL_CTRL2_REG
#define TAS5722_ANALOG_CTRL2_REG
#define TAS5722_MAX_REG

/* Register Address Map - volume controls for the TAS5720-Q1 variant */
#define TAS5720_Q1_VOLUME_CTRL_CFG_REG
#define TAS5720_Q1_VOLUME_CTRL_LEFT_REG
#define TAS5720_Q1_VOLUME_CTRL_RIGHT_REG

/* TAS5720_DEVICE_ID_REG */
#define TAS5720A_Q1_DEVICE_ID
#define TAS5720_DEVICE_ID
#define TAS5722_DEVICE_ID

/* TAS5720_POWER_CTRL_REG */
#define TAS5720_DIG_CLIP_MASK
#define TAS5720_SLEEP
#define TAS5720_SDZ

/* TAS5720_DIGITAL_CTRL1_REG */
#define TAS5720_HPF_BYPASS
#define TAS5720_TDM_CFG_SRC
#define TAS5720_SSZ_DS
#define TAS5720_SAIF_RIGHTJ_24BIT
#define TAS5720_SAIF_RIGHTJ_20BIT
#define TAS5720_SAIF_RIGHTJ_18BIT
#define TAS5720_SAIF_RIGHTJ_16BIT
#define TAS5720_SAIF_I2S
#define TAS5720_SAIF_LEFTJ
#define TAS5720_SAIF_FORMAT_MASK

/* TAS5720_DIGITAL_CTRL2_REG */
#define TAS5722_VOL_RAMP_RATE
#define TAS5720_MUTE
#define TAS5720_TDM_SLOT_SEL_MASK

/* TAS5720_Q1_VOLUME_CTRL_CFG_REG */
#define TAS5720_Q1_FADE
#define TAS5720_Q1_MUTE

/* TAS5720_ANALOG_CTRL_REG */
#define TAS5720_PWM_RATE_6_3_FSYNC
#define TAS5720_PWM_RATE_8_4_FSYNC
#define TAS5720_PWM_RATE_10_5_FSYNC
#define TAS5720_PWM_RATE_12_6_FSYNC
#define TAS5720_PWM_RATE_14_7_FSYNC
#define TAS5720_PWM_RATE_16_8_FSYNC
#define TAS5720_PWM_RATE_20_10_FSYNC
#define TAS5720_PWM_RATE_24_12_FSYNC
#define TAS5720_PWM_RATE_MASK
#define TAS5720_ANALOG_GAIN_19_2DBV
#define TAS5720_ANALOG_GAIN_20_7DBV
#define TAS5720_ANALOG_GAIN_23_5DBV
#define TAS5720_ANALOG_GAIN_26_3DBV
#define TAS5720_ANALOG_GAIN_MASK
#define TAS5720_ANALOG_GAIN_SHIFT

/* TAS5720_Q1_ANALOG_CTRL_REG */
#define TAS5720_Q1_RESERVED7_BIT
#define TAS5720_Q1_CHAN_SEL

/* TAS5720_FAULT_REG */
#define TAS5720_OC_THRESH_100PCT
#define TAS5720_OC_THRESH_75PCT
#define TAS5720_OC_THRESH_50PCT
#define TAS5720_OC_THRESH_25PCT
#define TAS5720_OC_THRESH_MASK
#define TAS5720_CLKE
#define TAS5720_OCE
#define TAS5720_DCE
#define TAS5720_OTE
#define TAS5720_FAULT_MASK

/* TAS5720_DIGITAL_CLIP1_REG */
#define TAS5720_CLIP1_MASK
#define TAS5720_CLIP1_SHIFT

/* TAS5722_DIGITAL_CTRL2_REG */
#define TAS5722_HPF_3_7HZ
#define TAS5722_HPF_7_4HZ
#define TAS5722_HPF_14_9HZ
#define TAS5722_HPF_29_7HZ
#define TAS5722_HPF_59_4HZ
#define TAS5722_HPF_118_4HZ
#define TAS5722_HPF_235_0HZ
#define TAS5722_HPF_463_2HZ
#define TAS5722_HPF_MASK
#define TAS5722_AUTO_SLEEP_OFF
#define TAS5722_AUTO_SLEEP_1024LR
#define TAS5722_AUTO_SLEEP_65536LR
#define TAS5722_AUTO_SLEEP_262144LR
#define TAS5722_AUTO_SLEEP_MASK
#define TAS5722_TDM_SLOT_16B
#define TAS5722_MCLK_PIN_CFG
#define TAS5722_VOL_CONTROL_LSB

/* TAS5722_ANALOG_CTRL2_REG */
#define TAS5722_FAULTZ_PU
#define TAS5722_VREG_LVL
#define TAS5722_PWR_TUNE

#endif /* __TAS5720_H__ */