diff -pur pci/aureal.c pci-ed/aureal.c
--- pci/aureal.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/aureal.c	2005-07-19 05:17:17.000000000 +0800
@@ -306,7 +306,8 @@ auchan_init(kobj_t obj, void *devinfo, s
 	ch->channel = c;
 	ch->buffer = b;
 	ch->dir = dir;
-	if (sndbuf_alloc(ch->buffer, au->parent_dmat, AU_BUFFSIZE) == -1) return NULL;
+	if (sndbuf_alloc(ch->buffer, au->parent_dmat, AU_BUFFSIZE) != 0) 
+		return NULL;
 	return ch;
 }
 
diff -pur pci/csapcm.c pci-ed/csapcm.c
--- pci/csapcm.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/csapcm.c	2005-07-19 05:17:17.000000000 +0800
@@ -519,7 +519,8 @@ csachan_init(kobj_t obj, void *devinfo, 
 	ch->channel = c;
 	ch->buffer = b;
 	ch->dir = dir;
-	if (sndbuf_alloc(ch->buffer, csa->parent_dmat, CS461x_BUFFSIZE) == -1) return NULL;
+	if (sndbuf_alloc(ch->buffer, csa->parent_dmat, CS461x_BUFFSIZE) != 0) 
+		return NULL;
 	return ch;
 }
 
diff -pur pci/ds1.c pci-ed/ds1.c
--- pci/ds1.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/ds1.c	2005-07-19 05:17:17.000000000 +0800
@@ -493,7 +493,7 @@ ds1pchan_init(kobj_t obj, void *devinfo,
 	ch->fmt = AFMT_U8;
 	ch->spd = 8000;
 	ch->run = 0;
-	if (sndbuf_alloc(ch->buffer, sc->buffer_dmat, sc->bufsz) == -1)
+	if (sndbuf_alloc(ch->buffer, sc->buffer_dmat, sc->bufsz) != 0)
 		return NULL;
 	else {
 		ch->lsnum = sc->pslotfree;
diff -pur pci/emu10k1.c pci-ed/emu10k1.c
--- pci/emu10k1.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/emu10k1.c	2005-07-19 05:17:17.000000000 +0800
@@ -856,7 +856,7 @@ emurchan_init(kobj_t obj, void *devinfo,
 		break;
 	}
 	sc->rnum++;
-	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) == -1)
+	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) != 0)
 		return NULL;
 	else {
 		snd_mtxlock(sc->lock);
diff -pur pci/es137x.c pci-ed/es137x.c
--- pci/es137x.c	2005-06-11 07:06:59.000000000 +0800
+++ pci-ed/es137x.c	2005-07-19 05:17:17.000000000 +0800
@@ -74,6 +74,7 @@ SYSCTL_INT(_debug, OID_AUTO, es_debug, C
 #define ES1371_PCI_ID 0x13711274
 #define ES1371_PCI_ID2 0x13713274
 #define CT5880_PCI_ID 0x58801274
+#define CT4730_PCI_ID 0x89381102
 
 #define ES1371REV_ES1371_A  0x02
 #define ES1371REV_ES1371_B  0x09
@@ -88,6 +89,8 @@ SYSCTL_INT(_debug, OID_AUTO, es_debug, C
 #define CT5880REV_CT5880_D  0x03
 #define CT5880REV_CT5880_E  0x04
 
+#define CT4730REV_CT4730_A  0x00
+
 #define ES_DEFAULT_BUFSZ 4096
 
 /* device private data */
@@ -274,7 +277,8 @@ eschan_init(kobj_t obj, void *devinfo, s
 	ch->bufsz = es->bufsz;
 	ch->blksz = ch->bufsz / 2;
 	ch->num = ch->parent->num++;
-	if (sndbuf_alloc(ch->buffer, es->parent_dmat, ch->bufsz) == -1) return NULL;
+	if (sndbuf_alloc(ch->buffer, es->parent_dmat, ch->bufsz) != 0) 
+		return NULL;
 	return ch;
 }
 
@@ -508,7 +512,8 @@ es1371_init(struct es_info *es, device_t
 	    (devid == ES1371_PCI_ID && revid == ES1371REV_CT5880_A) ||
 	    (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_C) ||
 	    (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_D) ||
-	    (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_E)) {
+	    (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_E) ||
+	    (devid == CT4730_PCI_ID)){
 		bus_space_write_4(es->st, es->sh, ES1370_REG_STATUS, 0x20000000);
 		DELAY(20000);
 		if (debug > 0) device_printf(dev, "ac97 2.1 enabled\n");
@@ -792,6 +797,17 @@ es_pci_probe(device_t dev)
 		device_printf(dev, "unknown revision %d -- please report to cg@freebsd.org\n", pci_get_revid(dev));
 		return 0;
 
+	case CT4730_PCI_ID:
+		switch(pci_get_revid(dev)) {
+		case CT4730REV_CT4730_A:
+			device_set_desc(dev, "Creative SB AudioPCI CT4730");
+			return 0;
+		default:
+ 			device_set_desc(dev, "Creative SB AudioPCI CT4730-?");
+			device_printf(dev, "unknown revision %d -- please report to cg@freebsd.org\n", pci_get_revid(dev));
+ 			return 0;
+     		}
+
 	case CT5880_PCI_ID:
 		switch(pci_get_revid(dev)) {
 		case CT5880REV_CT5880_C:
@@ -869,7 +885,8 @@ es_pci_attach(device_t dev)
 
 	if (pci_get_devid(dev) == ES1371_PCI_ID ||
 	    pci_get_devid(dev) == ES1371_PCI_ID2 ||
-	    pci_get_devid(dev) == CT5880_PCI_ID) {
+	    pci_get_devid(dev) == CT5880_PCI_ID ||
+	    pci_get_devid(dev) == CT4730_PCI_ID) { 
 		if(-1 == es1371_init(es, dev)) {
 			device_printf(dev, "unable to initialize the card\n");
 			goto bad;
diff -pur pci/fm801.c pci-ed/fm801.c
--- pci/fm801.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/fm801.c	2005-07-19 05:17:17.000000000 +0800
@@ -337,7 +337,8 @@ fm801ch_init(kobj_t obj, void *devinfo, 
 	ch->channel = c;
 	ch->buffer = b;
 	ch->dir = dir;
-	if (sndbuf_alloc(ch->buffer, fm801->parent_dmat, fm801->bufsz) == -1) return NULL;
+	if (sndbuf_alloc(ch->buffer, fm801->parent_dmat, fm801->bufsz) != 0) 
+		return NULL;
 	return (void *)ch;
 }
 
diff -pur pci/ich.c pci-ed/ich.c
--- pci/ich.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/ich.c	2005-07-19 05:17:17.000000000 +0800
@@ -281,7 +281,7 @@ ichchan_init(kobj_t obj, void *devinfo, 
 		return NULL;
 	}
 
-	if (sndbuf_alloc(ch->buffer, sc->dmat, sc->bufsz))
+	if (sndbuf_alloc(ch->buffer, sc->dmat, sc->bufsz) != 0)
 		return NULL;
 
 	ich_wr(sc, ch->regbase + ICH_REG_X_BDBAR, (u_int32_t)vtophys(ch->dtbl), 4);
diff -pur pci/maestro3.c pci-ed/maestro3.c
--- pci/maestro3.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/maestro3.c	2005-07-19 05:17:17.000000000 +0800
@@ -386,7 +386,7 @@ m3_pchan_init(kobj_t kobj, void *devinfo
 	ch->channel = c;
 	ch->fmt = AFMT_U8;
 	ch->spd = DSP_DEFAULT_SPEED;
-	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) == -1) {
+	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) != 0) {
 		device_printf(sc->dev, "m3_pchan_init chn_allocbuf failed\n");
 		return NULL;
 	}
@@ -666,7 +666,7 @@ m3_rchan_init(kobj_t kobj, void *devinfo
 	ch->channel = c;
 	ch->fmt = AFMT_U8;
 	ch->spd = DSP_DEFAULT_SPEED;
-	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) == -1) {
+	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) != 0) {
 		device_printf(sc->dev, "m3_rchan_init chn_allocbuf failed\n");
 		return NULL;
 	}
diff -pur pci/solo.c pci-ed/solo.c
--- pci/solo.c	2005-06-11 07:06:59.000000000 +0800
+++ pci-ed/solo.c	2005-07-19 05:17:17.000000000 +0800
@@ -520,7 +520,7 @@ esschan_init(kobj_t obj, void *devinfo, 
 	ch->channel = c;
 	ch->buffer = b;
 	ch->dir = dir;
-	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) == -1)
+	if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) != 0)
 		return NULL;
 	ch->hwch = 1;
 	if ((dir == PCMDIR_PLAY) && (sc->duplex))
