linux/sound/soc/codecs/nau8822.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * nau8822.h  --  NAU8822 ALSA SoC Audio driver
 *
 * Copyright 2017 Nuvoton Technology Crop.
 *
 * Author: David Lin <[email protected]>
 * Co-author: John Hsu <[email protected]>
 * Co-author: Seven Li <[email protected]>
 */

#ifndef __NAU8822_H__
#define __NAU8822_H__

#define NAU8822_REG_RESET
#define NAU8822_REG_POWER_MANAGEMENT_1
#define NAU8822_REG_POWER_MANAGEMENT_2
#define NAU8822_REG_POWER_MANAGEMENT_3
#define NAU8822_REG_AUDIO_INTERFACE
#define NAU8822_REG_COMPANDING_CONTROL
#define NAU8822_REG_CLOCKING
#define NAU8822_REG_ADDITIONAL_CONTROL
#define NAU8822_REG_GPIO_CONTROL
#define NAU8822_REG_JACK_DETECT_CONTROL_1
#define NAU8822_REG_DAC_CONTROL
#define NAU8822_REG_LEFT_DAC_DIGITAL_VOLUME
#define NAU8822_REG_RIGHT_DAC_DIGITAL_VOLUME
#define NAU8822_REG_JACK_DETECT_CONTROL_2
#define NAU8822_REG_ADC_CONTROL
#define NAU8822_REG_LEFT_ADC_DIGITAL_VOLUME
#define NAU8822_REG_RIGHT_ADC_DIGITAL_VOLUME
#define NAU8822_REG_EQ1
#define NAU8822_REG_EQ2
#define NAU8822_REG_EQ3
#define NAU8822_REG_EQ4
#define NAU8822_REG_EQ5
#define NAU8822_REG_DAC_LIMITER_1
#define NAU8822_REG_DAC_LIMITER_2
#define NAU8822_REG_NOTCH_FILTER_1
#define NAU8822_REG_NOTCH_FILTER_2
#define NAU8822_REG_NOTCH_FILTER_3
#define NAU8822_REG_NOTCH_FILTER_4
#define NAU8822_REG_ALC_CONTROL_1
#define NAU8822_REG_ALC_CONTROL_2
#define NAU8822_REG_ALC_CONTROL_3
#define NAU8822_REG_NOISE_GATE
#define NAU8822_REG_PLL_N
#define NAU8822_REG_PLL_K1
#define NAU8822_REG_PLL_K2
#define NAU8822_REG_PLL_K3
#define NAU8822_REG_3D_CONTROL
#define NAU8822_REG_RIGHT_SPEAKER_CONTROL
#define NAU8822_REG_INPUT_CONTROL
#define NAU8822_REG_LEFT_INP_PGA_CONTROL
#define NAU8822_REG_RIGHT_INP_PGA_CONTROL
#define NAU8822_REG_LEFT_ADC_BOOST_CONTROL
#define NAU8822_REG_RIGHT_ADC_BOOST_CONTROL
#define NAU8822_REG_OUTPUT_CONTROL
#define NAU8822_REG_LEFT_MIXER_CONTROL
#define NAU8822_REG_RIGHT_MIXER_CONTROL
#define NAU8822_REG_LHP_VOLUME
#define NAU8822_REG_RHP_VOLUME
#define NAU8822_REG_LSPKOUT_VOLUME
#define NAU8822_REG_RSPKOUT_VOLUME
#define NAU8822_REG_AUX2_MIXER
#define NAU8822_REG_AUX1_MIXER
#define NAU8822_REG_POWER_MANAGEMENT_4
#define NAU8822_REG_LEFT_TIME_SLOT
#define NAU8822_REG_MISC
#define NAU8822_REG_RIGHT_TIME_SLOT
#define NAU8822_REG_DEVICE_REVISION
#define NAU8822_REG_DEVICE_ID
#define NAU8822_REG_DAC_DITHER
#define NAU8822_REG_ALC_ENHANCE_1
#define NAU8822_REG_ALC_ENHANCE_2
#define NAU8822_REG_192KHZ_SAMPLING
#define NAU8822_REG_MISC_CONTROL
#define NAU8822_REG_INPUT_TIEOFF
#define NAU8822_REG_POWER_REDUCTION
#define NAU8822_REG_AGC_PEAK2PEAK
#define NAU8822_REG_AGC_PEAK_DETECT
#define NAU8822_REG_AUTOMUTE_CONTROL
#define NAU8822_REG_OUTPUT_TIEOFF
#define NAU8822_REG_MAX_REGISTER

