---
name: "snd_dma_alloc_pages"
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_dma_alloc_pages"
---

# snd\_dma\_alloc\_pages(9)

allocate the buffer area according to the given type

## NAME

snd\_dma\_alloc\_pages - allocate the buffer area according to the given type

## SYNOPSIS

**int snd\_dma\_alloc\_pages(int** *type***, struct device \*** *device***, size\_t** *size***, struct snd\_dma\_buffer \*** *dmab***);**

## ARGUMENTS

*type*

the DMA buffer type

*device*

the device pointer

*size*

the buffer size to allocate

*dmab*

buffer allocation record to store the allocated data

## DESCRIPTION

Calls the memory-allocator function for the corresponding buffer type.

## RETURN

Zero if the buffer with the given size is allocated successfully, otherwise a negative value on error.

## COPYRIGHT
