#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/of.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/acpi.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include "rl6231.h"
#include "rt5660.h"
#define RT5660_DEVICE_ID …
#define RT5660_PR_RANGE_BASE …
#define RT5660_PR_SPACING …
#define RT5660_PR_BASE …
static const struct regmap_range_cfg rt5660_ranges[] = …;
static const struct reg_sequence rt5660_patch[] = …;
static const struct reg_default rt5660_reg[] = …;
static bool rt5660_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool rt5660_readable_register(struct device *dev, unsigned int reg)
{ … }
static const DECLARE_TLV_DB_SCALE(rt5660_out_vol_tlv, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(rt5660_dac_vol_tlv, -6525, 75, 0);
static const DECLARE_TLV_DB_SCALE(rt5660_adc_vol_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(rt5660_adc_bst_tlv, 0, 1200, 0);
static const DECLARE_TLV_DB_SCALE(rt5660_bst_tlv, -1200, 75, 0);
static const struct snd_kcontrol_new rt5660_snd_controls[] = …;
static int rt5660_set_dmic_clk(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int rt5660_is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static const struct snd_kcontrol_new rt5660_sto1_adc_l_mix[] = …;
static const struct snd_kcontrol_new rt5660_sto1_adc_r_mix[] = …;
static const struct snd_kcontrol_new rt5660_dac_l_mix[] = …;
static const struct snd_kcontrol_new rt5660_dac_r_mix[] = …;
static const struct snd_kcontrol_new rt5660_sto_dac_l_mix[] = …;
static const struct snd_kcontrol_new rt5660_sto_dac_r_mix[] = …;
static const struct snd_kcontrol_new rt5660_rec_l_mix[] = …;
static const struct snd_kcontrol_new rt5660_rec_r_mix[] = …;
static const struct snd_kcontrol_new rt5660_spk_mix[] = …;
static const struct snd_kcontrol_new rt5660_out_l_mix[] = …;
static const struct snd_kcontrol_new rt5660_out_r_mix[] = …;
static const struct snd_kcontrol_new rt5660_spo_mix[] = …;
static const struct snd_kcontrol_new rt5660_lout_mix[] = …;
static const struct snd_kcontrol_new spk_vol_control = …;
static const struct snd_kcontrol_new lout_l_vol_control = …;
static const struct snd_kcontrol_new lout_r_vol_control = …;
static const char * const rt5660_data_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt5660_if1_dac_enum,
RT5660_DIG_INF1_DATA, RT5660_IF1_DAC_IN_SFT, rt5660_data_select);
static SOC_ENUM_SINGLE_DECL(rt5660_if1_adc_enum,
RT5660_DIG_INF1_DATA, RT5660_IF1_ADC_IN_SFT, rt5660_data_select);
static const struct snd_kcontrol_new rt5660_if1_dac_swap_mux = …;
static const struct snd_kcontrol_new rt5660_if1_adc_swap_mux = …;
static int rt5660_lout_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_soc_dapm_widget rt5660_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt5660_dapm_routes[] = …;
static int rt5660_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt5660_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rt5660_set_dai_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int rt5660_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
unsigned int freq_in, unsigned int freq_out)
{ … }
static int rt5660_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static int rt5660_probe(struct snd_soc_component *component)
{ … }
static void rt5660_remove(struct snd_soc_component *component)
{ … }
#ifdef CONFIG_PM
static int rt5660_suspend(struct snd_soc_component *component)
{ … }
static int rt5660_resume(struct snd_soc_component *component)
{ … }
#else
#define rt5660_suspend …
#define rt5660_resume …
#endif
#define RT5660_STEREO_RATES …
#define RT5660_FORMATS …
static const struct snd_soc_dai_ops rt5660_aif_dai_ops = …;
static struct snd_soc_dai_driver rt5660_dai[] = …;
static const struct snd_soc_component_driver soc_component_dev_rt5660 = …;
static const struct regmap_config rt5660_regmap = …;
static const struct i2c_device_id rt5660_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt5660_i2c_id);
#ifdef CONFIG_OF
static const struct of_device_id rt5660_of_match[] = …;
MODULE_DEVICE_TABLE(of, rt5660_of_match);
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id rt5660_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, rt5660_acpi_match);
#endif
static int rt5660_parse_dt(struct rt5660_priv *rt5660, struct device *dev)
{ … }
static int rt5660_i2c_probe(struct i2c_client *i2c)
{ … }
static struct i2c_driver rt5660_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;