Skip to contentSkip to conversation

not for embedded?

DISCUSSION Takashi Iwai 1 participant 1 message Sep 5, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 44FCE939.0C4F3E.12259

#1 lore raw

At Tue, 5 Sep 2006 11:06:41 +0800,

Quoted 14 lines · littertiger

in acore/memalloc.c line 114:

/* for 2.2/2.4 kernels */
#if defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(__i386__)
#define dma_alloc_coherent(dev,size,addr,flags) pci_alloc_consistent((struct pci_dev *)(dev),size,addr) #define dma_free_coherent(dev,size,ptr,addr) pci_free_consistent((struct pci_dev *)(dev),size,ptr,addr) #elif CONFIG_SBUS
#define dma_alloc_coherent(dev,size,addr,flags) sbus_alloc_consistent((struct sbus_dev *)(dev),size,addr) #define dma_free_coherent(dev,size,ptr,addr) sbus_free_consistent((struct sbus_dev *)(dev),size,ptr,addr) #else
#error "Need a bus for dma_alloc_coherent()"
#endif

Quoted 3 lines

If my embedded device doesn't have PCI/ISA/SBUS, and isn't i386, there will be a compile error. It seems alsa is designed only for x86, not for embedded devices without PCI/ISA/SBUS. Isn't it?

It is designed mainly for recent 2.6 kernels.
The support for legacy kernels is optional.

You just need to find a way to allocate a coherent memory area in your environment, equivalent with dma_alloc_coherent() or such.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642