#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h>
#include "dma.h"
#include "spdif.h"
#define CLKCON …
#define CON …
#define BSTAS …
#define CSTAS …
#define DATA_OUTBUF …
#define DCNT …
#define BSTAS_S …
#define DCNT_S …
#define CLKCTL_MASK …
#define CLKCTL_MCLK_EXT …
#define CLKCTL_PWR_ON …
#define CON_MASK …
#define CON_FIFO_TH_SHIFT …
#define CON_FIFO_TH_MASK …
#define CON_USERDATA_23RDBIT …
#define CON_SW_RESET …
#define CON_MCLKDIV_MASK …
#define CON_MCLKDIV_256FS …
#define CON_MCLKDIV_384FS …
#define CON_MCLKDIV_512FS …
#define CON_PCM_MASK …
#define CON_PCM_16BIT …
#define CON_PCM_20BIT …
#define CON_PCM_24BIT …
#define CON_PCM_DATA …
#define CSTAS_MASK …
#define CSTAS_SAMP_FREQ_MASK …
#define CSTAS_SAMP_FREQ_44 …
#define CSTAS_SAMP_FREQ_48 …
#define CSTAS_SAMP_FREQ_32 …
#define CSTAS_SAMP_FREQ_96 …
#define CSTAS_CATEGORY_MASK …
#define CSTAS_CATEGORY_CODE_CDP …
#define CSTAS_NO_COPYRIGHT …
struct samsung_spdif_info { … };
static struct snd_dmaengine_dai_dma_data spdif_stereo_out;
static struct samsung_spdif_info spdif_info;
static inline struct samsung_spdif_info
*component_to_info(struct snd_soc_component *component)
{ … }
static inline struct samsung_spdif_info *to_info(struct snd_soc_dai *cpu_dai)
{ … }
static void spdif_snd_txctrl(struct samsung_spdif_info *spdif, int on)
{ … }
static int spdif_set_sysclk(struct snd_soc_dai *cpu_dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int spdif_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int spdif_sysclk_ratios[] = …;
static int spdif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *socdai)
{ … }
static void spdif_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
#ifdef CONFIG_PM
static int spdif_suspend(struct snd_soc_component *component)
{ … }
static int spdif_resume(struct snd_soc_component *component)
{ … }
#else
#define spdif_suspend …
#define spdif_resume …
#endif
static const struct snd_soc_dai_ops spdif_dai_ops = …;
static struct snd_soc_dai_driver samsung_spdif_dai = …;
static const struct snd_soc_component_driver samsung_spdif_component = …;
static int spdif_probe(struct platform_device *pdev)
{ … }
static void spdif_remove(struct platform_device *pdev)
{ … }
static struct platform_driver samsung_spdif_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;