#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
#include <linux/mfd/wm8350/audio.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/regulator/consumer.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 <trace/events/asoc.h>
#include "wm8350.h"
#define WM8350_OUTn_0dB …
#define WM8350_RAMP_NONE …
#define WM8350_RAMP_UP …
#define WM8350_RAMP_DOWN …
static const char *supply_names[] = …;
struct wm8350_output { … };
struct wm8350_jack_data { … };
struct wm8350_data { … };
static inline int wm8350_out1_ramp_step(struct wm8350_data *wm8350_data)
{ … }
static inline int wm8350_out2_ramp_step(struct wm8350_data *wm8350_data)
{ … }
static void wm8350_pga_work(struct work_struct *work)
{ … }
static int pga_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm8350_get_volsw_2r(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const char *wm8350_deemp[] = …;
static const char *wm8350_pol[] = …;
static const char *wm8350_dacmutem[] = …;
static const char *wm8350_dacmutes[] = …;
static const char *wm8350_adcfilter[] = …;
static const char *wm8350_adchp[] = …;
static const char *wm8350_lr[] = …;
static const struct soc_enum wm8350_enum[] = …;
static DECLARE_TLV_DB_SCALE(pre_amp_tlv, -1200, 3525, 0);
static DECLARE_TLV_DB_SCALE(out_pga_tlv, -5700, 600, 0);
static DECLARE_TLV_DB_SCALE(dac_pcm_tlv, -7163, 36, 1);
static DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -12700, 50, 1);
static DECLARE_TLV_DB_SCALE(out_mix_tlv, -1500, 300, 1);
static const DECLARE_TLV_DB_RANGE(capture_sd_tlv,
0, 12, TLV_DB_SCALE_ITEM(-3600, 300, 1),
13, 15, TLV_DB_SCALE_ITEM(0, 0, 0)
);
static const struct snd_kcontrol_new wm8350_snd_controls[] = …;
static const struct snd_kcontrol_new wm8350_left_play_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_right_play_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_out4_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_out3_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_left_capt_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_right_capt_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_left_mic_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_right_mic_mixer_controls[] = …;
static const struct snd_kcontrol_new wm8350_beep_switch_controls = …;
static const struct snd_kcontrol_new wm8350_out4_capture_controls = …;
static const struct snd_soc_dapm_widget wm8350_dapm_widgets[] = …;
static const struct snd_soc_dapm_route wm8350_dapm_routes[] = …;
static int wm8350_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int wm8350_set_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div)
{ … }
static int wm8350_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ … }
static int wm8350_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *codec_dai)
{ … }
static int wm8350_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
struct _fll_div { … };
#define FIXED_FLL_SIZE …
static inline int fll_factors(struct _fll_div *fll_div, unsigned int input,
unsigned int output)
{ … }
static int wm8350_set_fll(struct snd_soc_dai *codec_dai,
int pll_id, int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static int wm8350_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static void wm8350_hp_work(struct wm8350_data *priv,
struct wm8350_jack_data *jack,
u16 mask)
{ … }
static void wm8350_hpl_work(struct work_struct *work)
{ … }
static void wm8350_hpr_work(struct work_struct *work)
{ … }
static irqreturn_t wm8350_hpl_jack_handler(int irq, void *data)
{ … }
static irqreturn_t wm8350_hpr_jack_handler(int irq, void *data)
{ … }
int wm8350_hp_jack_detect(struct snd_soc_component *component, enum wm8350_jack which,
struct snd_soc_jack *jack, int report)
{ … }
EXPORT_SYMBOL_GPL(…);
static irqreturn_t wm8350_mic_handler(int irq, void *data)
{ … }
int wm8350_mic_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack,
int detect_report, int short_report)
{ … }
EXPORT_SYMBOL_GPL(…);
#define WM8350_RATES …
#define WM8350_FORMATS …
static const struct snd_soc_dai_ops wm8350_dai_ops = …;
static struct snd_soc_dai_driver wm8350_dai = …;
static int wm8350_component_probe(struct snd_soc_component *component)
{ … }
static void wm8350_component_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_wm8350 = …;
static int wm8350_probe(struct platform_device *pdev)
{ … }
static struct platform_driver wm8350_codec_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;