diff -pur pci/via8233.c pci-ed/via8233.c
--- pci/via8233.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/via8233.c	2005-07-19 05:17:17.000000000 +0800
@@ -371,7 +371,7 @@ via8233chan_init(kobj_t obj, void *devin
 		via_wr(via, VIA_WR0_SGD_FORMAT, WR_FIFO_ENABLE, 1);
 	}
 
-	if (sndbuf_alloc(ch->buffer, via->parent_dmat, via->bufsz) == -1)
+	if (sndbuf_alloc(ch->buffer, via->parent_dmat, via->bufsz) != 0)
 		return NULL;
 
 	via8233chan_reset(via, ch);
diff -pur pci/via82c686.c pci-ed/via82c686.c
--- pci/via82c686.c	2005-05-25 04:59:04.000000000 +0800
+++ pci-ed/via82c686.c	2005-07-19 05:17:17.000000000 +0800
@@ -262,7 +262,7 @@ viachan_init(kobj_t obj, void *devinfo, 
 		ch->mode = VIA_RECORD_MODE;
 	}
 
-	if (sndbuf_alloc(ch->buffer, via->parent_dmat, via->bufsz) == -1)
+	if (sndbuf_alloc(ch->buffer, via->parent_dmat, via->bufsz) != 0)
 		return NULL;
 	return ch;
 }
