linux/sound/soc/codecs/cs42l56.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * cs42l52.h -- CS42L56 ALSA SoC audio driver
 *
 * Copyright 2014 CirrusLogic, Inc.
 *
 * Author: Brian Austin <[email protected]>
 */

#ifndef __CS42L56_H__
#define __CS42L56_H__

#define CS42L56_CHIP_ID_1
#define CS42L56_CHIP_ID_2
#define CS42L56_PWRCTL_1
#define CS42L56_PWRCTL_2
#define CS42L56_CLKCTL_1
#define CS42L56_CLKCTL_2
#define CS42L56_SERIAL_FMT
#define CS42L56_CLASSH_CTL
#define CS42L56_MISC_CTL
#define CS42L56_INT_STATUS
#define CS42L56_PLAYBACK_CTL
#define CS42L56_DSP_MUTE_CTL
#define CS42L56_ADCA_MIX_VOLUME
#define CS42L56_ADCB_MIX_VOLUME
#define CS42L56_PCMA_MIX_VOLUME
#define CS42L56_PCMB_MIX_VOLUME
#define CS42L56_ANAINPUT_ADV_VOLUME
#define CS42L56_DIGINPUT_ADV_VOLUME
#define CS42L56_MASTER_A_VOLUME
#define CS42L56_MASTER_B_VOLUME
#define CS42L56_BEEP_FREQ_ONTIME
#define CS42L56_BEEP_FREQ_OFFTIME
#define CS42L56_BEEP_TONE_CFG
#define CS42L56_TONE_CTL
#define CS42L56_CHAN_MIX_SWAP
#define CS42L56_AIN_REFCFG_ADC_MUX
#define CS42L56_HPF_CTL
#define CS42L56_MISC_ADC_CTL
#define CS42L56_GAIN_BIAS_CTL
#define CS42L56_PGAA_MUX_VOLUME
#define CS42L56_PGAB_MUX_VOLUME
#define CS42L56_ADCA_ATTENUATOR
#define CS42L56_ADCB_ATTENUATOR
#define CS42L56_ALC_EN_ATTACK_RATE
#define CS42L56_ALC_RELEASE_RATE
#define CS42L56_ALC_THRESHOLD
#define CS42L56_NOISE_GATE_CTL
#define CS42L56_ALC_LIM_SFT_ZC
#define CS42L56_AMUTE_HPLO_MUX
#define CS42L56_HPA_VOLUME
#define CS42L56_HPB_VOLUME
#define CS42L56_LOA_VOLUME
#define CS42L56_LOB_VOLUME
#define CS42L56_LIM_THRESHOLD_CTL
#define CS42L56_LIM_CTL_RELEASE_RATE
#define CS42L56_LIM_ATTACK_RATE

/* Device ID and Rev ID Masks */
#define CS42L56_DEVID
#define CS42L56_CHIP_ID_MASK
#define CS42L56_AREV_MASK
#define CS42L56_MTLREV_MASK

/* Power bit masks */
#define CS42L56_PDN_ALL_MASK
#define CS42L56_PDN_ADCA_MASK
#define CS42L56_PDN_ADCB_MASK
#define CS42L56_PDN_CHRG_MASK
#define CS42L56_PDN_BIAS_MASK
#define CS42L56_PDN_VBUF_MASK
#define CS42L56_PDN_LOA_MASK
#define CS42L56_PDN_LOB_MASK
#define CS42L56_PDN_HPA_MASK
#define CS42L56_PDN_HPB_MASK

/* serial port and clk masks */
#define CS42L56_MASTER_MODE
#define CS42L56_SLAVE_MODE
#define CS42L56_MS_MODE_MASK
#define CS42L56_SCLK_INV
#define CS42L56_SCLK_INV_MASK
#define CS42L56_SCLK_MCLK_MASK
#define CS42L56_MCLK_PREDIV
#define CS42L56_MCLK_PREDIV_MASK
#define CS42L56_MCLK_DIV2
#define CS42L56_MCLK_DIV2_MASK
#define CS42L56_MCLK_DIS_MASK
#define CS42L56_CLK_AUTO_MASK
#define CS42L56_CLK_RATIO_MASK
#define CS42L56_DIG_FMT_I2S
#define CS42L56_DIG_FMT_LEFT_J
#define CS42L56_DIG_FMT_MASK

