#include <sound/soc.h>
#include <sound/tlv.h>
#include <sound/soc-dapm.h>
#include <sound/soc-dai.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/regmap.h>
#include <linux/device.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/io.h>
#include "inno_rk3036.h"
struct rk3036_codec_priv { … };
static const DECLARE_TLV_DB_MINMAX(rk3036_codec_hp_tlv, -39, 0);
static int rk3036_codec_antipop_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int rk3036_codec_antipop_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int rk3036_codec_antipop_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define SOC_RK3036_CODEC_ANTIPOP_DECL(xname) …
static const struct snd_kcontrol_new rk3036_codec_dapm_controls[] = …;
static const struct snd_kcontrol_new rk3036_codec_hpl_mixer_controls[] = …;
static const struct snd_kcontrol_new rk3036_codec_hpr_mixer_controls[] = …;
static const struct snd_kcontrol_new rk3036_codec_hpl_switch_controls[] = …;
static const struct snd_kcontrol_new rk3036_codec_hpr_switch_controls[] = …;
static const struct snd_soc_dapm_widget rk3036_codec_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rk3036_codec_dapm_routes[] = …;
static int rk3036_codec_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params,
struct snd_soc_dai *dai)
{ … }
#define RK3036_CODEC_RATES …
#define RK3036_CODEC_FMTS …
static const struct snd_soc_dai_ops rk3036_codec_dai_ops = …;
static struct snd_soc_dai_driver rk3036_codec_dai_driver[] = …;
static void rk3036_codec_reset(struct snd_soc_component *component)
{ … }
static int rk3036_codec_probe(struct snd_soc_component *component)
{ … }
static void rk3036_codec_remove(struct snd_soc_component *component)
{ … }
static int rk3036_codec_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static const struct snd_soc_component_driver rk3036_codec_driver = …;
static const struct regmap_config rk3036_codec_regmap_config = …;
#define GRF_SOC_CON0 …
#define GRF_ACODEC_SEL …
static int rk3036_codec_platform_probe(struct platform_device *pdev)
{ … }
static void rk3036_codec_platform_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id rk3036_codec_of_match[] __maybe_unused = …;
MODULE_DEVICE_TABLE(of, rk3036_codec_of_match);
static struct platform_driver rk3036_codec_platform_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;