Lines Matching full:pcm
3 * Digital Audio (PCM) abstract layer
14 #include <sound/pcm.h>
21 MODULE_PARM_DESC(preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized.");
102 struct snd_card *card = substream->pcm->card; in preallocate_pcm_pages()
117 substream->pcm->card->number, substream->pcm->device, in preallocate_pcm_pages()
119 substream->pcm->name, orig_size); in preallocate_pcm_pages()
125 * @substream: the pcm substream instance
131 do_free_pages(substream->pcm->card, &substream->dma_buffer); in snd_pcm_lib_preallocate_free()
135 * snd_pcm_lib_preallocate_free_for_all - release all pre-allocated buffers on the pcm
136 * @pcm: the pcm instance
138 * Releases all the pre-allocated buffers on the given pcm.
140 void snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) in snd_pcm_lib_preallocate_free_for_all() argument
145 for_each_pcm_substream(pcm, stream, substream) in snd_pcm_lib_preallocate_free_for_all()
184 struct snd_card *card = substream->pcm->card; in snd_pcm_lib_preallocate_proc_write()
189 guard(mutex)(&substream->pcm->open_mutex); in snd_pcm_lib_preallocate_proc_write()
216 substream->pcm->card->number, substream->pcm->device, in snd_pcm_lib_preallocate_proc_write()
218 substream->pcm->name, size); in snd_pcm_lib_preallocate_proc_write()
237 entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", in preallocate_info_init()
245 entry = snd_info_create_card_entry(substream->pcm->card, "prealloc_max", in preallocate_info_init()
297 static int preallocate_pages_for_all(struct snd_pcm *pcm, int type, in preallocate_pages_for_all() argument
304 for_each_pcm_substream(pcm, stream, substream) { in preallocate_pages_for_all()
314 * @substream: the pcm substream instance
332 * @pcm: the pcm instance
338 * Do pre-allocation to all substreams of the given pcm for the
341 void snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, in snd_pcm_lib_preallocate_pages_for_all() argument
345 preallocate_pages_for_all(pcm, type, data, size, max, false); in snd_pcm_lib_preallocate_pages_for_all()
351 * @substream: the pcm substream instance
359 * In this mode, PCM core will allocate a buffer automatically before PCM
360 * hw_params ops call, and release the buffer after PCM hw_free ops call
363 * When a buffer is actually allocated before the PCM hw_params call, it
390 * @pcm: the pcm instance
396 * Do pre-allocation to all substreams of the given pcm for the specified DMA
401 int snd_pcm_set_managed_buffer_all(struct snd_pcm *pcm, int type, in snd_pcm_set_managed_buffer_all() argument
405 return preallocate_pages_for_all(pcm, type, data, size, max, true); in snd_pcm_set_managed_buffer_all()
432 card = substream->pcm->card; in snd_pcm_lib_malloc_pages()
462 substream->pcm->card->number, substream->pcm->device, in snd_pcm_lib_malloc_pages()
464 substream->pcm->name, size); in snd_pcm_lib_malloc_pages()
492 struct snd_card *card = substream->pcm->card; in snd_pcm_lib_free_pages()