Allocating lots of DMA RAM?

Jeff Garzik (jgarzik@mandrakesoft.mandrakesoft.com)
Thu, 15 Feb 2001 07:58:19 -0600 (CST)


Hi all. Is the following loop (from drivers/sound/i810_audio.c among
others) still the best way to allocate a large amount of DMA RAM for
audio? ie. for audio devices that do not support scatter-gather.

Thanks,

Jeff

/* alloc as big a chunk as we can, FIXME: is this necessary ?? */
for (order = DMABUF_DEFAULTORDER; order >= DMABUF_MINORDER; order--)
if ((rawbuf = pci_alloc_consistent(state->card->pci_dev,
PAGE_SIZE << order,
&dmabuf->dma_handle)))
break;
if (!rawbuf)
return -ENOMEM;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/