#include <linux/acpi.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/firmware.h>
#include <linux/gpio.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 <sound/rt1318.h>
#include "rt1318.h"
static struct reg_sequence init_list[] = …;
#define rt1318_INIT_REG_LEN …
static const struct reg_default rt1318_reg[] = …;
static bool rt1318_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1318_readable_register(struct device *dev, unsigned int reg)
{ … }
static int rt1318_dac_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int rt1318_dvol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int rt1318_dvol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new rt1318_snd_controls[] = …;
static const struct snd_soc_dapm_widget rt1318_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1318_dapm_routes[] = …;
static int rt1318_get_clk_info(int sclk, int rate)
{ … }
static int rt1318_clk_ip_info(struct snd_soc_component *component, int lrclk)
{ … }
static int rt1318_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1318_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rt1318_set_dai_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static const struct pll_calc_map pll_preset_table[] = …;
static int rt1318_pll_calc(const unsigned int freq_in,
const unsigned int freq_out, struct rt1318_pll_code *pll_code)
{ … }
static int rt1318_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
unsigned int freq_in, unsigned int freq_out)
{ … }
static int rt1318_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int slot_width)
{ … }
static int rt1318_probe(struct snd_soc_component *component)
{ … }
static void rt1318_remove(struct snd_soc_component *component)
{ … }
#ifdef CONFIG_PM
static int rt1318_suspend(struct snd_soc_component *component)
{ … }
static int rt1318_resume(struct snd_soc_component *component)
{ … }
#else
#define rt1318_suspend …
#define rt1318_resume …
#endif
#define RT1318_STEREO_RATES …
#define RT1318_FORMATS …
static const struct snd_soc_dai_ops rt1318_aif_dai_ops = …;
static struct snd_soc_dai_driver rt1318_dai[] = …;
static const struct snd_soc_component_driver soc_component_dev_rt1318 = …;
static const struct regmap_config rt1318_regmap = …;
static const struct i2c_device_id rt1318_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt1318_i2c_id);
static const struct of_device_id rt1318_of_match[] = …;
MODULE_DEVICE_TABLE(of, rt1318_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id rt1318_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, rt1318_acpi_match);
#endif
static int rt1318_parse_dt(struct rt1318_priv *rt1318, struct device *dev)
{ … }
static void rt1318_calibration_sequence(struct rt1318_priv *rt1318)
{ … }
static void rt1318_r0_calculate(struct rt1318_priv *rt1318)
{ … }
static void rt1318_r0_restore(struct rt1318_priv *rt1318)
{ … }
static int rt1318_calibrate(struct rt1318_priv *rt1318)
{ … }
static void rt1318_calibration_work(struct work_struct *work)
{ … }
static int rt1318_i2c_probe(struct i2c_client *i2c)
{ … }
static struct i2c_driver rt1318_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;