---
name: "snd_pcm_lib_preallocate_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_pcm_lib_preallocate_pages"
---

# snd\_pcm\_lib\_preallocate\_pages(9)

pre-allocation for the given DMA type

## NAME

snd\_pcm\_lib\_preallocate\_pages - pre-allocation for the given DMA type

## SYNOPSIS

**int snd\_pcm\_lib\_preallocate\_pages(struct snd\_pcm\_substream \*** *substream***, int** *type***, struct device \*** *data***, size\_t** *size***, size\_t** *max***);**

## ARGUMENTS

*substream*

the pcm substream instance

*type*

DMA type (SNDRV\_DMA\_TYPE\_\*)

*data*

DMA type dependent data

*size*

the requested pre-allocation size in bytes

*max*

the max. allowed pre-allocation size

## DESCRIPTION

Do pre-allocation for the given DMA buffer type.

## RETURN

Zero if successful, or a negative error code on failure.

## COPYRIGHT
