#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/platform_device.h>
#include <linux/firmware.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 "rt1305.h"
#define RT1305_PR_RANGE_BASE …
#define RT1305_PR_SPACING …
#define RT1305_PR_BASE …
static const struct regmap_range_cfg rt1305_ranges[] = …;
static const struct reg_sequence init_list[] = …;
#define RT1305_INIT_REG_LEN …
struct rt1305_priv { … };
static const struct reg_default rt1305_reg[] = …;
static int rt1305_reg_init(struct snd_soc_component *component)
{ … }
static bool rt1305_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1305_readable_register(struct device *dev, unsigned int reg)
{ … }
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9435, 37, 0);
static const char * const rt1305_rx_data_ch_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1305_rx_data_ch_enum, RT1305_I2S_SET_2, 2,
rt1305_rx_data_ch_select);
static void rt1305_reset(struct regmap *regmap)
{ … }
static const struct snd_kcontrol_new rt1305_snd_controls[] = …;
static int rt1305_is_rc_clk_from_pll(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static int rt1305_is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static int rt1305_classd_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const struct snd_kcontrol_new rt1305_sto_dac_l = …;
static const struct snd_kcontrol_new rt1305_sto_dac_r = …;
static const struct snd_soc_dapm_widget rt1305_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1305_dapm_routes[] = …;
static int rt1305_get_clk_info(int sclk, int rate)
{ … }
static int rt1305_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1305_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rt1305_set_component_sysclk(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq, int dir)
{ … }
static int rt1305_set_component_pll(struct snd_soc_component *component,
int pll_id, int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static int rt1305_probe(struct snd_soc_component *component)
{ … }
static void rt1305_remove(struct snd_soc_component *component)
{ … }
#ifdef CONFIG_PM
static int rt1305_suspend(struct snd_soc_component *component)
{ … }
static int rt1305_resume(struct snd_soc_component *component)
{ … }
#else
#define rt1305_suspend …
#define rt1305_resume …
#endif
#define RT1305_STEREO_RATES …
#define RT1305_FORMATS …
static const struct snd_soc_dai_ops rt1305_aif_dai_ops = …;
static struct snd_soc_dai_driver rt1305_dai[] = …;
static const struct snd_soc_component_driver soc_component_dev_rt1305 = …;
static const struct regmap_config rt1305_regmap = …;
#if defined(CONFIG_OF)
static const struct of_device_id rt1305_of_match[] = …;
MODULE_DEVICE_TABLE(of, rt1305_of_match);
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id rt1305_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, rt1305_acpi_match);
#endif
static const struct i2c_device_id rt1305_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt1305_i2c_id);
static void rt1305_calibrate(struct rt1305_priv *rt1305)
{ … }
static int rt1305_i2c_probe(struct i2c_client *i2c)
{ … }
static void rt1305_i2c_shutdown(struct i2c_client *client)
{ … }
static struct i2c_driver rt1305_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;