Lines Matching refs:hdr

140 search_empty(struct snd_util_memhdr *hdr, int size)  in search_empty()  argument
148 list_for_each(p, &hdr->block) { in search_empty()
159 blk = __snd_util_memblk_new(hdr, psize * ALIGN_PAGE_SIZE, p->prev); in search_empty()
192 struct snd_util_memhdr *hdr; in snd_trident_alloc_sg_pages() local
201 hdr = trident->tlb.memhdr; in snd_trident_alloc_sg_pages()
202 if (snd_BUG_ON(!hdr)) in snd_trident_alloc_sg_pages()
207 mutex_lock(&hdr->block_mutex); in snd_trident_alloc_sg_pages()
208 blk = search_empty(hdr, runtime->dma_bytes); in snd_trident_alloc_sg_pages()
210 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_sg_pages()
222 __snd_util_mem_free(hdr, blk); in snd_trident_alloc_sg_pages()
223 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_sg_pages()
228 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_sg_pages()
239 struct snd_util_memhdr *hdr; in snd_trident_alloc_cont_pages() local
250 hdr = trident->tlb.memhdr; in snd_trident_alloc_cont_pages()
251 if (snd_BUG_ON(!hdr)) in snd_trident_alloc_cont_pages()
254 mutex_lock(&hdr->block_mutex); in snd_trident_alloc_cont_pages()
255 blk = search_empty(hdr, runtime->dma_bytes); in snd_trident_alloc_cont_pages()
257 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_cont_pages()
267 __snd_util_mem_free(hdr, blk); in snd_trident_alloc_cont_pages()
268 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_cont_pages()
273 mutex_unlock(&hdr->block_mutex); in snd_trident_alloc_cont_pages()
299 struct snd_util_memhdr *hdr; in snd_trident_free_pages() local
305 hdr = trident->tlb.memhdr; in snd_trident_free_pages()
306 mutex_lock(&hdr->block_mutex); in snd_trident_free_pages()
311 __snd_util_mem_free(hdr, blk); in snd_trident_free_pages()
312 mutex_unlock(&hdr->block_mutex); in snd_trident_free_pages()