#include <linux/clk.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <sound/initval.h>
#include <sound/control.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <linux/atmel-ssc.h>
#include <linux/spi/spi.h>
#include <linux/spi/at73c213.h>
#include "at73c213.h"
#define BITRATE_MIN …
#define BITRATE_TARGET …
#define BITRATE_MAX …
static const u8 snd_at73c213_original_image[18] = …;
struct snd_at73c213 { … };
#define get_chip(card) …
static int
snd_at73c213_write_reg(struct snd_at73c213 *chip, u8 reg, u8 val)
{ … }
static struct snd_pcm_hardware snd_at73c213_playback_hw = …;
static int snd_at73c213_set_bitrate(struct snd_at73c213 *chip)
{ … }
static int snd_at73c213_pcm_open(struct snd_pcm_substream *substream)
{ … }
static int snd_at73c213_pcm_close(struct snd_pcm_substream *substream)
{ … }
static int snd_at73c213_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{ … }
static int snd_at73c213_pcm_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_at73c213_pcm_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static snd_pcm_uframes_t
snd_at73c213_pcm_pointer(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_ops at73c213_playback_ops = …;
static int snd_at73c213_pcm_new(struct snd_at73c213 *chip, int device)
{ … }
static irqreturn_t snd_at73c213_interrupt(int irq, void *dev_id)
{ … }
static int snd_at73c213_mono_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_at73c213_mono_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_at73c213_stereo_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_at73c213_stereo_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_at73c213_stereo_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define snd_at73c213_mono_switch_info …
static int snd_at73c213_mono_switch_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_at73c213_mono_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_at73c213_pa_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_at73c213_line_capture_volume_info(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_at73c213_aux_capture_volume_info(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
#define AT73C213_MONO_SWITCH(xname, xindex, reg, shift, mask, invert) …
#define AT73C213_STEREO(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) …
static const struct snd_kcontrol_new snd_at73c213_controls[] = …;
static int snd_at73c213_mixer(struct snd_at73c213 *chip)
{ … }
static int snd_at73c213_ssc_init(struct snd_at73c213 *chip)
{ … }
static int snd_at73c213_chip_init(struct snd_at73c213 *chip)
{ … }
static int snd_at73c213_dev_free(struct snd_device *device)
{ … }
static int snd_at73c213_dev_init(struct snd_card *card,
struct spi_device *spi)
{ … }
static int snd_at73c213_probe(struct spi_device *spi)
{ … }
static void snd_at73c213_remove(struct spi_device *spi)
{ … }
static int snd_at73c213_suspend(struct device *dev)
{ … }
static int snd_at73c213_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(at73c213_pm_ops, snd_at73c213_suspend,
snd_at73c213_resume);
static struct spi_driver at73c213_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;