#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include "ml26124.h"
#define DVOL_CTL_DVMUTE_ON …
#define DVOL_CTL_DVMUTE_OFF …
#define ML26124_SAI_NO_DELAY …
#define ML26124_SAI_FRAME_SYNC …
#define ML26134_CACHESIZE …
#define ML26124_VMID …
#define ML26124_RATES …
#define ML26124_FORMATS …
#define ML26124_NUM_REGISTER …
struct ml26124_priv { … };
struct clk_coeff { … };
static const DECLARE_TLV_DB_SCALE(digital_tlv, -7150, 50, 0);
static const DECLARE_TLV_DB_SCALE(alclvl, -2250, 150, 0);
static const DECLARE_TLV_DB_SCALE(mingain, -1200, 600, 0);
static const DECLARE_TLV_DB_SCALE(maxgain, -675, 600, 0);
static const DECLARE_TLV_DB_SCALE(boost_vol, -1200, 75, 0);
static const char * const ml26124_companding[] = …;
static SOC_ENUM_SINGLE_DECL(ml26124_adc_companding_enum,
ML26124_SAI_TRANS_CTL, 6, ml26124_companding);
static SOC_ENUM_SINGLE_DECL(ml26124_dac_companding_enum,
ML26124_SAI_RCV_CTL, 6, ml26124_companding);
static const struct snd_kcontrol_new ml26124_snd_controls[] = …;
static const struct snd_kcontrol_new ml26124_output_mixer_controls[] = …;
static const char * const ml26124_input_select[] = …;
static SOC_ENUM_SINGLE_DECL(ml26124_insel_enum,
ML26124_MIC_IF_CTL, 0, ml26124_input_select);
static const struct snd_kcontrol_new ml26124_input_mux_controls = …;
static const struct snd_kcontrol_new ml26124_line_control = …;
static const struct snd_soc_dapm_widget ml26124_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ml26124_intercon[] = …;
static const struct clk_coeff coeff_div[] = …;
static const struct reg_default ml26124_reg[] = …;
static inline int get_srate(int rate)
{ … }
static inline int get_coeff(int mclk, int rate)
{ … }
static int ml26124_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params,
struct snd_soc_dai *dai)
{ … }
static int ml26124_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int ml26124_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{ … }
static int ml26124_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int ml26124_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static const struct snd_soc_dai_ops ml26124_dai_ops = …;
static struct snd_soc_dai_driver ml26124_dai = …;
static int ml26124_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_ml26124 = …;
static const struct regmap_config ml26124_i2c_regmap = …;
static int ml26124_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id ml26124_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, ml26124_i2c_id);
static struct i2c_driver ml26124_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;