Lines Matching refs:runtime

167 	if (substream->runtime) {  in snd_pcm_lib_preallocate_proc_write()
381 struct snd_pcm_runtime *runtime; in snd_pcm_lib_malloc_pages() local
389 runtime = substream->runtime; in snd_pcm_lib_malloc_pages()
392 if (runtime->dma_buffer_p) { in snd_pcm_lib_malloc_pages()
396 if (runtime->dma_buffer_p->bytes >= size) { in snd_pcm_lib_malloc_pages()
397 runtime->dma_bytes = size; in snd_pcm_lib_malloc_pages()
419 runtime->dma_bytes = size; in snd_pcm_lib_malloc_pages()
435 struct snd_pcm_runtime *runtime; in snd_pcm_lib_free_pages() local
439 runtime = substream->runtime; in snd_pcm_lib_free_pages()
440 if (runtime->dma_area == NULL) in snd_pcm_lib_free_pages()
442 if (runtime->dma_buffer_p != &substream->dma_buffer) { in snd_pcm_lib_free_pages()
444 do_free_pages(card, runtime->dma_buffer_p); in snd_pcm_lib_free_pages()
445 kfree(runtime->dma_buffer_p); in snd_pcm_lib_free_pages()
455 struct snd_pcm_runtime *runtime; in _snd_pcm_lib_alloc_vmalloc_buffer() local
459 runtime = substream->runtime; in _snd_pcm_lib_alloc_vmalloc_buffer()
460 if (runtime->dma_area) { in _snd_pcm_lib_alloc_vmalloc_buffer()
461 if (runtime->dma_bytes >= size) in _snd_pcm_lib_alloc_vmalloc_buffer()
463 vfree(runtime->dma_area); in _snd_pcm_lib_alloc_vmalloc_buffer()
465 runtime->dma_area = __vmalloc(size, gfp_flags); in _snd_pcm_lib_alloc_vmalloc_buffer()
466 if (!runtime->dma_area) in _snd_pcm_lib_alloc_vmalloc_buffer()
468 runtime->dma_bytes = size; in _snd_pcm_lib_alloc_vmalloc_buffer()
482 struct snd_pcm_runtime *runtime; in snd_pcm_lib_free_vmalloc_buffer() local
486 runtime = substream->runtime; in snd_pcm_lib_free_vmalloc_buffer()
487 vfree(runtime->dma_area); in snd_pcm_lib_free_vmalloc_buffer()
488 runtime->dma_area = NULL; in snd_pcm_lib_free_vmalloc_buffer()
506 return vmalloc_to_page(substream->runtime->dma_area + offset); in snd_pcm_lib_get_vmalloc_page()