From chris@cmc.optus.net.au  Mon Jul  7 04:04:24 2003
Return-Path: <chris@cmc.optus.net.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6D71E37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jul 2003 04:04:24 -0700 (PDT)
Received: from zippy.cmc.optus.net.au (zippy.cmc.optus.net.au [198.142.244.126])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E9A9A43F85
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jul 2003 04:04:22 -0700 (PDT)
	(envelope-from chris@cmc.optus.net.au)
Received: (from smtpd@localhost)
	by zippy.cmc.optus.net.au (8.8.8+Sun/8.8.8) id VAA06838;
	Mon, 7 Jul 2003 21:04:21 +1000 (EST)
Received: from cmcd08.cmc.optus.net.au(198.142.244.57), claiming to be "cmc.optus.net.au"
 via SMTP by zippy.cmc.optus.net.au, id smtpdAAA.nXqw_; Mon Jul  7 21:04:16 2003
Message-Id: <3F0953AA.7060702@cmc.optus.net.au>
Date: Mon, 07 Jul 2003 21:04:10 +1000
From: Chris Keladis <chris@cmc.optus.net.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Chris Keladis <chris@cmc.optus.net.au>
Subject: [PATCH] Updates for AC97 audio (ICH5/R & ALC-655 Codec)

>Number:         54176
>Category:       kern
>Synopsis:       [PATCH] Updates for AC97 audio (ICH5/R & ALC-655 Codec)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sound
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 07 04:10:14 PDT 2003
>Closed-Date:    Mon Aug 11 22:13:44 PDT 2003
>Last-Modified:  Mon Aug 11 22:13:44 PDT 2003
>Originator:     Chris Keladis
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
>Environment:

Tracking RELENG_5_1 (19/06/2003 snapshot)

ich.c:
$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.28 2003/04/16 03:16:55 mdodd Exp $

ac97.c:
$FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.42 2003/04/23 16:49:53 jhb Exp $



>Description:
	Kernel does not detect pcm device at all on bootup with such hardware.

>How-To-Repeat:
	N/A
>Fix:

	Patches Below. Seem to work ok, no problem with audio. Have not tested
	recording or other features apart from playback but i expect they would
	work ok.


--- ac97.c.diff begins here ---
--- ac97_28-07-2003.c	Thu Apr 24 02:49:53 2003
+++ ac97.c	Sat Jun 28 12:36:20 2003
@@ -136,6 +136,7 @@
  	{ 0x414c4710, 0x0f, 0, "ALC200", 	0 },
  	{ 0x414c4740, 0x0f, 0, "ALC202", 	0 },
  	{ 0x414c4720, 0x0f, 0, "ALC650", 	0 },
+	{ 0x414c4760, 0x0f, 0, "ALC655",	0 },
  	{ 0x43525900, 0x07, 0, "CS4297", 	0 },
  	{ 0x43525910, 0x07, 0, "CS4297A", 	0 },
  	{ 0x43525920, 0x07, 0, "CS4294/98",	0 },
--- ac97.c.diff ends here ---

--- ich.c.diff begins here ---
--- ich_28-06-2003.c	Wed Apr 16 13:16:55 2003
+++ ich.c	Sun Jun 29 16:17:17 2003
@@ -43,6 +43,7 @@

  #define SIS7012ID       0x70121039      /* SiS 7012 needs special 
handling */
  #define ICH4ID		0x24c58086	/* ICH4 needs special handling too */
+#define ICH5ID		0x24d58086	/* ICH5 special handling */

  /* buffer descriptor */
  struct ich_desc {
@@ -577,8 +578,8 @@
  	stat = ich_rd(sc, ICH_REG_GLOB_STA, 4);

  	if ((stat & ICH_GLOB_STA_PCR) == 0) {
-		/* ICH4 may fail when busmastering is enabled. Continue */
-		if (pci_get_devid(sc->dev) != ICH4ID) {
+		/* ICH4/ICH5 may fail when busmastering is enabled. Continue */
+		if (pci_get_devid(sc->dev) != ICH4ID && pci_get_devid(sc->dev) != 
ICH5ID) {
  			return ENXIO;
  		}
  	}
@@ -630,6 +631,10 @@
  		device_set_desc(dev, "Intel 82801DB (ICH4)");
  		return 0;

+	case ICH5ID:
+		device_set_desc(dev, "Intel 82801EB (ICH5/ICH5R)");
+		return 0;
+
  	case SIS7012ID:
  		device_set_desc(dev, "SiS 7012");
  		return 0;
@@ -681,7 +686,7 @@
  	 * but doing so will mess things up here.  ich4 has enough new
  	 * features it warrants it's own driver.
  	 */
-	if (pci_get_devid(dev) == ICH4ID) {
+	if (pci_get_devid(dev) == ICH4ID || pci_get_devid(dev) == ICH5ID) {
  		pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1);
  	}

--- ich.c.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 21:53:10 PDT 2003 
Responsible-Changed-Why:  
Over to sound maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54176 

From: Brent Casavant <b.j.casavant@ieee.org>
To: freebsd-gnats-submit@FreeBSD.org, chris@cmc.optus.net.au
Cc:  
Subject: Re: kern/54176: [PATCH] Updates for AC97 audio (ICH5/R & ALC-655
 Codec)
Date: Tue, 29 Jul 2003 23:20:09 -0500 (CDT)

 Just wanted to report that this works for me on 5.1-RELEASE and a
 Gigabyte GA-8IK1100 motherboard.
 
 For some reason I couldn't get the patch to apply cleanly, but when
 merged by hand all went smoothly.
 
 Hope that helps,
 Brent Casavant
 
 -- 
 Brent Casavant			http://www.angeltread.org/
 KD5EMB				-.- -.. ..... . -- -...
 44 54'24"N 93 03'21"W 907FASL	EN34lv
State-Changed-From-To: open->closed 
State-Changed-By: orion 
State-Changed-When: Mon Aug 11 22:13:07 PDT 2003 
State-Changed-Why:  
This patch and a later revision have been applied to the source tree. 
Thanks 


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