/* NAU8822_REG_POWER_MANAGEMENT_1 (0x1) */
#define NAU8822_REFIMP_MASK
#define NAU8822_REFIMP_80K
#define NAU8822_REFIMP_300K
#define NAU8822_REFIMP_3K
#define NAU8822_IOBUF_EN
#define NAU8822_ABIAS_EN
#define NAU8822_PLL_EN_MASK
#define NAU8822_PLL_ON
#define NAU8822_PLL_OFF

/* NAU8822_REG_AUDIO_INTERFACE (0x4) */
#define NAU8822_AIFMT_MASK
#define NAU8822_WLEN_MASK
#define NAU8822_WLEN_20
#define NAU8822_WLEN_24
#define NAU8822_WLEN_32
#define NAU8822_LRP_MASK
#define NAU8822_BCLKP_MASK

/* NAU8822_REG_COMPANDING_CONTROL (0x5) */
#define NAU8822_ADDAP_SFT
#define NAU8822_ADCCM_SFT
#define NAU8822_DACCM_SFT

/* NAU8822_REG_CLOCKING (0x6) */
#define NAU8822_CLKIOEN_MASK
#define NAU8822_CLK_MASTER
#define NAU8822_CLK_SLAVE
#define NAU8822_MCLKSEL_SFT
#define NAU8822_MCLKSEL_MASK
#define NAU8822_BCLKSEL_SFT
#define NAU8822_BCLKSEL_MASK
#define NAU8822_BCLKDIV_1
#define NAU8822_BCLKDIV_2
#define NAU8822_BCLKDIV_4
#define NAU8822_BCLKDIV_8
#define NAU8822_BCLKDIV_16
#define NAU8822_CLKM_MASK
#define NAU8822_CLKM_MCLK
#define NAU8822_CLKM_PLL

/* NAU8822_REG_ADDITIONAL_CONTROL (0x08) */
#define NAU8822_SMPLR_SFT
#define NAU8822_SMPLR_MASK
#define NAU8822_SMPLR_48K
#define NAU8822_SMPLR_32K
#define NAU8822_SMPLR_24K
#define NAU8822_SMPLR_16K
#define NAU8822_SMPLR_12K
#define NAU8822_SMPLR_8K

/* NAU8822_REG_EQ1 (0x12) */
#define NAU8822_EQ1GC_SFT
#define NAU8822_EQ1CF_SFT
#define NAU8822_EQM_SFT

/* NAU8822_REG_EQ2 (0x13) */
#define NAU8822_EQ2GC_SFT
#define NAU8822_EQ2CF_SFT
#define NAU8822_EQ2BW_SFT

/* NAU8822_REG_EQ3 (0x14) */
#define NAU8822_EQ3GC_SFT
#define NAU8822_EQ3CF_SFT
#define NAU8822_EQ3BW_SFT

/* NAU8822_REG_EQ4 (0x15) */
#define NAU8822_EQ4GC_SFT
#define NAU8822_EQ4CF_SFT
#define NAU8822_EQ4BW_SFT

/* NAU8822_REG_EQ5 (0x16) */
#define NAU8822_EQ5GC_SFT
#define NAU8822_EQ5CF_SFT

/* NAU8822_REG_ALC_CONTROL_1 (0x20) */
#define NAU8822_ALCMINGAIN_SFT
#define NAU8822_ALCMXGAIN_SFT
#define NAU8822_ALCEN_SFT

/* NAU8822_REG_ALC_CONTROL_2 (0x21) */
#define NAU8822_ALCSL_SFT
#define NAU8822_ALCHT_SFT

/* NAU8822_REG_ALC_CONTROL_3 (0x22) */
#define NAU8822_ALCATK_SFT
#define NAU8822_ALCDCY_SFT
#define NAU8822_ALCM_SFT

/* NAU8822_REG_PLL_N (0x24) */
#define NAU8822_PLLMCLK_DIV2
#define NAU8822_PLLN_MASK

#define NAU8822_PLLK1_SFT
#define NAU8822_PLLK1_MASK

/* NAU8822_REG_PLL_K2 (0x26) */
#define NAU8822_PLLK2_SFT
#define NAU8822_PLLK2_MASK

/* NAU8822_REG_PLL_K3 (0x27) */
#define NAU8822_PLLK3_MASK

/* NAU8822_REG_RIGHT_SPEAKER_CONTROL (0x2B) */
#define NAU8822_RMIXMUT
#define NAU8822_RSUBBYP

#define NAU8822_RAUXRSUBG_SFT
#define NAU8822_RAUXRSUBG_MASK

#define NAU8822_RAUXSMUT

/* System Clock Source */
enum {};

struct nau8822_pll {};

/* Codec Private Data */
struct nau8822 {};

#endif	/* __NAU8822_H__ */