Lines Matching refs:runtime
166 if (substream->runtime) { in snd_pcm_lib_preallocate_proc_write()
392 struct snd_pcm_runtime *runtime; in snd_pcm_lib_malloc_pages() local
400 runtime = substream->runtime; in snd_pcm_lib_malloc_pages()
403 if (runtime->dma_buffer_p) { in snd_pcm_lib_malloc_pages()
407 if (runtime->dma_buffer_p->bytes >= size) { in snd_pcm_lib_malloc_pages()
408 runtime->dma_bytes = size; in snd_pcm_lib_malloc_pages()
438 runtime->dma_bytes = size; in snd_pcm_lib_malloc_pages()
454 struct snd_pcm_runtime *runtime; in snd_pcm_lib_free_pages() local
458 runtime = substream->runtime; in snd_pcm_lib_free_pages()
459 if (runtime->dma_area == NULL) in snd_pcm_lib_free_pages()
461 if (runtime->dma_buffer_p != &substream->dma_buffer) { in snd_pcm_lib_free_pages()
463 do_free_pages(card, runtime->dma_buffer_p); in snd_pcm_lib_free_pages()
464 kfree(runtime->dma_buffer_p); in snd_pcm_lib_free_pages()
474 struct snd_pcm_runtime *runtime; in _snd_pcm_lib_alloc_vmalloc_buffer() local
478 runtime = substream->runtime; in _snd_pcm_lib_alloc_vmalloc_buffer()
479 if (runtime->dma_area) { in _snd_pcm_lib_alloc_vmalloc_buffer()
480 if (runtime->dma_bytes >= size) in _snd_pcm_lib_alloc_vmalloc_buffer()
482 vfree(runtime->dma_area); in _snd_pcm_lib_alloc_vmalloc_buffer()
484 runtime->dma_area = __vmalloc(size, gfp_flags); in _snd_pcm_lib_alloc_vmalloc_buffer()
485 if (!runtime->dma_area) in _snd_pcm_lib_alloc_vmalloc_buffer()
487 runtime->dma_bytes = size; in _snd_pcm_lib_alloc_vmalloc_buffer()
501 struct snd_pcm_runtime *runtime; in snd_pcm_lib_free_vmalloc_buffer() local
505 runtime = substream->runtime; in snd_pcm_lib_free_vmalloc_buffer()
506 vfree(runtime->dma_area); in snd_pcm_lib_free_vmalloc_buffer()
507 runtime->dma_area = NULL; in snd_pcm_lib_free_vmalloc_buffer()
525 return vmalloc_to_page(substream->runtime->dma_area + offset); in snd_pcm_lib_get_vmalloc_page()