#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/sysfs.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 "tlv320aic26.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
struct aic26 { … };
static const struct snd_soc_dapm_widget tlv320aic26_dapm_widgets[] = …;
static const struct snd_soc_dapm_route tlv320aic26_dapm_routes[] = …;
static int aic26_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int aic26_mute(struct snd_soc_dai *dai, int mute, int direction)
{ … }
static int aic26_set_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{ … }
#define AIC26_RATES …
#define AIC26_FORMATS …
static const struct snd_soc_dai_ops aic26_dai_ops = …;
static struct snd_soc_dai_driver aic26_dai = …;
static const char *aic26_capture_src_text[] = …;
static SOC_ENUM_SINGLE_DECL(aic26_capture_src_enum,
AIC26_REG_AUDIO_CTRL1, 12,
aic26_capture_src_text);
static const struct snd_kcontrol_new aic26_snd_controls[] = …;
static ssize_t keyclick_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t keyclick_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(keyclick);
static int aic26_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver aic26_soc_component_dev = …;
static const struct regmap_config aic26_regmap = …;
static int aic26_spi_probe(struct spi_device *spi)
{ … }
static struct spi_driver aic26_spi = …;
module_spi_driver(…) …;