aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/pcm.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index e862497f7556..5c3310d7d4b8 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -942,7 +942,6 @@ int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream,
942int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream); 942int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream);
943struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream, 943struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
944 unsigned long offset); 944 unsigned long offset);
945#if 0 /* for kernel-doc */
946/** 945/**
947 * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer 946 * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer
948 * @substream: the substream to allocate the buffer to 947 * @substream: the substream to allocate the buffer to
@@ -955,8 +954,13 @@ struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
955 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 954 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
956 * code. 955 * code.
957 */ 956 */
958static int snd_pcm_lib_alloc_vmalloc_buffer 957static inline int snd_pcm_lib_alloc_vmalloc_buffer
959 (struct snd_pcm_substream *substream, size_t size); 958 (struct snd_pcm_substream *substream, size_t size)
959{
960 return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
961 GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
962}
963
960/** 964/**
961 * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer 965 * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer
962 * @substream: the substream to allocate the buffer to 966 * @substream: the substream to allocate the buffer to
@@ -968,15 +972,12 @@ static int snd_pcm_lib_alloc_vmalloc_buffer
968 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error 972 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
969 * code. 973 * code.
970 */ 974 */
971static int snd_pcm_lib_alloc_vmalloc_32_buffer 975static inline int snd_pcm_lib_alloc_vmalloc_32_buffer
972 (struct snd_pcm_substream *substream, size_t size); 976 (struct snd_pcm_substream *substream, size_t size)
973#endif 977{
974#define snd_pcm_lib_alloc_vmalloc_buffer(subs, size) \ 978 return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
975 _snd_pcm_lib_alloc_vmalloc_buffer \ 979 GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
976 (subs, size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO) 980}
977#define snd_pcm_lib_alloc_vmalloc_32_buffer(subs, size) \
978 _snd_pcm_lib_alloc_vmalloc_buffer \
979 (subs, size, GFP_KERNEL | GFP_DMA32 | __GFP_ZERO)
980 981
981#define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p) 982#define snd_pcm_get_dma_buf(substream) ((substream)->runtime->dma_buffer_p)
982 983