#include <linux/clk.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/tlv.h>
#define STA529_FFXCFG0 …
#define STA529_FFXCFG1 …
#define STA529_MVOL …
#define STA529_LVOL …
#define STA529_RVOL …
#define STA529_TTF0 …
#define STA529_TTF1 …
#define STA529_TTP0 …
#define STA529_TTP1 …
#define STA529_S2PCFG0 …
#define STA529_S2PCFG1 …
#define STA529_P2SCFG0 …
#define STA529_P2SCFG1 …
#define STA529_PLLCFG0 …
#define STA529_PLLCFG1 …
#define STA529_PLLCFG2 …
#define STA529_PLLCFG3 …
#define STA529_PLLPFE …
#define STA529_PLLST …
#define STA529_ADCCFG …
#define STA529_CKOCFG …
#define STA529_MISC …
#define STA529_PADST0 …
#define STA529_PADST1 …
#define STA529_FFXST …
#define STA529_PWMIN1 …
#define STA529_PWMIN2 …
#define STA529_POWST …
#define STA529_MAX_REGISTER …
#define STA529_RATES …
#define STA529_FORMAT …
#define S2PC_VALUE …
#define CLOCK_OUT …
#define DATA_FORMAT_MSK …
#define LEFT_J_DATA_FORMAT …
#define I2S_DATA_FORMAT …
#define RIGHT_J_DATA_FORMAT …
#define CODEC_MUTE_VAL …
#define POWER_CNTLMSAK …
#define POWER_STDBY …
#define FFX_MASK …
#define FFX_OFF …
#define POWER_UP …
#define FFX_CLK_ENB …
#define FFX_CLK_DIS …
#define FFX_CLK_MSK …
#define PLAY_FREQ_RANGE_MSK …
#define CAP_FREQ_RANGE_MSK …
#define PDATA_LEN_MSK …
#define BCLK_TO_FS_MSK …
#define AUDIO_MUTE_MSK …
static const struct reg_default sta529_reg_defaults[] = …;
struct sta529 { … };
static bool sta529_readable(struct device *dev, unsigned int reg)
{ … }
static const char *pwm_mode_text[] = …;
static const DECLARE_TLV_DB_SCALE(out_gain_tlv, -9150, 50, 0);
static const DECLARE_TLV_DB_SCALE(master_vol_tlv, -12750, 50, 0);
static SOC_ENUM_SINGLE_DECL(pwm_src, STA529_FFXCFG1, 4, pwm_mode_text);
static const struct snd_kcontrol_new sta529_snd_controls[] = …;
static int sta529_set_bias_level(struct snd_soc_component *component, enum
snd_soc_bias_level level)
{ … }
static int sta529_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int sta529_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int sta529_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
{ … }
static const struct snd_soc_dai_ops sta529_dai_ops = …;
static struct snd_soc_dai_driver sta529_dai = …;
static const struct snd_soc_component_driver sta529_component_driver = …;
static const struct regmap_config sta529_regmap = …;
static int sta529_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id sta529_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, sta529_i2c_id);
static const struct of_device_id sta529_of_match[] = …;
MODULE_DEVICE_TABLE(of, sta529_of_match);
static struct i2c_driver sta529_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;