diff options
author | Jon Smirl <jonsmirl@gmail.com> | 2009-05-26 08:34:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-26 21:12:50 +0100 |
commit | dbcc34756234596993a3b1304636f032e66d401f (patch) | |
tree | f1188f0c20ce402f778257bb0d905456ee213b14 /sound/soc/fsl/mpc5200_dma.h | |
parent | 0f89bdcac61536c5cb2a095a514657019573afb4 (diff) |
ASoC: Main rewite of the mpc5200 audio DMA code
Rewrite the mpc5200 audio DMA code to support both I2S and AC97.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/mpc5200_dma.h')
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h index a33232c0c59..2000803f06a 100644 --- a/sound/soc/fsl/mpc5200_dma.h +++ b/sound/soc/fsl/mpc5200_dma.h @@ -5,8 +5,10 @@ #ifndef __SOUND_SOC_FSL_MPC5200_DMA_H__ #define __SOUND_SOC_FSL_MPC5200_DMA_H__ +#define PSC_STREAM_NAME_LEN 32 + /** - * psc_dma_stream - Data specific to a single stream (playback or capture) + * psc_ac97_stream - Data specific to a single stream (playback or capture) * @active: flag indicating if the stream is active * @psc_dma: pointer back to parent psc_dma data structure * @bcom_task: bestcomm task structure @@ -17,6 +19,9 @@ * @period_bytes: size of DMA period in bytes */ struct psc_dma_stream { + struct snd_pcm_runtime *runtime; + snd_pcm_uframes_t appl_ptr; + int active; struct psc_dma *psc_dma; struct bcom_task *bcom_task; @@ -27,6 +32,7 @@ struct psc_dma_stream { dma_addr_t period_next_pt; dma_addr_t period_current_pt; int period_bytes; + int period_size; }; /** @@ -48,9 +54,12 @@ struct psc_dma { struct mpc52xx_psc_fifo __iomem *fifo_regs; unsigned int irq; struct device *dev; - struct snd_soc_dai dai; spinlock_t lock; u32 sicr; + uint sysclk; + int imr; + int id; + unsigned int slots; /* per-stream data */ struct psc_dma_stream playback; @@ -58,24 +67,14 @@ struct psc_dma { /* Statistics */ struct { - int overrun_count; - int underrun_count; + unsigned long overrun_count; + unsigned long underrun_count; } stats; }; +int mpc5200_audio_dma_create(struct of_device *op); +int mpc5200_audio_dma_destroy(struct of_device *op); -int psc_dma_startup(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai); - -int psc_dma_hw_free(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai); - -void psc_dma_shutdown(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai); - -int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd, - struct snd_soc_dai *dai); - -extern struct snd_soc_platform psc_dma_pcm_soc_platform; +extern struct snd_soc_platform mpc5200_audio_dma_platform; #endif /* __SOUND_SOC_FSL_MPC5200_DMA_H__ */ |