#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
#include <sound/jack.h>
#include <sound/initval.h>
#include <asm/div64.h>
#include "lm49453.h"
static const struct reg_default lm49453_reg_defs[] = …;
struct lm49453_priv { … };
static const char *lm49453_mic2mode_text[] = …;
static SOC_ENUM_SINGLE_DECL(lm49453_mic2mode_enum, LM49453_P0_MICR_REG, 5,
lm49453_mic2mode_text);
static const char *lm49453_dmic_cfg_text[] = …;
static SOC_ENUM_SINGLE_DECL(lm49453_dmic12_cfg_enum,
LM49453_P0_DIGITAL_MIC1_CONFIG_REG, 7,
lm49453_dmic_cfg_text);
static SOC_ENUM_SINGLE_DECL(lm49453_dmic34_cfg_enum,
LM49453_P0_DIGITAL_MIC2_CONFIG_REG, 7,
lm49453_dmic_cfg_text);
static const char *lm49453_adcl_mux_text[] = …;
static const char *lm49453_adcr_mux_text[] = …;
static SOC_ENUM_SINGLE_DECL(lm49453_adcl_enum,
LM49453_P0_ANALOG_MIXER_ADC_REG, 0,
lm49453_adcl_mux_text);
static SOC_ENUM_SINGLE_DECL(lm49453_adcr_enum,
LM49453_P0_ANALOG_MIXER_ADC_REG, 1,
lm49453_adcr_mux_text);
static const struct snd_kcontrol_new lm49453_adcl_mux_control = …;
static const struct snd_kcontrol_new lm49453_adcr_mux_control = …;
static const struct snd_kcontrol_new lm49453_headset_left_mixer[] = …;
static const struct snd_kcontrol_new lm49453_headset_right_mixer[] = …;
static const struct snd_kcontrol_new lm49453_speaker_left_mixer[] = …;
static const struct snd_kcontrol_new lm49453_speaker_right_mixer[] = …;
static const struct snd_kcontrol_new lm49453_haptic_left_mixer[] = …;
static const struct snd_kcontrol_new lm49453_haptic_right_mixer[] = …;
static const struct snd_kcontrol_new lm49453_lineout_left_mixer[] = …;
static const struct snd_kcontrol_new lm49453_lineout_right_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx1_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx2_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx3_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx4_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx5_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx6_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx7_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port1_tx8_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port2_tx1_mixer[] = …;
static const struct snd_kcontrol_new lm49453_port2_tx2_mixer[] = …;
static const DECLARE_TLV_DB_SCALE(adc_dac_tlv, -7650, 150, 1);
static const DECLARE_TLV_DB_SCALE(mic_tlv, 0, 200, 1);
static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0);
static const DECLARE_TLV_DB_SCALE(stn_tlv, -7200, 150, 0);
static const struct snd_kcontrol_new lm49453_sidetone_mixer_controls[] = …;
static const struct snd_kcontrol_new lm49453_snd_controls[] = …;
static const struct snd_soc_dapm_widget lm49453_dapm_widgets[] = …;
static const struct snd_soc_dapm_route lm49453_audio_map[] = …;
static int lm49453_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ … }
static int lm49453_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir)
{ … }
static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int lm49453_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
#define LM49453_FORMATS …
static const struct snd_soc_dai_ops lm49453_headset_dai_ops = …;
static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = …;
static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = …;
static const struct snd_soc_dai_ops lm49453_ep_dai_ops = …;
static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = …;
static struct snd_soc_dai_driver lm49453_dai[] = …;
static const struct snd_soc_component_driver soc_component_dev_lm49453 = …;
static const struct regmap_config lm49453_regmap_config = …;
static int lm49453_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id lm49453_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm49453_i2c_id);
static struct i2c_driver lm49453_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;