Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 1999 12:07:59 +0900
From:      tanimura@r.dl.itc.u-tokyo.ac.jp
To:        peter@netplex.com.au
Cc:        tanimura@r.dl.itc.u-tokyo.ac.jp
Subject:   Re: sbc and pcm 
Message-ID:  <14403.16271.710054.81928B@rina.r.dl.itc.u-tokyo.ac.jp>
In-Reply-To: In your message of "Tue, 30 Nov 1999 11:09:15 %2B0900" <14403.12747.511556.68187Y@rina.r.dl.itc.u-tokyo.ac.jp>
References:  <winter@jurai.net> <Pine.BSF.4.20.9911221427070.7305-100000@sasami.jurai.net> <19991122202239.5A75C1C6D@overcee.netplex.com.au> <14403.12747.511556.68187Y@rina.r.dl.itc.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Tue_Nov_30_12:07:59_1999-1
Content-Type: text/plain; charset=US-ASCII

The following patch makes sbc_probe() to look at the vendor ID only
for AWE64. Also, any device that has a logical ID matching 0x??0080ce
should get probed.



--Multipart_Tue_Nov_30_12:07:59_1999-1
Content-Type: text/plain; type=patch; charset=US-ASCII
Content-Disposition: attachment; filename="sbc.c.diff"
Content-Transfer-Encoding: 7bit

Index: sbc.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/isa/sbc.c,v
retrieving revision 1.2
diff -u -r1.2 sbc.c
--- sbc.c	1999/11/27 06:33:27	1.2
+++ sbc.c	1999/11/30 02:46:00
@@ -86,86 +86,32 @@
 static int
 sbc_probe(device_t dev)
 {
-	u_int32_t vend_id, logical_id, vend_id2;
+	u_int32_t vend_id, logical_id;
 	char *s;
 	struct sndcard_func *func;
 
 	vend_id = isa_get_vendorid(dev);
-	vend_id2 = vend_id & 0xff00ffff;
 	logical_id = isa_get_logicalid(dev);
 	s = NULL;
 
-	switch (logical_id) {
-#if notdef
-	case 0x0000630e: /* Crystal Semiconductor */
-		if (vend_id2 ==0x3600630e) /* CS4236 */
-			s = "CS4236";
-		else if (vend_id2 ==0x3200630e) /* CS4232 */
-			s = "CS4232";
-		else if (vend_id2 ==0x3500630e) /* CS4236B */
-			s = "CS4236B";
-		break;
-#endif /* notdef */
-	case 0x01008c0e: /* Creative ViBRA16C */
-		if (vend_id2 == 0x70008c0e)
-			s = "Creative ViBRA16C PnP";
-		break;
-	case 0x43008c0e: /* Creative ViBRA16X */
-		if (vend_id2 == 0xf0008c0e)
-			s = "Creative ViBRA16C PnP";
-		break;
-	case 0x31008c0e: /* Creative SB */
-		if (vend_id2 == 0x26008c0e)
-			s = "Creative SB16 PnP";
-		else if (vend_id2 == 0x42008c0e)
-			s = "Creative SB32 (CTL0042)";
-		else if (vend_id2 == 0x44008c0e)
-			s = "Creative SB32 (CTL0044)";
-		else if (vend_id2 == 0x48008c0e)
-			s = "Creative SB32 (CTL0048)";
-		else if (vend_id2 == 0x49008c0e)
-			s = "Creative SB32 (CTL0049)";
-		else if (vend_id2 == 0xf1008c0e)
-			s = "Creative SB32 (CTL00f1)";
-		break;
-	case 0x42008c0e: /* Creative SB AWE64 (CTL00c1) */
-		if (vend_id2 == 0xc1008c0e)
-			s = "Creative SB AWE64 (CTL00c1)";
-		break;
-	case 0x45008c0e: /* Creative SB AWE64 (CTL0045) */
-		if (vend_id2 == 0xe4008c0e)
-			s = "Creative SB AWE64 (CTL0045)";
-		break;
-#if notdef
-	case 0x01200001: /* Avance Logic */
-		if (vend_id2 == 0x20009305)
-			s = "Avance Logic ALS120";
-		break;
-	case 0x01100001: /* Avance Asound */
-		if (vend_id2 == 0x10009305)
-			s = "Avance Asound 110";
-		break;
-	case 0x68187316: /* ESS1868 */
-		if (vend_id2 == 0x68007316)
-			s = "ESS ES1868 Plug and Play AudioDrive";
-		break;
-	case 0x79187316: /* ESS1879 */
-		if (vend_id2 == 0x79007316)
-			s = "ESS ES1879 Plug and Play AudioDrive";
-		break;
-	case 0x2100a865: /* Yamaha */
-		if (vend_id2 == 0x2000a865)
-			s = "Yamaha OPL3-SA2/SAX Sound Board";
-		break;
-	case 0x80719304: /* Terratec */
-		if (vend_id2 == 0x1114b250)
-			s = "Terratec Soundsystem Base 1";
-		break;
-	case 0x0300561e: /* Gravis */
-		if (vend_id2 == 0x0100561e)
-			s = "Gravis UltraSound Plug & Play";
-		break;
-#endif /* notdef */
+	if ((logical_id & 0x00ffffff) == 0x00008c0e) {
+		/* Creative */
+		s = "Creative SB PnP";
+		if ((vendor_id & 0x80ffffff) == 0x80008c0e) /* SB AWE64 */
+			s = "Creative SB AWE64 PnP";
+		else {
+			switch (logical_id) {
+			case 0x01008c0e: /* ViBRA16C */
+				s = "Creative ViBRA16C PnP";
+				break;
+			case 0x43008c0e: /* ViBRA16X */
+				s = "Creative ViBRA16X PnP";
+				break;
+			case 0x31008c0e: /* SB16/AWE32 */
+				s = "Creative SB16/AWE32 PnP";
+				break;
+			}
+		}
 	}
 
 	if (s != NULL) {

--Multipart_Tue_Nov_30_12:07:59_1999-1--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14403.16271.710054.81928B>