Lines Matching full:blk
101 #define firstpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->first_page) argument
102 #define lastpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->last_page) argument
110 struct snd_util_memblk *blk; in search_empty() local
117 blk = list_entry(p, struct snd_util_memblk, list); in search_empty()
118 if (page + psize <= firstpg(blk)) in search_empty()
120 page = lastpg(blk) + 1; in search_empty()
127 blk = __snd_util_memblk_new(hdr, psize * ALIGN_PAGE_SIZE, p->prev); in search_empty()
128 if (blk == NULL) in search_empty()
130 blk->offset = aligned_page_offset(page); /* set aligned offset */ in search_empty()
131 firstpg(blk) = page; in search_empty()
132 lastpg(blk) = page + psize - 1; in search_empty()
133 return blk; in search_empty()
161 struct snd_util_memblk *blk; in snd_trident_alloc_sg_pages() local
176 blk = search_empty(hdr, runtime->dma_bytes); in snd_trident_alloc_sg_pages()
177 if (blk == NULL) { in snd_trident_alloc_sg_pages()
184 for (page = firstpg(blk); page <= lastpg(blk); page++, idx++) { in snd_trident_alloc_sg_pages()
188 __snd_util_mem_free(hdr, blk); in snd_trident_alloc_sg_pages()
195 return blk; in snd_trident_alloc_sg_pages()
206 struct snd_util_memblk *blk; in snd_trident_alloc_cont_pages() local
220 blk = search_empty(hdr, runtime->dma_bytes); in snd_trident_alloc_cont_pages()
221 if (blk == NULL) { in snd_trident_alloc_cont_pages()
228 for (page = firstpg(blk); page <= lastpg(blk); page++, in snd_trident_alloc_cont_pages()
231 __snd_util_mem_free(hdr, blk); in snd_trident_alloc_cont_pages()
238 return blk; in snd_trident_alloc_cont_pages()
261 struct snd_util_memblk *blk) in snd_trident_free_pages() argument
266 if (snd_BUG_ON(!trident || !blk)) in snd_trident_free_pages()
272 for (page = firstpg(blk); page <= lastpg(blk); page++) in snd_trident_free_pages()
275 __snd_util_mem_free(hdr, blk); in snd_trident_free_pages()