#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/atmel_pdc.h>
#include <linux/atmel-ssc.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <sound/soc.h>
#include "atmel-pcm.h"
#include "atmel_ssc_dai.h"
#define NUM_SSC_DEVICES …
static struct atmel_pdc_regs pdc_tx_reg = …;
static struct atmel_pdc_regs pdc_rx_reg = …;
static struct atmel_ssc_mask ssc_tx_mask = …;
static struct atmel_ssc_mask ssc_rx_mask = …;
static struct atmel_pcm_dma_params ssc_dma_params[NUM_SSC_DEVICES][2] = …;
static struct atmel_ssc_info ssc_info[NUM_SSC_DEVICES] = …;
static irqreturn_t atmel_ssc_interrupt(int irq, void *dev_id)
{ … }
static int atmel_ssc_hw_rule_rate(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int atmel_ssc_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void atmel_ssc_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int atmel_ssc_set_dai_fmt(struct snd_soc_dai *cpu_dai,
unsigned int fmt)
{ … }
static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
int div_id, int div)
{ … }
static int atmel_ssc_cfs(struct atmel_ssc_info *ssc_p)
{ … }
static int atmel_ssc_cbs(struct atmel_ssc_info *ssc_p)
{ … }
static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int atmel_ssc_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int atmel_ssc_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{ … }
static int atmel_ssc_suspend(struct snd_soc_component *component)
{ … }
static int atmel_ssc_resume(struct snd_soc_component *component)
{ … }
#define ATMEL_SSC_FORMATS …
static const struct snd_soc_dai_ops atmel_ssc_dai_ops = …;
static struct snd_soc_dai_driver atmel_ssc_dai = …;
static const struct snd_soc_component_driver atmel_ssc_component = …;
static int asoc_ssc_init(struct device *dev)
{ … }
int atmel_ssc_set_audio(int ssc_id)
{ … }
EXPORT_SYMBOL_GPL(…);
void atmel_ssc_put_audio(int ssc_id)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;