Creative SBLive card

Ira Weiny iweiny at acm.org
Thu May 3 04:44:39 EST 2001


I had the chance to work on getting an SBLive card running on my G3 the
other day.  The fix is basic and is
in the following patch if anyone is interested.  I have only testing for
sound output though.

Ira


-------------- next part --------------
diff -r -U 5 linux.orig/drivers/sound/emu10k1/cardwo.c linux/drivers/sound/emu10k1/cardwo.c
--- linux.orig/drivers/sound/emu10k1/cardwo.c	Sat Mar  3 12:51:48 2001
+++ linux/drivers/sound/emu10k1/cardwo.c	Tue May  1 15:43:01 2001
@@ -85,11 +85,12 @@

 			DPD(3, "Bus Addx: %lx\n", busaddx);

 			pageindex = buffer->emupageindex + pagecount * PAGE_SIZE / EMUPAGESIZE + i;

-			((u32 *) card->virtualpagetable.addr)[pageindex] = (busaddx * 2) | pageindex;
+			((u32 *) card->virtualpagetable.addr)[pageindex] =
+            cpu_to_le32((busaddx * 2) | pageindex);
 		}
 	}

 	return 0;
 }
diff -r -U 5 linux.orig/drivers/sound/emu10k1/main.c linux/drivers/sound/emu10k1/main.c
--- linux.orig/drivers/sound/emu10k1/main.c	Sat Mar  3 12:51:07 2001
+++ linux/drivers/sound/emu10k1/main.c	Tue May  1 15:42:29 2001
@@ -473,11 +473,12 @@
 		pci_free_consistent(card->pci_dev, card->virtualpagetable.size, card->virtualpagetable.addr, card->virtualpagetable.dma_handle);
 		return -1;
 	}

 	for (pagecount = 0; pagecount < MAXPAGES; pagecount++)
-		((u32 *) card->virtualpagetable.addr)[pagecount] = (card->silentpage.dma_handle * 2) | pagecount;
+		((u32 *) card->virtualpagetable.addr)[pagecount] =
+         cpu_to_le32((card->silentpage.dma_handle * 2) | pagecount);

 	/* Init page table & tank memory base register */
 	sblive_writeptr_tag(card, 0,
 			    PTB, card->virtualpagetable.dma_handle,
 			    TCB, 0,


More information about the Linuxppc-dev mailing list