#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/of.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#define PCM1681_PCM_FORMATS …
#define PCM1681_PCM_RATES …
#define PCM1681_SOFT_MUTE_ALL …
#define PCM1681_DEEMPH_RATE_MASK …
#define PCM1681_DEEMPH_MASK …
#define PCM1681_ATT_CONTROL(X) …
#define PCM1681_SOFT_MUTE …
#define PCM1681_DAC_CONTROL …
#define PCM1681_FMT_CONTROL …
#define PCM1681_DEEMPH_CONTROL …
#define PCM1681_ZERO_DETECT_STATUS …
static const struct reg_default pcm1681_reg_defaults[] = …;
static bool pcm1681_accessible_reg(struct device *dev, unsigned int reg)
{ … }
static bool pcm1681_writeable_reg(struct device *dev, unsigned int reg)
{ … }
struct pcm1681_private { … };
static const int pcm1681_deemph[] = …;
static int pcm1681_set_deemph(struct snd_soc_component *component)
{ … }
static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int format)
{ … }
static int pcm1681_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int pcm1681_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops pcm1681_dai_ops = …;
static const struct snd_soc_dapm_widget pcm1681_dapm_widgets[] = …;
static const struct snd_soc_dapm_route pcm1681_dapm_routes[] = …;
static const DECLARE_TLV_DB_SCALE(pcm1681_dac_tlv, -6350, 50, 1);
static const struct snd_kcontrol_new pcm1681_controls[] = …;
static struct snd_soc_dai_driver pcm1681_dai = …;
#ifdef CONFIG_OF
static const struct of_device_id pcm1681_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, pcm1681_dt_ids);
#endif
static const struct regmap_config pcm1681_regmap = …;
static const struct snd_soc_component_driver soc_component_dev_pcm1681 = …;
static const struct i2c_device_id pcm1681_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, pcm1681_i2c_id);
static int pcm1681_i2c_probe(struct i2c_client *client)
{ … }
static struct i2c_driver pcm1681_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;