/* Class H and misc ctl masks */
#define CS42L56_ADAPT_PWR_MASK
#define CS42L56_CHRG_FREQ_MASK
#define CS42L56_DIG_MUX_MASK
#define CS42L56_ANLGSFT_MASK
#define CS42L56_ANLGZC_MASK
#define CS42L56_DIGSFT_MASK
#define CS42L56_FREEZE_MASK
#define CS42L56_MIC_BIAS_MASK
#define CS42L56_HPFA_FREQ_MASK
#define CS42L56_HPFB_FREQ_MASK
#define CS42L56_AIN1A_REF_MASK
#define CS42L56_AIN2A_REF_MASK
#define CS42L56_AIN1B_REF_MASK
#define CS42L56_AIN2B_REF_MASK

/* Playback Capture ctl masks */
#define CS42L56_PDN_DSP_MASK
#define CS42L56_DEEMPH_MASK
#define CS42L56_PLYBCK_GANG_MASK
#define CS42L56_PCM_INV_MASK
#define CS42L56_MUTE_ALL
#define CS42L56_UNMUTE
#define CS42L56_ADCAMIX_MUTE_MASK
#define CS42L56_ADCBMIX_MUTE_MASK
#define CS42L56_PCMAMIX_MUTE_MASK
#define CS42L56_PCMBMIX_MUTE_MASK
#define CS42L56_MSTB_MUTE_MASK
#define CS42L56_MSTA_MUTE_MASK
#define CS42L56_ADCA_MUTE_MASK
#define CS42L56_ADCB_MUTE_MASK
#define CS42L56_HP_MUTE_MASK
#define CS42L56_LO_MUTE_MASK

/* Beep masks */
#define CS42L56_BEEP_FREQ_MASK
#define CS42L56_BEEP_ONTIME_MASK
#define CS42L56_BEEP_OFFTIME_MASK
#define CS42L56_BEEP_CFG_MASK
#define CS42L56_BEEP_TREBCF_MASK
#define CS42L56_BEEP_BASSCF_MASK
#define CS42L56_BEEP_TCEN_MASK
#define CS42L56_BEEP_RATE_SHIFT
#define CS42L56_BEEP_EN_MASK


/* Supported MCLKS */
#define CS42L56_MCLK_5P6448MHZ
#define CS42L56_MCLK_6MHZ
#define CS42L56_MCLK_6P144MHZ
#define CS42L56_MCLK_11P2896MHZ
#define CS42L56_MCLK_12MHZ
#define CS42L56_MCLK_12P288MHZ
#define CS42L56_MCLK_22P5792MHZ
#define CS42L56_MCLK_24MHZ
#define CS42L56_MCLK_24P576MHZ

/* Clock ratios */
#define CS42L56_MCLK_LRCLK_128
#define CS42L56_MCLK_LRCLK_125
#define CS42L56_MCLK_LRCLK_136
#define CS42L56_MCLK_LRCLK_192
#define CS42L56_MCLK_LRCLK_187P5
#define CS42L56_MCLK_LRCLK_256
#define CS42L56_MCLK_LRCLK_250
#define CS42L56_MCLK_LRCLK_272
#define CS42L56_MCLK_LRCLK_384
#define CS42L56_MCLK_LRCLK_375
#define CS42L56_MCLK_LRCLK_512
#define CS42L56_MCLK_LRCLK_500
#define CS42L56_MCLK_LRCLK_544
#define CS42L56_MCLK_LRCLK_750
#define CS42L56_MCLK_LRCLK_768


#define CS42L56_MAX_REGISTER

#endif