mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix ALSA compilation on Sparc32
@ 2007-08-30  9:26 Markus Dahms
  2007-08-30 10:09 ` Alan Cox
  2007-08-30 11:50 ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Markus Dahms @ 2007-08-30  9:26 UTC (permalink / raw)
  To: sparclinux; +Cc: linux-kernel

The dma_alloc_coherent and dma_free_coherent function seem to be not
available on sparc(32) architecture. It is not used by SBus sound
drivers, so it's disabled via #ifndef for CONFIG_SPARC32.

Signed-off-by: Markus Dahms <mad@automagically.de>

---
It is tested on a SparcStation 5 with the cs4231 driver. The ALSA list
should have been CCed, but as it is subscriber-only I skipped it.


--- linux-2.6/sound/core/memalloc.c	2007-08-30 10:59:50.000000000 +0200
+++ linux-2.6/sound/core/memalloc.c.patched	2007-08-23 18:41:41.000000000 +0200
@@ -205,6 +205,8 @@ void snd_free_pages(void *ptr, size_t si
  *
  */
 
+#ifndef CONFIG_SPARC32
+
 /* allocate the coherent DMA pages */
 static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *dma)
 {
@@ -239,6 +241,8 @@ static void snd_free_dev_pages(struct de
 	dma_free_coherent(dev, PAGE_SIZE << pg, ptr, dma);
 }
 
+#endif
+
 #ifdef CONFIG_SBUS
 
 static void *snd_malloc_sbus_pages(struct device *dev, size_t size,
@@ -311,9 +315,11 @@ int snd_dma_alloc_pages(int type, struct
 		dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr);
 		break;
 #endif
+#ifndef CONFIG_SPARC32
 	case SNDRV_DMA_TYPE_DEV:
 		dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr);
 		break;
+#endif
 	case SNDRV_DMA_TYPE_DEV_SG:
 		snd_malloc_sgbuf_pages(device, size, dmab, NULL);
 		break;
@@ -382,9 +388,11 @@ void snd_dma_free_pages(struct snd_dma_b
 		snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
 		break;
 #endif
+#ifndef CONFIG_SPARC32
 	case SNDRV_DMA_TYPE_DEV:
 		snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
 		break;
+#endif
 	case SNDRV_DMA_TYPE_DEV_SG:
 		snd_free_sgbuf_pages(dmab);
 		break;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-30 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-30  9:26 [PATCH] fix ALSA compilation on Sparc32 Markus Dahms
2007-08-30 10:09 ` Alan Cox
2007-08-30 10:52   ` Takashi Iwai
2007-08-30 11:50 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®