80 |
#define snd_assert(expr, args...) /**/ |
#define snd_assert(expr, args...) /**/ |
81 |
#endif |
#endif |
82 |
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) |
|
83 |
#ifdef CONFIG_PCI |
#ifdef CONFIG_PCI |
84 |
#if defined(__i386__) || defined(__ppc__) || defined(__x86_64__) |
#if defined(__i386__) || defined(__ppc__) || defined(__x86_64__) |
85 |
#define HACK_PCI_ALLOC_CONSISTENT |
#define HACK_PCI_ALLOC_CONSISTENT |
132 |
|
|
133 |
#endif /* arch */ |
#endif /* arch */ |
134 |
#endif /* CONFIG_PCI */ |
#endif /* CONFIG_PCI */ |
|
#endif /* LINUX >= 2.4.0 */ |
|
135 |
|
|
136 |
|
|
137 |
/* |
/* |
259 |
/* |
/* |
260 |
* search for the device |
* search for the device |
261 |
*/ |
*/ |
262 |
static struct snd_mem_list *mem_list_find(const struct snd_dma_device *dev, int allow_unused) |
static struct snd_mem_list *mem_list_find(const struct snd_dma_device *dev, int search_empty) |
263 |
{ |
{ |
264 |
struct list_head *p; |
struct list_head *p; |
265 |
struct snd_mem_list *mem; |
struct snd_mem_list *mem; |
266 |
|
|
267 |
list_for_each(p, &mem_list_head) { |
list_for_each(p, &mem_list_head) { |
268 |
mem = list_entry(p, struct snd_mem_list, list); |
mem = list_entry(p, struct snd_mem_list, list); |
269 |
if (compare_device(&mem->dev, dev, allow_unused)) |
if (mem->used && search_empty) |
270 |
|
continue; |
271 |
|
if (compare_device(&mem->dev, dev, search_empty)) |
272 |
return mem; |
return mem; |
273 |
} |
} |
274 |
return NULL; |
return NULL; |
623 |
} |
} |
624 |
|
|
625 |
|
|
626 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) && defined(__i386__) |
#if defined(__i386__) |
627 |
/* |
/* |
628 |
* on ix86, we allocate a page with GFP_KERNEL to assure the |
* on ix86, we allocate a page with GFP_KERNEL to assure the |
629 |
* allocation. the code is almost same with kernel/i386/pci-dma.c but |
* allocation. the code is almost same with kernel/i386/pci-dma.c but |