#include <linux/mod_devicetable.h>
#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/spi/spi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include "wm8776.h"
enum wm8776_chip_type { … };
struct wm8776_priv { … };
static const struct reg_default wm8776_reg_defaults[] = …;
static bool wm8776_volatile(struct device *dev, unsigned int reg)
{ … }
static int wm8776_reset(struct snd_soc_component *component)
{ … }
static const DECLARE_TLV_DB_SCALE(hp_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(adc_tlv, -10350, 50, 1);
static const struct snd_kcontrol_new wm8776_snd_controls[] = …;
static const struct snd_kcontrol_new inmix_controls[] = …;
static const struct snd_kcontrol_new outmix_controls[] = …;
static const struct snd_soc_dapm_widget wm8776_dapm_widgets[] = …;
static const struct snd_soc_dapm_route routes[] = …;
static int wm8776_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int mclk_ratios[] = …;
static int wm8776_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int wm8776_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int wm8776_set_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int wm8776_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
#define WM8776_FORMATS …
static const struct snd_soc_dai_ops wm8776_dac_ops = …;
static const struct snd_soc_dai_ops wm8776_adc_ops = …;
static struct snd_soc_dai_driver wm8776_dai[] = …;
static int wm8776_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_wm8776 = …;
static const struct of_device_id wm8776_of_match[] = …;
MODULE_DEVICE_TABLE(of, wm8776_of_match);
static const struct regmap_config wm8776_regmap = …;
#if defined(CONFIG_SPI_MASTER)
static int wm8776_spi_probe(struct spi_device *spi)
{ … }
static struct spi_driver wm8776_spi_driver = …;
#endif
#if IS_ENABLED(CONFIG_I2C)
static int wm8776_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id wm8776_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, wm8776_i2c_id);
static struct i2c_driver wm8776_i2c_driver = …;
#endif
static int __init wm8776_modinit(void)
{ … }
module_init(…) …;
static void __exit wm8776_exit(void)
{ … }
module_exit(wm8776_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;