At Tue, 1 Aug 2006 10:42:14 +0200, Robert Vetter wrote: > > > 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 cast > memalloc.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 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel