From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 1 22:00:27 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD9CB16A4BF for ; Mon, 1 Sep 2003 22:00:27 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4395943FAF for ; Mon, 1 Sep 2003 22:00:27 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8250RUp062622 for ; Mon, 1 Sep 2003 22:00:27 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8250RrX062621; Mon, 1 Sep 2003 22:00:27 -0700 (PDT) Date: Mon, 1 Sep 2003 22:00:27 -0700 (PDT) Message-Id: <200309020500.h8250RrX062621@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Orion Hodson Subject: Re: kern/55395:ICH sampling rate changes after resume from suspend X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Orion Hodson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 05:00:28 -0000 The following reply was made to PR kern/55395; it has been noted by GNATS. From: Orion Hodson To: "Kevin Oberman" Cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/55395:ICH sampling rate changes after resume from suspend Date: Mon, 01 Sep 2003 21:58:06 -0700 This is a multipart MIME message. --==_Exmh_-18846300150 Content-Type: text/plain; charset=us-ascii /-- "Kevin Oberman" wrote: | A bit more information: | | Modifying hw.snd.ac97rate makes not difference at all. I measured the | speed-up as about 10% or the equivalent of 52.3 KHz. Ah, okay, it's coming back up and using the wrong clock source. We've had a general issue with this on the ICH. This is probably a function of how the existing ich code effects resets, though don't have an ich box that manifests the problem to verify this first hand. Can you try the attached patch and see if it improves the situation? Thanks - Orion --==_Exmh_-18846300150 Content-Type: application/x-patch ; name="ich.reset.patch" Content-Description: ich.reset.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ich.reset.patch" Index: sys/dev/sound/pci/ich.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/dev/sound/pci/ich.c,v retrieving revision 1.3.2.13 diff -u -u -r1.3.2.13 ich.c --- sys/dev/sound/pci/ich.c 18 Aug 2003 15:41:01 -0000 1.3.2.13 +++ sys/dev/sound/pci/ich.c 2 Sep 2003 04:49:20 -0000 @@ -32,7 +32,7 @@ #include #include = -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.3.2.13 2003/= 08/18 15:41:01 orion Exp $"); +SND_DECLARE_FILE("$FreeBSD$"); = /* -------------------------------------------------------------------- = */ = @@ -565,13 +565,22 @@ static int ich_init(struct sc_info *sc) { - u_int32_t stat; + u_int32_t cnt, stat; int sz; = - ich_wr(sc, ICH_REG_GLOB_CNT, ICH_GLOB_CTL_COLD, 4); + /* Effect a cold reset (XXX todo warm reset) */ + /* assert COLD_RESET# lo */ + cnt =3D ich_rd(sc, ICH_REG_GLOB_CNT, 4); + cnt &=3D ~ICH_GLOB_CTL_COLD; + ich_wr(sc, ICH_REG_GLOB_CNT, cnt, 4); DELAY(600000); - stat =3D ich_rd(sc, ICH_REG_GLOB_STA, 4); = + /* assert COLD_RESET# hi */ + cnt =3D ich_rd(sc, ICH_REG_GLOB_CNT, 4); + cnt |=3D ICH_GLOB_CTL_COLD; + ich_wr(sc, ICH_REG_GLOB_CNT, ICH_GLOB_CTL_COLD, 4); + + stat =3D ich_rd(sc, ICH_REG_GLOB_STA, 4); if ((stat & ICH_GLOB_STA_PCR) =3D=3D 0) { /* ICH4/ICH5 may fail when busmastering is enabled. Continue */ if ((pci_get_devid(sc->dev) !=3D ICH4ID) && --==_Exmh_-18846300150--