diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-11-28 11:46:12 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-02 13:27:44 +0900 |
commit | 92dfa61986237f849bb6ff5190380b3bf69335d2 (patch) | |
tree | c1a3fe286bd52c51a07a9045e04bb6a965cff284 /sound/soc/atmel/atmel-pcm.h | |
parent | 31974361761b18e07e821d3b262e34f1a2d105cb (diff) |
ASoC: atmel-pcm: split into two file
This patch is split original atmel-pcm.c into new atmel-pcm.c and
atmel-pcm-pdc.c two files. The new atmel-pcm.c is the share routine
while will be used for pdc or dma transfer.
Using SND_ATMEL_SOC_PDC to select using PDC for audio transfer
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/atmel/atmel-pcm.h')
-rw-r--r-- | sound/soc/atmel/atmel-pcm.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sound/soc/atmel/atmel-pcm.h b/sound/soc/atmel/atmel-pcm.h index e6d67b3dddd1..6bd63b0e95e2 100644 --- a/sound/soc/atmel/atmel-pcm.h +++ b/sound/soc/atmel/atmel-pcm.h @@ -36,6 +36,8 @@ #include <linux/atmel-ssc.h> +#define ATMEL_SSC_DMABUF_SIZE (64 * 1024) + /* * Registers and status bits that are required by the PCM driver. */ @@ -80,7 +82,22 @@ struct atmel_pcm_dma_params { #define ssc_readx(base, reg) (__raw_readl((base) + (reg))) #define ssc_writex(base, reg, value) __raw_writel((value), (base) + (reg)) -int atmel_pcm_platform_register(struct device *dev); -void atmel_pcm_platform_unregister(struct device *dev); +int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd); +void atmel_pcm_free(struct snd_pcm *pcm); +int atmel_pcm_mmap(struct snd_pcm_substream *substream, + struct vm_area_struct *vma); + +#ifdef CONFIG_SND_ATMEL_SOC_PDC +int atmel_pcm_pdc_platform_register(struct device *dev); +void atmel_pcm_pdc_platform_unregister(struct device *dev); +#else +static inline int atmel_pcm_pdc_platform_register(struct device *dev) +{ + return 0; +} +static inline void atmel_pcm_pdc_platform_unregister(struct device *dev) +{ +} +#endif #endif /* _ATMEL_PCM_H */ |