#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <linux/platform_data/adau17x1.h>
#include "adau17x1.h"
#include "adau1761.h"
#define ADAU1761_DIGMIC_JACKDETECT …
#define ADAU1761_REC_MIXER_LEFT0 …
#define ADAU1761_REC_MIXER_LEFT1 …
#define ADAU1761_REC_MIXER_RIGHT0 …
#define ADAU1761_REC_MIXER_RIGHT1 …
#define ADAU1761_LEFT_DIFF_INPUT_VOL …
#define ADAU1761_RIGHT_DIFF_INPUT_VOL …
#define ADAU1761_ALC_CTRL0 …
#define ADAU1761_ALC_CTRL1 …
#define ADAU1761_ALC_CTRL2 …
#define ADAU1761_ALC_CTRL3 …
#define ADAU1761_PLAY_LR_MIXER_LEFT …
#define ADAU1761_PLAY_MIXER_LEFT0 …
#define ADAU1761_PLAY_MIXER_LEFT1 …
#define ADAU1761_PLAY_MIXER_RIGHT0 …
#define ADAU1761_PLAY_MIXER_RIGHT1 …
#define ADAU1761_PLAY_LR_MIXER_RIGHT …
#define ADAU1761_PLAY_MIXER_MONO …
#define ADAU1761_PLAY_HP_LEFT_VOL …
#define ADAU1761_PLAY_HP_RIGHT_VOL …
#define ADAU1761_PLAY_LINE_LEFT_VOL …
#define ADAU1761_PLAY_LINE_RIGHT_VOL …
#define ADAU1761_PLAY_MONO_OUTPUT_VOL …
#define ADAU1761_POP_CLICK_SUPPRESS …
#define ADAU1761_JACK_DETECT_PIN …
#define ADAU1761_DEJITTER …
#define ADAU1761_CLK_ENABLE0 …
#define ADAU1761_CLK_ENABLE1 …
#define ADAU1761_DIGMIC_JACKDETECT_ACTIVE_LOW …
#define ADAU1761_DIGMIC_JACKDETECT_DIGMIC …
#define ADAU1761_DIFF_INPUT_VOL_LDEN …
#define ADAU1761_PLAY_MONO_OUTPUT_VOL_MODE_HP …
#define ADAU1761_PLAY_MONO_OUTPUT_VOL_UNMUTE …
#define ADAU1761_PLAY_HP_RIGHT_VOL_MODE_HP …
#define ADAU1761_PLAY_LINE_LEFT_VOL_MODE_HP …
#define ADAU1761_PLAY_LINE_RIGHT_VOL_MODE_HP …
#define ADAU1761_FIRMWARE …
static const struct reg_default adau1761_reg_defaults[] = …;
static const DECLARE_TLV_DB_SCALE(adau1761_sing_in_tlv, -1500, 300, 1);
static const DECLARE_TLV_DB_SCALE(adau1761_diff_in_tlv, -1200, 75, 0);
static const DECLARE_TLV_DB_SCALE(adau1761_out_tlv, -5700, 100, 0);
static const DECLARE_TLV_DB_SCALE(adau1761_sidetone_tlv, -1800, 300, 1);
static const DECLARE_TLV_DB_SCALE(adau1761_boost_tlv, -600, 600, 1);
static const DECLARE_TLV_DB_SCALE(adau1761_pga_boost_tlv, -2000, 2000, 1);
static const DECLARE_TLV_DB_SCALE(adau1761_alc_max_gain_tlv, -1200, 600, 0);
static const DECLARE_TLV_DB_SCALE(adau1761_alc_target_tlv, -2850, 150, 0);
static const DECLARE_TLV_DB_SCALE(adau1761_alc_ng_threshold_tlv, -7650, 150, 0);
static const unsigned int adau1761_bias_select_values[] = …;
static const char * const adau1761_bias_select_text[] = …;
static const char * const adau1761_bias_select_extreme_text[] = …;
static SOC_ENUM_SINGLE_DECL(adau1761_adc_bias_enum,
ADAU17X1_REC_POWER_MGMT, 3, adau1761_bias_select_extreme_text);
static SOC_ENUM_SINGLE_DECL(adau1761_hp_bias_enum,
ADAU17X1_PLAY_POWER_MGMT, 6, adau1761_bias_select_extreme_text);
static SOC_ENUM_SINGLE_DECL(adau1761_dac_bias_enum,
ADAU17X1_PLAY_POWER_MGMT, 4, adau1761_bias_select_extreme_text);
static SOC_VALUE_ENUM_SINGLE_DECL(adau1761_playback_bias_enum,
ADAU17X1_PLAY_POWER_MGMT, 2, 0x3, adau1761_bias_select_text,
adau1761_bias_select_values);
static SOC_VALUE_ENUM_SINGLE_DECL(adau1761_capture_bias_enum,
ADAU17X1_REC_POWER_MGMT, 1, 0x3, adau1761_bias_select_text,
adau1761_bias_select_values);
static const unsigned int adau1761_pga_slew_time_values[] = …;
static const char * const adau1761_pga_slew_time_text[] = …;
static const char * const adau1761_alc_function_text[] = …;
static const char * const adau1761_alc_hold_time_text[] = …;
static const char * const adau1761_alc_attack_time_text[] = …;
static const char * const adau1761_alc_decay_time_text[] = …;
static const char * const adau1761_alc_ng_type_text[] = …;
static SOC_VALUE_ENUM_SINGLE_DECL(adau1761_pga_slew_time_enum,
ADAU1761_ALC_CTRL0, 6, 0x3, adau1761_pga_slew_time_text,
adau1761_pga_slew_time_values);
static SOC_ENUM_SINGLE_DECL(adau1761_alc_function_enum,
ADAU1761_ALC_CTRL0, 0, adau1761_alc_function_text);
static SOC_ENUM_SINGLE_DECL(adau1761_alc_hold_time_enum,
ADAU1761_ALC_CTRL1, 4, adau1761_alc_hold_time_text);
static SOC_ENUM_SINGLE_DECL(adau1761_alc_attack_time_enum,
ADAU1761_ALC_CTRL2, 4, adau1761_alc_attack_time_text);
static SOC_ENUM_SINGLE_DECL(adau1761_alc_decay_time_enum,
ADAU1761_ALC_CTRL2, 0, adau1761_alc_decay_time_text);
static SOC_ENUM_SINGLE_DECL(adau1761_alc_ng_type_enum,
ADAU1761_ALC_CTRL3, 6, adau1761_alc_ng_type_text);
static const struct snd_kcontrol_new adau1761_jack_detect_controls[] = …;
static const struct snd_kcontrol_new adau1761_differential_mode_controls[] = …;
static const struct snd_kcontrol_new adau1761_single_mode_controls[] = …;
static const struct snd_kcontrol_new adau1761_controls[] = …;
static const struct snd_kcontrol_new adau1761_mono_controls[] = …;
static const struct snd_kcontrol_new adau1761_left_mixer_controls[] = …;
static const struct snd_kcontrol_new adau1761_right_mixer_controls[] = …;
static const struct snd_kcontrol_new adau1761_left_lr_mixer_controls[] = …;
static const struct snd_kcontrol_new adau1761_right_lr_mixer_controls[] = …;
static const char * const adau1761_input_mux_text[] = …;
static SOC_ENUM_SINGLE_DECL(adau1761_input_mux_enum,
ADAU17X1_ADC_CONTROL, 2, adau1761_input_mux_text);
static const struct snd_kcontrol_new adau1761_input_mux_control = …;
static int adau1761_dejitter_fixup(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget adau1x61_dapm_widgets[] = …;
static const struct snd_soc_dapm_widget adau1761_mono_dapm_widgets[] = …;
static const struct snd_soc_dapm_widget adau1761_capless_dapm_widgets[] = …;
static const struct snd_soc_dapm_route adau1x61_dapm_routes[] = …;
static const struct snd_soc_dapm_route adau1761_mono_dapm_routes[] = …;
static const struct snd_soc_dapm_route adau1761_capless_dapm_routes[] = …;
static const struct snd_soc_dapm_widget adau1761_dmic_widgets[] = …;
static const struct snd_soc_dapm_route adau1761_dmic_routes[] = …;
static const struct snd_soc_dapm_route adau1761_no_dmic_routes[] = …;
static const struct snd_soc_dapm_widget adau1761_dapm_widgets[] = …;
static const struct snd_soc_dapm_route adau1761_dapm_routes[] = …;
static const struct snd_soc_dapm_route adau1761_dapm_dsp_routes[] = …;
static int adau1761_compatibility_probe(struct device *dev)
{ … }
static int adau1761_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static enum adau1761_output_mode adau1761_get_lineout_mode(
struct snd_soc_component *component)
{ … }
static int adau1761_setup_digmic_jackdetect(struct snd_soc_component *component)
{ … }
static int adau1761_setup_headphone_mode(struct snd_soc_component *component)
{ … }
static bool adau1761_readable_register(struct device *dev, unsigned int reg)
{ … }
static int adau1761_component_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver adau1761_component_driver = …;
#define ADAU1761_FORMATS …
static struct snd_soc_dai_driver adau1361_dai_driver = …;
static struct snd_soc_dai_driver adau1761_dai_driver = …;
int adau1761_probe(struct device *dev, struct regmap *regmap,
enum adau17x1_type type, void (*switch_mode)(struct device *dev))
{ … }
EXPORT_SYMBOL_GPL(…);
const struct regmap_config adau1761_regmap_config = …;
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;