#include <linux/module.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/time.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "mxs-saif.h"
#define MXS_SET_ADDR …
#define MXS_CLR_ADDR …
static struct mxs_saif *mxs_saif[2];
static int mxs_saif_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static inline struct mxs_saif *mxs_saif_get_master(struct mxs_saif * saif)
{ … }
static int mxs_saif_set_clk(struct mxs_saif *saif,
unsigned int mclk,
unsigned int rate)
{ … }
int mxs_saif_put_mclk(unsigned int saif_id)
{ … }
EXPORT_SYMBOL_GPL(…);
int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk,
unsigned int rate)
{ … }
EXPORT_SYMBOL_GPL(…);
static int mxs_saif_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
{ … }
static int mxs_saif_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{ … }
static void mxs_saif_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{ … }
static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *cpu_dai)
{ … }
static int mxs_saif_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{ … }
static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *cpu_dai)
{ … }
#define MXS_SAIF_RATES …
#define MXS_SAIF_FORMATS …
static const struct snd_soc_dai_ops mxs_saif_dai_ops = …;
static struct snd_soc_dai_driver mxs_saif_dai = …;
static const struct snd_soc_component_driver mxs_saif_component = …;
static irqreturn_t mxs_saif_irq(int irq, void *dev_id)
{ … }
static int mxs_saif_mclk_init(struct platform_device *pdev)
{ … }
static int mxs_saif_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id mxs_saif_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids);
static struct platform_driver mxs_saif_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;