From owner-freebsd-current Mon Nov 29 19: 8:12 1999 Delivered-To: freebsd-current@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (rina.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id C277D15556 for ; Mon, 29 Nov 1999 19:08:05 -0800 (PST) (envelope-from tanimura@r.dl.itc.u-tokyo.ac.jp) Received: from rina.r.dl.itc.u-tokyo.ac.jp (localhost [127.0.0.1]) by rina.r.dl.itc.u-tokyo.ac.jp (8.9.3+3.2W/3.7W-r-0.1-19990829) with ESMTP id MAA81069; Tue, 30 Nov 1999 12:08:00 +0900 (JST) Date: Tue, 30 Nov 1999 12:07:59 +0900 Message-ID: <14403.16271.710054.81928B@rina.r.dl.itc.u-tokyo.ac.jp> From: tanimura@r.dl.itc.u-tokyo.ac.jp To: peter@netplex.com.au Cc: winter@jurai.net, hibma@skylink.it, current@FreeBSD.ORG Subject: Re: sbc and pcm In-Reply-To: In your message of "Tue, 30 Nov 1999 11:09:15 +0900" <14403.12747.511556.68187Y@rina.r.dl.itc.u-tokyo.ac.jp> References: <19991122202239.5A75C1C6D@overcee.netplex.com.au> <14403.12747.511556.68187Y@rina.r.dl.itc.u-tokyo.ac.jp> Cc: tanimura@r.dl.itc.u-tokyo.ac.jp User-Agent: Wanderlust/1.0.3 (Notorious) SEMI/1.13.4 (Terai) FLIM/1.12.7 (=?ISO-8859-4?Q?Y=FEzaki?=) MULE XEmacs/21.1 (patch 6) (Big Bend) (i386--freebsd) Organization: Digital Library Research Division, Information Techinology Centre, The University of Tokyo MIME-Version: 1.0 (generated by SEMI 1.13.4 - "Terai") Content-Type: multipart/mixed; boundary="Multipart_Tue_Nov_30_12:07:59_1999-1" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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