libaudiodriver: allocate mem lower 16 MB and 64K aligned

Righ now, the DMA controller will access some random memory below 16 MB,
as the physical address returned by alloc_contig() is simply truncated
when given to the DMA controller.

Yes, it's bad...
This commit is contained in:
Arne Welzel 2012-11-14 22:43:42 +01:00 committed by Gerrit Code Review
parent f0d27a9570
commit 5b211ac848

View file

@ -929,7 +929,7 @@ static int init_buffers(sub_dev_t *sub_dev_ptr)
/* allocate dma buffer space */
size= sub_dev_ptr->DmaSize + 64 * 1024;
base= alloc_contig(size, AC_ALIGN4K, &ph);
base= alloc_contig(size, AC_ALIGN64K|AC_LOWER16M, &ph);
if (!base) {
printf("%s: failed to allocate dma buffer for a channel\n",
drv.DriverName);