#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/acpi.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 "rt1308.h"
static const struct reg_sequence init_list[] = …;
#define RT1308_INIT_REG_LEN …
struct rt1308_priv { … };
static const struct reg_default rt1308_reg[] = …;
static int rt1308_reg_init(struct snd_soc_component *component)
{ … }
static bool rt1308_volatile_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1308_readable_register(struct device *dev, unsigned int reg)
{ … }
static int rt1308_classd_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const char * const rt1308_rx_data_ch_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1308_rx_data_ch_enum, RT1308_DATA_PATH, 24,
rt1308_rx_data_ch_select);
static const struct snd_kcontrol_new rt1308_snd_controls[] = …;
static const struct snd_kcontrol_new rt1308_sto_dac_l = …;
static const struct snd_kcontrol_new rt1308_sto_dac_r = …;
static const struct snd_soc_dapm_widget rt1308_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1308_dapm_routes[] = …;
static int rt1308_get_clk_info(int sclk, int rate)
{ … }
static int rt1308_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1308_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rt1308_set_component_sysclk(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq, int dir)
{ … }
static int rt1308_set_component_pll(struct snd_soc_component *component,
int pll_id, int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static int rt1308_probe(struct snd_soc_component *component)
{ … }
static void rt1308_remove(struct snd_soc_component *component)
{ … }
#ifdef CONFIG_PM
static int rt1308_suspend(struct snd_soc_component *component)
{ … }
static int rt1308_resume(struct snd_soc_component *component)
{ … }
#else
#define rt1308_suspend …
#define rt1308_resume …
#endif
#define RT1308_STEREO_RATES …
#define RT1308_FORMATS …
static const struct snd_soc_dai_ops rt1308_aif_dai_ops = …;
static struct snd_soc_dai_driver rt1308_dai[] = …;
static const struct snd_soc_component_driver soc_component_dev_rt1308 = …;
static const struct regmap_config rt1308_regmap = …;
#ifdef CONFIG_OF
static const struct of_device_id rt1308_of_match[] = …;
MODULE_DEVICE_TABLE(of, rt1308_of_match);
#endif
#ifdef CONFIG_ACPI
static const struct acpi_device_id rt1308_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, rt1308_acpi_match);
#endif
static const struct i2c_device_id rt1308_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, rt1308_i2c_id);
static void rt1308_efuse(struct rt1308_priv *rt1308)
{ … }
static int rt1308_i2c_probe(struct i2c_client *i2c)
{ … }
static void rt1308_i2c_shutdown(struct i2c_client *client)
{ … }
static struct i2c_driver rt1308_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;