---
name: "snd_pcm_lib_alloc_vmalloc_buffer"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/snd_pcm_lib_alloc_vmalloc_buffer"
---

# snd\_pcm\_lib\_alloc\_vmalloc\_buffer(9)

allocate virtual DMA buffer

## NAME

snd\_pcm\_lib\_alloc\_vmalloc\_buffer - allocate virtual DMA buffer

## SYNOPSIS

**int snd\_pcm\_lib\_alloc\_vmalloc\_buffer(struct snd\_pcm\_substream \*** *substream***, size\_t** *size***);**

## ARGUMENTS

*substream*

the substream to allocate the buffer to

*size*

the requested buffer size, in bytes

## DESCRIPTION

Allocates the PCM substream buffer using **vmalloc**, i.e., the memory is contiguous in kernel virtual space, but not in physical memory. Use this if the buffer is accessed by kernel code but not by device DMA.

## RETURN

1 if the buffer was changed, 0 if not changed, or a negative error code.

## COPYRIGHT
