diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-09-10 15:32:50 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-10 15:32:50 +0200 |
commit | f9892a52e2405b4c5fa205d4f18ad292cb7e40bb (patch) | |
tree | 04a74c1f32047f1fbaa69cc34b484f91013e6f42 /include/sound/memalloc.h | |
parent | 6c5cb93b1e87be56d7f00767fd12cf57852a0b9f (diff) | |
parent | cc6a8acdeee932f6911d8b236d2c7d6bcc4616f6 (diff) |
Merge branch 'topic/dma-sgbuf' into for-linus
* topic/dma-sgbuf:
ALSA: Fix SG-buffer DMA with non-coherent architectures
Diffstat (limited to 'include/sound/memalloc.h')
-rw-r--r-- | include/sound/memalloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 7ccce94a525..c4250621264 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -47,7 +47,11 @@ struct snd_dma_device { #define SNDRV_DMA_TYPE_UNKNOWN 0 /* not defined */ #define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */ #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ +#ifdef CONFIG_SND_DMA_SGBUF #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ +#else +#define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ +#endif /* * info for buffer allocation @@ -60,6 +64,7 @@ struct snd_dma_buffer { void *private_data; /* private for allocator; don't touch */ }; +#ifdef CONFIG_SND_DMA_SGBUF /* * Scatter-Gather generic device pages */ @@ -107,6 +112,7 @@ static inline void *snd_sgbuf_get_ptr(struct snd_sg_buf *sgbuf, size_t offset) { return sgbuf->table[offset >> PAGE_SHIFT].buf + offset % PAGE_SIZE; } +#endif /* CONFIG_SND_DMA_SGBUF */ /* allocate/release a buffer */ int snd_dma_alloc_pages(int type, struct device *dev, size_t size, |