1SND_PCM_LIB_PREALLOC(9)             PCM API            SND_PCM_LIB_PREALLOC(9)
2
3
4

NAME

6       snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type
7

SYNOPSIS

9       int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream * substream,
10                                         int type, struct device * data,
11                                         size_t size, size_t max);
12

ARGUMENTS

14       substream
15           the pcm substream instance
16
17       type
18           DMA type (SNDRV_DMA_TYPE_*)
19
20       data
21           DMA type dependant data
22
23       size
24           the requested pre-allocation size in bytes
25
26       max
27           the max. allowed pre-allocation size
28

DESCRIPTION

30       Do pre-allocation for the given DMA buffer type.
31
32       When substream->dma_buf_id is set, the function tries to look for the
33       reserved buffer, and the buffer is not freed but reserved at
34       destruction time. The dma_buf_id must be unique for all systems (in the
35       same DMA buffer type) e.g. using snd_dma_pci_buf_id.
36
37       Returns zero if successful, or a negative error code on failure.
38
40Kernel Hackers Manual 2.6.         June 2019           SND_PCM_LIB_PREALLOC(9)
Impressum