linux/sound/soc/codecs/88pm860x-codec.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * 88pm860x-codec.h -- 88PM860x ALSA SoC Audio Driver
 *
 * Copyright 2010 Marvell International Ltd.
 *	Haojian Zhuang <[email protected]>
 */

#ifndef __88PM860X_H
#define __88PM860X_H

#define PM860X_PCM_IFACE_1
#define PM860X_PCM_IFACE_2
#define PM860X_PCM_IFACE_3
#define PM860X_PCM_RATE
#define PM860X_EC_PATH
#define PM860X_SIDETONE_L_GAIN
#define PM860X_SIDETONE_R_GAIN
#define PM860X_SIDETONE_SHIFT
#define PM860X_ADC_OFFSET_1
#define PM860X_ADC_OFFSET_2
#define PM860X_DMIC_DELAY

#define PM860X_I2S_IFACE_1
#define PM860X_I2S_IFACE_2
#define PM860X_I2S_IFACE_3
#define PM860X_I2S_IFACE_4
#define PM860X_EQUALIZER_N0_1
#define PM860X_EQUALIZER_N0_2
#define PM860X_EQUALIZER_N1_1
#define PM860X_EQUALIZER_N1_2
#define PM860X_EQUALIZER_D1_1
#define PM860X_EQUALIZER_D1_2
#define PM860X_LOFI_GAIN_LEFT
#define PM860X_LOFI_GAIN_RIGHT
#define PM860X_HIFIL_GAIN_LEFT
#define PM860X_HIFIL_GAIN_RIGHT
#define PM860X_HIFIR_GAIN_LEFT
#define PM860X_HIFIR_GAIN_RIGHT
#define PM860X_DAC_OFFSET
#define PM860X_OFFSET_LEFT_1
#define PM860X_OFFSET_LEFT_2
#define PM860X_OFFSET_RIGHT_1
#define PM860X_OFFSET_RIGHT_2
#define PM860X_ADC_ANA_1
#define PM860X_ADC_ANA_2
#define PM860X_ADC_ANA_3
#define PM860X_ADC_ANA_4
#define PM860X_ANA_TO_ANA
#define PM860X_HS1_CTRL
#define PM860X_HS2_CTRL
#define PM860X_LO1_CTRL
#define PM860X_LO2_CTRL
#define PM860X_EAR_CTRL_1
#define PM860X_EAR_CTRL_2
#define PM860X_AUDIO_SUPPLIES_1
#define PM860X_AUDIO_SUPPLIES_2
#define PM860X_ADC_EN_1
#define PM860X_ADC_EN_2
#define PM860X_DAC_EN_1
#define PM860X_DAC_EN_2
#define PM860X_AUDIO_CAL_1
#define PM860X_AUDIO_CAL_2
#define PM860X_AUDIO_CAL_3
#define PM860X_AUDIO_CAL_4
#define PM860X_AUDIO_CAL_5
#define PM860X_ANA_INPUT_SEL_1
#define PM860X_ANA_INPUT_SEL_2

#define PM860X_PCM_IFACE_4
#define PM860X_I2S_IFACE_5

#define PM860X_SHORTS
#define PM860X_PLL_ADJ_1
#define PM860X_PLL_ADJ_2

/* bits definition */
#define PM860X_CLK_DIR_IN
#define PM860X_CLK_DIR_OUT

#define PM860X_DET_HEADSET
#define PM860X_DET_MIC
#define PM860X_DET_HOOK
#define PM860X_SHORT_HEADSET
#define PM860X_SHORT_LINEOUT
#define PM860X_DET_MASK

extern int pm860x_hs_jack_detect(struct snd_soc_component *, struct snd_soc_jack *,
				 int, int, int, int);
extern int pm860x_mic_jack_detect(struct snd_soc_component *, struct snd_soc_jack *,
				  int);

#endif	/* __88PM860X_H */