Allocating lots of DMA RAM?

From: Jeff Garzik (jgarzik@mandrakesoft.mandrakesoft.com)
Date: Thu Feb 15 2001 - 08:58:19 EST


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/



This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:26 EST