Alsa on a embedded device with Intel PXA250
Hello,
I'm trying to install ALSA on a embedded system based on Intel PXA250 and running Linux 2.4.19 kernel. When trying to cross-compile ALSA i get this error:
arm-linux-gcc -D__KERNEL__ -DMODULE=1 -I/home/robert/alsa-driver-1.0.11/include -I/home/robert/linux-2.4.19-CC1000/include -O2 -O2 -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix
include -DEXPORT_SYMTAB -c memalloc.c
memalloc.c:123: #error "Need a bus for dma_alloc_coherent()"memalloc.c: In function `snd_malloc_dev_pages':
memalloc.c:314: warning: implicit declaration of function `dma_alloc_coherent'
memalloc.c:314: warning: assignment makes pointer from integer without a castmemalloc.c: In function `snd_free_dev_pages':
memalloc.c:334: warning: implicit declaration of function `dma_free_coherent'
make[1]: *** [memalloc.o] Error 1
make[1]: Leaving directory `/home/robert/alsa-driver-1.0.11/acore'
make: *** [compile] Error 1
I ran configure script with following arguments:
./configure --with-cross=arm-linux- --with-kernel=/home/robert/linux-2.4.19-CC1000 --with-cards=pxa2xx-ac97,pxa2xx-i2sound --with-sequencer=no
Kernel has no PCI support buid in. I'm using arm-linux-gcc version 2.95.3
can someone help, please?
Robert
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Tue, 1 Aug 2006 10:42:14 +0200,
Quoted 8 lines · Robert Vetter
Hello,
I'm trying to install ALSA on a embedded system based on Intel PXA250 and running Linux 2.4.19 kernel. When trying to cross-compile ALSA i get this error:
Quoted 11 lines
arm-linux-gcc -D__KERNEL__ -DMODULE=1 -I/home/robert/alsa-driver-1.0.11/include -I/home/robert/linux-2.4.19-CC1000/include -O2 -O2 -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix
include -DEXPORT_SYMTAB -cmemalloc.c
memalloc.c:123: #error "Need a bus fordma_alloc_coherent()"memalloc.c: In function `snd_malloc_dev_pages':
memalloc.c:314: warning: implicit declaration of function `dma_alloc_coherent'
memalloc.c:314: warning: assignment makes pointer from integer without a castmemalloc.c: In function `snd_free_dev_pages':
memalloc.c:334: warning: implicit declaration of function `dma_free_coherent'
make[1]: *** [memalloc.o] Error 1
make[1]: Leaving directory `/home/robert/alsa-driver-1.0.11/acore'
make: *** [compile] Error 1
dma_alloc_coherent() is somewhat equivalent with pci_alloc_consistent() on 2.4 kernels. If it doesn't exist, you'd need to implement it using another function. Use pci_alloc_consistent() if available. Or, simply __get_free_pages() and assigning the virtual and physical memories should suffice for most cases.
However, on non-coherent architectures like ARM, the concurrent access using mmap wouldn't work correctly for the normal memory. That's one of the reason dma_alloc_coherent() is used there. So, in such a case, disable mmap support on your driver.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV