diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-28 20:19:47 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-28 20:19:47 -0800 |
commit | e3c6d4ee545e427b55882d97d3b663c6411645fe (patch) | |
tree | 294326663fb757739a98083c2ddd570d1eaf7337 /sound/soc/davinci/davinci-pcm.c | |
parent | 5bc053089376217943187ed5153d0d1e5c5085b6 (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sparc64/kernel/idprom.c
Diffstat (limited to 'sound/soc/davinci/davinci-pcm.c')
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 76feaa65737..74abc9b4f1c 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c @@ -14,6 +14,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/dma-mapping.h> +#include <linux/kernel.h> #include <sound/core.h> #include <sound/pcm.h> @@ -24,13 +25,6 @@ #include "davinci-pcm.h" -#define DAVINCI_PCM_DEBUG 0 -#if DAVINCI_PCM_DEBUG -#define DPRINTK(x...) printk(KERN_DEBUG x) -#else -#define DPRINTK(x...) -#endif - static struct snd_pcm_hardware davinci_pcm_hardware = { .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | @@ -78,8 +72,8 @@ static void davinci_pcm_enqueue_dma(struct snd_pcm_substream *substream) dma_offset = prtd->period * period_size; dma_pos = runtime->dma_addr + dma_offset; - DPRINTK("audio_set_dma_params_play channel = %d dma_ptr = %x " - "period_size=%x\n", lch, dma_pos, period_size); + pr_debug("davinci_pcm: audio_set_dma_params_play channel = %d " + "dma_ptr = %x period_size=%x\n", lch, dma_pos, period_size); data_type = prtd->params->data_type; count = period_size / data_type; @@ -112,7 +106,7 @@ static void davinci_pcm_dma_irq(int lch, u16 ch_status, void *data) struct snd_pcm_substream *substream = data; struct davinci_runtime_data *prtd = substream->runtime->private_data; - DPRINTK("lch=%d, status=0x%x\n", lch, ch_status); + pr_debug("davinci_pcm: lch=%d, status=0x%x\n", lch, ch_status); if (unlikely(ch_status != DMA_COMPLETE)) return; @@ -316,8 +310,8 @@ static int davinci_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) buf->area = dma_alloc_writecombine(pcm->card->dev, size, &buf->addr, GFP_KERNEL); - DPRINTK("preallocate_dma_buffer: area=%p, addr=%p, size=%d\n", - (void *) buf->area, (void *) buf->addr, size); + pr_debug("davinci_pcm: preallocate_dma_buffer: area=%p, addr=%p, " + "size=%d\n", (void *) buf->area, (void *) buf->addr, size); if (!buf->area) return -ENOMEM; @@ -384,6 +378,18 @@ struct snd_soc_platform davinci_soc_platform = { }; EXPORT_SYMBOL_GPL(davinci_soc_platform); +static int __init davinci_soc_platform_init(void) +{ + return snd_soc_register_platform(&davinci_soc_platform); +} +module_init(davinci_soc_platform_init); + +static void __exit davinci_soc_platform_exit(void) +{ + snd_soc_unregister_platform(&davinci_soc_platform); +} +module_exit(davinci_soc_platform_exit); + MODULE_AUTHOR("Vladimir Barinov"); MODULE_DESCRIPTION("TI DAVINCI PCM DMA module"); MODULE_LICENSE("GPL"); |