#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/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/wm8955.h>
#include "wm8955.h"
#define WM8955_NUM_SUPPLIES …
static const char *wm8955_supply_names[WM8955_NUM_SUPPLIES] = …;
struct wm8955_priv { … };
static const struct reg_default wm8955_reg_defaults[] = …;
static bool wm8955_writeable(struct device *dev, unsigned int reg)
{ … }
static bool wm8955_volatile(struct device *dev, unsigned int reg)
{ … }
static int wm8955_reset(struct snd_soc_component *component)
{ … }
struct pll_factors { … };
#define FIXED_FLL_SIZE …
static int wm8955_pll_factors(struct device *dev,
int Fref, int Fout, struct pll_factors *pll)
{ … }
static struct { … } clock_cfgs[] = …;
static int wm8955_configure_clocking(struct snd_soc_component *component)
{ … }
static int wm8955_sysclk(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int deemph_settings[] = …;
static int wm8955_set_deemph(struct snd_soc_component *component)
{ … }
static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const char *bass_mode_text[] = …;
static SOC_ENUM_SINGLE_DECL(bass_mode, WM8955_BASS_CONTROL, 7, bass_mode_text);
static const char *bass_cutoff_text[] = …;
static SOC_ENUM_SINGLE_DECL(bass_cutoff, WM8955_BASS_CONTROL, 6,
bass_cutoff_text);
static const char *treble_cutoff_text[] = …;
static SOC_ENUM_SINGLE_DECL(treble_cutoff, WM8955_TREBLE_CONTROL, 2,
treble_cutoff_text);
static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(atten_tlv, -600, 600, 0);
static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
static const DECLARE_TLV_DB_SCALE(mono_tlv, -2100, 300, 0);
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(treble_tlv, -1200, 150, 1);
static const struct snd_kcontrol_new wm8955_snd_controls[] = …;
static const struct snd_kcontrol_new lmixer[] = …;
static const struct snd_kcontrol_new rmixer[] = …;
static const struct snd_kcontrol_new mmixer[] = …;
static const struct snd_soc_dapm_widget wm8955_dapm_widgets[] = …;
static const struct snd_soc_dapm_route wm8955_dapm_routes[] = …;
static int wm8955_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int wm8955_set_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir)
{ … }
static int wm8955_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int wm8955_mute(struct snd_soc_dai *codec_dai, int mute, int direction)
{ … }
static int wm8955_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
#define WM8955_RATES …
#define WM8955_FORMATS …
static const struct snd_soc_dai_ops wm8955_dai_ops = …;
static struct snd_soc_dai_driver wm8955_dai = …;
static int wm8955_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_wm8955 = …;
static const struct regmap_config wm8955_regmap = …;
static int wm8955_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id wm8955_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, wm8955_i2c_id);
static struct i2c_driver wm8955_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;