From CQG00620@nifty.ne.jp  Sun Nov 24 05:23:54 2002
Return-Path: <CQG00620@nifty.ne.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9E8DF37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Nov 2002 05:23:54 -0800 (PST)
Received: from smtp2.nifty.ne.jp (smtp2.nifty.ne.jp [202.219.63.54])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8894943E3B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Nov 2002 05:23:53 -0800 (PST)
	(envelope-from CQG00620@nifty.ne.jp)
Received: from nifty.ne.jp (mcda014n021.ppp.infoweb.ne.jp [61.124.80.148])
	by smtp2.nifty.ne.jp (8.9.3+3.2W/3.7W-991025) with ESMTP id WAA11027
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Nov 2002 22:23:45 +0900 (JST)
Message-Id: <200211241323.WAA11027@smtp2.nifty.ne.jp>
Date: Sun, 24 Nov 2002 22:21:08 +0900
From: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: PC98 internal CS4231A is mis-detected to OPTi chip (newpcm)

>Number:         45673
>Category:       kern
>Synopsis:       [sound] [patch] PC98 internal CS4231A is mis-detected to OPTi chip [4.5]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 24 05:30:01 PST 2002
>Closed-Date:    Sun Sep 11 10:08:10 GMT 2005
>Last-Modified:  Sun Sep 11 10:08:10 GMT 2005
>Originator:     Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
>Environment:
System: FreeBSD aries.zodiac.org 4.5-RELEASE FreeBSD 4.5-RELEASE #13: Sun Nov 24 15:30:52 JST 2002     nabe@aries.zodiac.org:/usr/src/sys/compile/LEFTEYE  i386

I'm tested on PC-9821Xa9.

>Description:
PC98 internal CS4231A, which used mostly PC-9821xx and some models of
PC-9801xx, is mis-detected to OPTi chip.

I think there isn't a soundcard which use a OPTi chip and also can use PC98.

>How-To-Repeat:
*kernel configuration*

 device  pcm0    at isa? port 0xf40 irq 10 drq 1 flags 0x10000


*dmesg*

 Found OPTi device OPTi930
 pcm0: <OPTi930> at port 0xf40-0xf47,0xf8f-0xf97,0xe0e irq 10 drq 1 flags 0x1b000 on isa0
 drq/irq conf 1a
 

*dmesg - applied this patch*

 pcm0: <CS4231A> at port 0xf40-0xf47 irq 10 drq 1 flags 0x1a100 on isa0
 drq/irq conf 1a

>Fix:
--- mss.c.original	Sun Nov 24 16:55:40 2002
+++ mss.c	Sun Nov 24 17:17:07 2002
@@ -1341,6 +1341,7 @@
     	name = "AD1848";
     	mss->bd_id = MD_AD1848; /* AD1848 or CS4248 */
 
+#ifndef PC98
 	if (opti_detect(dev, mss)) {
 		switch (mss->bd_id) {
 			case MD_OPTI924:
@@ -1353,6 +1354,7 @@
 		printf("Found OPTi device %s\n", name);
 		if (opti_init(dev, mss) == 0) goto gotit;
 	}
+#endif
 
    	/*
      	* Check that the I/O address is in use.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sat Dec 21 04:53:23 PST 2002 
Responsible-Changed-Why:  
I'm not sure if this should be a sound or a pc98 report, but 
the sound guys will know what to do with it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45673 
State-Changed-From-To: open->closed 
State-Changed-By: netchild 
State-Changed-When: Sun Sep 11 10:07:57 GMT 2005 
State-Changed-Why:  
Comimted, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45673 
>Unformatted:
