#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/gpio/consumer.h>
#include <linux/regulator/consumer.h>
#include <sound/asoundef.h>
#include <sound/core.h>
#include <sound/soc.h>
#include <sound/initval.h>
#define AK4104_REG_CONTROL1 …
#define AK4104_REG_RESERVED …
#define AK4104_REG_CONTROL2 …
#define AK4104_REG_TX …
#define AK4104_REG_CHN_STATUS(x) …
#define AK4104_NUM_REGS …
#define AK4104_REG_MASK …
#define AK4104_READ …
#define AK4104_WRITE …
#define AK4104_RESERVED_VAL …
#define AK4104_CONTROL1_RSTN …
#define AK4104_CONTROL1_PW …
#define AK4104_CONTROL1_DIF0 …
#define AK4104_CONTROL1_DIF1 …
#define AK4104_CONTROL2_SEL0 …
#define AK4104_CONTROL2_SEL1 …
#define AK4104_CONTROL2_MODE …
#define AK4104_TX_TXE …
#define AK4104_TX_V …
struct ak4104_private { … };
static const struct snd_soc_dapm_widget ak4104_dapm_widgets[] = …;
static const struct snd_soc_dapm_route ak4104_dapm_routes[] = …;
static int ak4104_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int format)
{ … }
static int ak4104_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 ak4101_dai_ops = …;
static struct snd_soc_dai_driver ak4104_dai = …;
static int ak4104_probe(struct snd_soc_component *component)
{ … }
static void ak4104_remove(struct snd_soc_component *component)
{ … }
#ifdef CONFIG_PM
static int ak4104_soc_suspend(struct snd_soc_component *component)
{ … }
static int ak4104_soc_resume(struct snd_soc_component *component)
{ … }
#else
#define ak4104_soc_suspend …
#define ak4104_soc_resume …
#endif
static const struct snd_soc_component_driver soc_component_device_ak4104 = …;
static const struct regmap_config ak4104_regmap = …;
static int ak4104_spi_probe(struct spi_device *spi)
{ … }
static const struct of_device_id ak4104_of_match[] = …;
MODULE_DEVICE_TABLE(of, ak4104_of_match);
static const struct spi_device_id ak4104_id_table[] = …;
MODULE_DEVICE_TABLE(spi, ak4104_id_table);
static struct spi_driver ak4104_spi_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;