#include <linux/clk.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/mfd/rk808.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
struct rk817_codec_priv { … };
static int rk817_init(struct snd_soc_component *component)
{ … }
static int rk817_set_component_pll(struct snd_soc_component *component,
int pll_id, int source, unsigned int freq_in,
unsigned int freq_out)
{ … }
static const DECLARE_TLV_DB_MINMAX(rk817_vol_tlv, -9500, 0);
static const DECLARE_TLV_DB_MINMAX(rk817_gain_tlv, -1800, 2700);
static const struct snd_kcontrol_new rk817_volume_controls[] = …;
static const char *dac_mux_text[] = …;
static SOC_ENUM_SINGLE_VIRT_DECL(dac_enum, dac_mux_text);
static const struct snd_kcontrol_new dac_mux = …;
static const struct snd_soc_dapm_widget rk817_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rk817_dapm_routes[] = …;
static int rk817_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int rk817_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{ … }
static int rk817_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
{ … }
#define RK817_PLAYBACK_RATES …
#define RK817_CAPTURE_RATES …
#define RK817_FORMATS …
static const struct snd_soc_dai_ops rk817_dai_ops = …;
static struct snd_soc_dai_driver rk817_dai[] = …;
static int rk817_probe(struct snd_soc_component *component)
{ … }
static void rk817_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_codec_dev_rk817 = …;
static void rk817_codec_parse_dt_property(struct device *dev,
struct rk817_codec_priv *rk817)
{ … }
static int rk817_platform_probe(struct platform_device *pdev)
{ … }
static void rk817_platform_remove(struct platform_device *pdev)
{ … }
static struct platform_driver rk817_codec_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;