.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SND_PCM_LIB_PREALLOCATE_PAGES" "9" "09 October 2005" "" "" .SH NAME snd_pcm_lib_preallocate_pages \- pre-allocation for the given DMA type .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int snd_pcm_lib_preallocate_pages (snd_pcm_substream_t * \fIsubstream\fB, int \fItype\fB, struct device * \fIdata\fB, size_t \fIsize\fB, size_t \fImax\fB); \fR .SH "ARGUMENTS" .TP \fB\fIsubstream\fB\fR the pcm substream instance .TP \fB\fItype\fB\fR DMA type (SNDRV_DMA_TYPE_*) .TP \fB\fIdata\fB\fR DMA type dependant data .TP \fB\fIsize\fB\fR the requested pre-allocation size in bytes .TP \fB\fImax\fB\fR the max. allowed pre-allocation size .SH "DESCRIPTION" .PP Do pre-allocation for the given DMA buffer type. .PP When substream->dma_buf_id is set, the function tries to look for the reserved buffer, and the buffer is not freed but reserved at destruction time. The dma_buf_id must be unique for all systems (in the same DMA buffer type) e.g. using \fBsnd_dma_pci_buf_id\fR\&. .PP Returns zero if successful, or a negative error code on failure.