#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/mfd/wm8994/registers.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 "wm8993.h"
#include "wm_hubs.h"
const DECLARE_TLV_DB_SCALE(wm_hubs_spkmix_tlv, -300, 300, 0);
EXPORT_SYMBOL_GPL(…);
static const DECLARE_TLV_DB_SCALE(inpga_tlv, -1650, 150, 0);
static const DECLARE_TLV_DB_SCALE(inmix_sw_tlv, 0, 3000, 0);
static const DECLARE_TLV_DB_SCALE(inmix_tlv, -1500, 300, 1);
static const DECLARE_TLV_DB_SCALE(earpiece_tlv, -600, 600, 0);
static const DECLARE_TLV_DB_SCALE(outmix_tlv, -2100, 300, 0);
static const DECLARE_TLV_DB_SCALE(spkmixout_tlv, -1800, 600, 1);
static const DECLARE_TLV_DB_SCALE(outpga_tlv, -5700, 100, 0);
static const DECLARE_TLV_DB_RANGE(spkboost_tlv,
0, 6, TLV_DB_SCALE_ITEM(0, 150, 0),
7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0)
);
static const DECLARE_TLV_DB_SCALE(line_tlv, -600, 600, 0);
static const char *speaker_ref_text[] = …;
static SOC_ENUM_SINGLE_DECL(speaker_ref,
WM8993_SPEAKER_MIXER, 8, speaker_ref_text);
static const char *speaker_mode_text[] = …;
static SOC_ENUM_SINGLE_DECL(speaker_mode,
WM8993_SPKMIXR_ATTENUATION, 8, speaker_mode_text);
static void wait_for_dc_servo(struct snd_soc_component *component, unsigned int op)
{ … }
irqreturn_t wm_hubs_dcs_done(int irq, void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool wm_hubs_dac_hp_direct(struct snd_soc_component *component)
{ … }
struct wm_hubs_dcs_cache { … };
static bool wm_hubs_dcs_cache_get(struct snd_soc_component *component,
struct wm_hubs_dcs_cache **entry)
{ … }
static void wm_hubs_dcs_cache_set(struct snd_soc_component *component, u16 dcs_cfg)
{ … }
static int wm_hubs_read_dc_servo(struct snd_soc_component *component,
u16 *reg_l, u16 *reg_r)
{ … }
static void enable_dc_servo(struct snd_soc_component *component)
{ … }
static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new analogue_snd_controls[] = …;
static int hp_supply_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int hp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int earpiece_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *control, int event)
{ … }
static int lineout_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *control, int event)
{ … }
static int micbias_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
void wm_hubs_update_class_w(struct snd_soc_component *component)
{ … }
EXPORT_SYMBOL_GPL(…);
#define WM_HUBS_SINGLE_W(xname, reg, shift, max, invert) …
static int class_w_put_volsw(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define WM_HUBS_ENUM_W(xname, xenum) …
static int class_w_put_double(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const char *hp_mux_text[] = …;
static SOC_ENUM_SINGLE_DECL(hpl_enum,
WM8993_OUTPUT_MIXER1, 8, hp_mux_text);
const struct snd_kcontrol_new wm_hubs_hpl_mux = …;
EXPORT_SYMBOL_GPL(…);
static SOC_ENUM_SINGLE_DECL(hpr_enum,
WM8993_OUTPUT_MIXER2, 8, hp_mux_text);
const struct snd_kcontrol_new wm_hubs_hpr_mux = …;
EXPORT_SYMBOL_GPL(…);
static const struct snd_kcontrol_new in1l_pga[] = …;
static const struct snd_kcontrol_new in1r_pga[] = …;
static const struct snd_kcontrol_new in2l_pga[] = …;
static const struct snd_kcontrol_new in2r_pga[] = …;
static const struct snd_kcontrol_new mixinl[] = …;
static const struct snd_kcontrol_new mixinr[] = …;
static const struct snd_kcontrol_new left_output_mixer[] = …;
static const struct snd_kcontrol_new right_output_mixer[] = …;
static const struct snd_kcontrol_new earpiece_mixer[] = …;
static const struct snd_kcontrol_new left_speaker_boost[] = …;
static const struct snd_kcontrol_new right_speaker_boost[] = …;
static const struct snd_kcontrol_new line1_mix[] = …;
static const struct snd_kcontrol_new line1n_mix[] = …;
static const struct snd_kcontrol_new line1p_mix[] = …;
static const struct snd_kcontrol_new line2_mix[] = …;
static const struct snd_kcontrol_new line2n_mix[] = …;
static const struct snd_kcontrol_new line2p_mix[] = …;
static const struct snd_soc_dapm_widget analogue_dapm_widgets[] = …;
static const struct snd_soc_dapm_route analogue_routes[] = …;
static const struct snd_soc_dapm_route lineout1_diff_routes[] = …;
static const struct snd_soc_dapm_route lineout1_se_routes[] = …;
static const struct snd_soc_dapm_route lineout2_diff_routes[] = …;
static const struct snd_soc_dapm_route lineout2_se_routes[] = …;
int wm_hubs_add_analogue_controls(struct snd_soc_component *component)
{ … }
EXPORT_SYMBOL_GPL(…);
int wm_hubs_add_analogue_routes(struct snd_soc_component *component,
int lineout1_diff, int lineout2_diff)
{ … }
EXPORT_SYMBOL_GPL(…);
int wm_hubs_handle_analogue_pdata(struct snd_soc_component *component,
int lineout1_diff, int lineout2_diff,
int lineout1fb, int lineout2fb,
int jd_scthr, int jd_thr,
int micbias1_delay, int micbias2_delay,
int micbias1_lvl, int micbias2_lvl)
{ … }
EXPORT_SYMBOL_GPL(…);
void wm_hubs_vmid_ena(struct snd_soc_component *component)
{ … }
EXPORT_SYMBOL_GPL(…);
void wm_hubs_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;