#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 <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 "rt1016.h"
static const struct reg_sequence rt1016_patch[] = …;
static const struct reg_default rt1016_reg[] = …;
static bool rt1016_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1016_readable_register(struct device *dev, unsigned int reg)
{ … }
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9550, 50, 0);
static const struct snd_kcontrol_new rt1016_snd_controls[] = …;
static int rt1016_is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
struct snd_soc_dapm_widget *sink)
{ … }
static const char * const rt1016_data_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1016_if_data_swap_enum,
RT1016_I2S_CTRL, RT1016_I2S_DATA_SWAP_SFT, rt1016_data_select);
static const struct snd_kcontrol_new rt1016_if_data_swap_mux = …;
static const struct snd_soc_dapm_widget rt1016_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1016_dapm_routes[] = …;
static int rt1016_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1016_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rt1016_set_component_sysclk(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq, int dir)
{ … }
static int rt1016_set_component_pll(struct snd_soc_component *component,
int pll_id, int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static int rt1016_probe(struct snd_soc_component *component)
{ … }
static void rt1016_remove(struct snd_soc_component *component)
{ … }
#define RT1016_STEREO_RATES …
#define RT1016_FORMATS …
static const struct snd_soc_dai_ops rt1016_aif_dai_ops = …;
static struct snd_soc_dai_driver rt1016_dai[] = …;
#ifdef CONFIG_PM
static int rt1016_suspend(struct snd_soc_component *component)
{ … }
static int rt1016_resume(struct snd_soc_component *component)
{ … }
#else
#define rt1016_suspend …
#define rt1016_resume …
#endif
static const struct snd_soc_component_driver soc_component_dev_rt1016 = …;
static const struct regmap_config rt1016_regmap = …;
static const struct i2c_device_id rt1016_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt1016_i2c_id);
#if defined(CONFIG_OF)
static const struct of_device_id rt1016_of_match[] = …;
MODULE_DEVICE_TABLE(of, rt1016_of_match);
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id rt1016_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, rt1016_acpi_match);
#endif
static int rt1016_i2c_probe(struct i2c_client *i2c)
{ … }
static void rt1016_i2c_shutdown(struct i2c_client *client)
{ … }
static struct i2c_driver rt1016_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;