#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#define TDA7419_MAIN_SRC_REG …
#define TDA7419_LOUDNESS_REG …
#define TDA7419_MUTE_CLK_REG …
#define TDA7419_VOLUME_REG …
#define TDA7419_TREBLE_REG …
#define TDA7419_MIDDLE_REG …
#define TDA7419_BASS_REG …
#define TDA7419_SECOND_SRC_REG …
#define TDA7419_SUB_MID_BASS_REG …
#define TDA7419_MIXING_GAIN_REG …
#define TDA7419_ATTENUATOR_LF_REG …
#define TDA7419_ATTENUATOR_RF_REG …
#define TDA7419_ATTENUATOR_LR_REG …
#define TDA7419_ATTENUATOR_RR_REG …
#define TDA7419_MIXING_LEVEL_REG …
#define TDA7419_ATTENUATOR_SUB_REG …
#define TDA7419_SA_CLK_AC_REG …
#define TDA7419_TESTING_REG …
#define TDA7419_MAIN_SRC_SEL …
#define TDA7419_MAIN_SRC_GAIN …
#define TDA7419_MAIN_SRC_AUTOZERO …
#define TDA7419_LOUDNESS_ATTEN …
#define TDA7419_LOUDNESS_CENTER_FREQ …
#define TDA7419_LOUDNESS_BOOST …
#define TDA7419_LOUDNESS_SOFT_STEP …
#define TDA7419_VOLUME_SOFT_STEP …
#define TDA7419_SOFT_MUTE …
#define TDA7419_MUTE_INFLUENCE …
#define TDA7419_SOFT_MUTE_TIME …
#define TDA7419_SOFT_STEP_TIME …
#define TDA7419_CLK_FAST_MODE …
#define TDA7419_TREBLE_CENTER_FREQ …
#define TDA7419_REF_OUT_SELECT …
#define TDA7419_MIDDLE_Q_FACTOR …
#define TDA7419_MIDDLE_SOFT_STEP …
#define TDA7419_BASS_Q_FACTOR …
#define TDA7419_BASS_SOFT_STEP …
#define TDA7419_SECOND_SRC_SEL …
#define TDA7419_SECOND_SRC_GAIN …
#define TDA7419_REAR_SPKR_SRC …
#define TDA7419_SUB_CUT_OFF_FREQ …
#define TDA7419_MIDDLE_CENTER_FREQ …
#define TDA7419_BASS_CENTER_FREQ …
#define TDA7419_BASS_DC_MODE …
#define TDA7419_SMOOTHING_FILTER …
#define TDA7419_MIX_LF …
#define TDA7419_MIX_RF …
#define TDA7419_MIX_ENABLE …
#define TDA7419_SUB_ENABLE …
#define TDA7419_HPF_GAIN …
#define TDA7419_SA_Q_FACTOR …
#define TDA7419_RESET_MODE …
#define TDA7419_SA_SOURCE …
#define TDA7419_SA_RUN …
#define TDA7419_RESET …
#define TDA7419_CLK_SOURCE …
#define TDA7419_COUPLING_MODE …
struct tda7419_data { … };
static bool tda7419_readable_reg(struct device *dev, unsigned int reg)
{ … }
static const struct reg_default tda7419_regmap_defaults[] = …;
static const struct regmap_config tda7419_regmap_config = …;
struct tda7419_vol_control { … };
static inline bool tda7419_vol_is_stereo(struct tda7419_vol_control *tvc)
{ … }
static int tda7419_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static inline int tda7419_vol_get_value(int val, unsigned int mask,
int min, int thresh,
unsigned int invert)
{ … }
static int tda7419_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static inline int tda7419_vol_put_value(int val, int thresh,
unsigned int invert)
{ … }
static int tda7419_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define TDA7419_SINGLE_VALUE(xreg, xmask, xmin, xmax, xthresh, xinvert) …
#define TDA7419_DOUBLE_R_VALUE(xregl, xregr, xmask, xmin, xmax, xthresh, \
xinvert) …
#define TDA7419_SINGLE_TLV(xname, xreg, xmask, xmin, xmax, xthresh, \
xinvert, xtlv_array) …
#define TDA7419_DOUBLE_R_TLV(xname, xregl, xregr, xmask, xmin, xmax, \
xthresh, xinvert, xtlv_array) …
static const char * const enum_src_sel[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_main_src_sel,
TDA7419_MAIN_SRC_REG, TDA7419_MAIN_SRC_SEL, enum_src_sel);
static const struct snd_kcontrol_new soc_mux_main_src_sel = …;
static DECLARE_TLV_DB_SCALE(tlv_src_gain, 0, 100, 0);
static DECLARE_TLV_DB_SCALE(tlv_loudness_atten, -1500, 100, 0);
static const char * const enum_loudness_center_freq[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_loudness_center_freq,
TDA7419_LOUDNESS_REG, TDA7419_LOUDNESS_CENTER_FREQ,
enum_loudness_center_freq);
static const char * const enum_mute_influence[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_mute_influence,
TDA7419_MUTE_CLK_REG, TDA7419_MUTE_INFLUENCE, enum_mute_influence);
static const char * const enum_soft_mute_time[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_soft_mute_time,
TDA7419_MUTE_CLK_REG, TDA7419_SOFT_MUTE_TIME, enum_soft_mute_time);
static const char * const enum_soft_step_time[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_soft_step_time,
TDA7419_MUTE_CLK_REG, TDA7419_SOFT_STEP_TIME, enum_soft_step_time);
static DECLARE_TLV_DB_SCALE(tlv_volume, -8000, 100, 1);
static const char * const enum_treble_center_freq[] = …;
static DECLARE_TLV_DB_SCALE(tlv_filter, -1500, 100, 0);
static SOC_ENUM_SINGLE_DECL(soc_enum_treble_center_freq,
TDA7419_TREBLE_REG, TDA7419_TREBLE_CENTER_FREQ,
enum_treble_center_freq);
static const char * const enum_ref_out_select[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_ref_out_select,
TDA7419_TREBLE_REG, TDA7419_REF_OUT_SELECT, enum_ref_out_select);
static const char * const enum_middle_q_factor[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_middle_q_factor,
TDA7419_MIDDLE_REG, TDA7419_MIDDLE_Q_FACTOR, enum_middle_q_factor);
static const char * const enum_bass_q_factor[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_bass_q_factor,
TDA7419_BASS_REG, TDA7419_BASS_Q_FACTOR, enum_bass_q_factor);
static SOC_ENUM_SINGLE_DECL(soc_enum_second_src_sel,
TDA7419_SECOND_SRC_REG, TDA7419_SECOND_SRC_SEL, enum_src_sel);
static const struct snd_kcontrol_new soc_mux_second_src_sel = …;
static const char * const enum_rear_spkr_src[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_rear_spkr_src,
TDA7419_SECOND_SRC_REG, TDA7419_REAR_SPKR_SRC, enum_rear_spkr_src);
static const struct snd_kcontrol_new soc_mux_rear_spkr_src = …;
static const char * const enum_sub_cut_off_freq[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_sub_cut_off_freq,
TDA7419_SUB_MID_BASS_REG, TDA7419_SUB_CUT_OFF_FREQ,
enum_sub_cut_off_freq);
static const char * const enum_middle_center_freq[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_middle_center_freq,
TDA7419_SUB_MID_BASS_REG, TDA7419_MIDDLE_CENTER_FREQ,
enum_middle_center_freq);
static const char * const enum_bass_center_freq[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_bass_center_freq,
TDA7419_SUB_MID_BASS_REG, TDA7419_BASS_CENTER_FREQ,
enum_bass_center_freq);
static const char * const enum_sa_q_factor[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_sa_q_factor,
TDA7419_SA_CLK_AC_REG, TDA7419_SA_Q_FACTOR, enum_sa_q_factor);
static const char * const enum_reset_mode[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_reset_mode,
TDA7419_SA_CLK_AC_REG, TDA7419_RESET_MODE, enum_reset_mode);
static const char * const enum_sa_src[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_sa_src,
TDA7419_SA_CLK_AC_REG, TDA7419_SA_SOURCE, enum_sa_src);
static const char * const enum_clk_src[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_clk_src,
TDA7419_SA_CLK_AC_REG, TDA7419_CLK_SOURCE, enum_clk_src);
static const char * const enum_coupling_mode[] = …;
static SOC_ENUM_SINGLE_DECL(soc_enum_coupling_mode,
TDA7419_SA_CLK_AC_REG, TDA7419_COUPLING_MODE, enum_coupling_mode);
static struct snd_kcontrol_new tda7419_controls[] = …;
static const struct snd_kcontrol_new soc_mixer_lf_output_controls[] = …;
static const struct snd_kcontrol_new soc_mixer_rf_output_controls[] = …;
static const struct snd_kcontrol_new soc_mix_enable_switch_controls[] = …;
static const struct snd_kcontrol_new soc_sub_enable_switch_controls[] = …;
static const struct snd_soc_dapm_widget tda7419_dapm_widgets[] = …;
static const struct snd_soc_dapm_route tda7419_dapm_routes[] = …;
static const struct snd_soc_component_driver tda7419_component_driver = …;
static int tda7419_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id tda7419_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, tda7419_i2c_id);
static const struct of_device_id tda7419_of_match[] = …;
static struct i2c_driver tda7419_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;