#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#include <linux/spi/spi.h>
#include <linux/regmap.h>
#include "ad1836.h"
enum ad1836_type { … };
struct ad1836_priv { … };
static const char *ad1836_deemp[] = …;
static SOC_ENUM_SINGLE_DECL(ad1836_deemp_enum,
AD1836_DAC_CTRL1, 8, ad1836_deemp);
#define AD1836_DAC_VOLUME(x) …
#define AD1836_DAC_SWITCH(x) …
#define AD1836_ADC_SWITCH(x) …
static const struct snd_kcontrol_new ad183x_dac_controls[] = …;
static const struct snd_soc_dapm_widget ad183x_dac_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ad183x_dac_routes[] = …;
static const struct snd_kcontrol_new ad183x_adc_controls[] = …;
static const struct snd_soc_dapm_widget ad183x_adc_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ad183x_adc_routes[] = …;
static const struct snd_kcontrol_new ad183x_controls[] = …;
static const struct snd_soc_dapm_widget ad183x_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ad183x_dapm_routes[] = …;
static const DECLARE_TLV_DB_SCALE(ad1836_in_tlv, 0, 300, 0);
static const struct snd_kcontrol_new ad1836_controls[] = …;
static int ad1836_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt)
{ … }
static int ad1836_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 ad1836_dai_ops = …;
#define AD183X_DAI(_name, num_dacs, num_adcs) …
static struct snd_soc_dai_driver ad183x_dais[] = …;
#ifdef CONFIG_PM
static int ad1836_suspend(struct snd_soc_component *component)
{ … }
static int ad1836_resume(struct snd_soc_component *component)
{ … }
#else
#define ad1836_suspend …
#define ad1836_resume …
#endif
static int ad1836_probe(struct snd_soc_component *component)
{ … }
static void ad1836_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_dev_ad1836 = …;
static const struct reg_default ad1836_reg_defaults[] = …;
static const struct regmap_config ad1836_regmap_config = …;
static int ad1836_spi_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id ad1836_ids[] = …;
MODULE_DEVICE_TABLE(spi, ad1836_ids);
static struct spi_driver ad1836_spi_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;