Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2003 22:00:27 -0700 (PDT)
From:      Orion Hodson <orion@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/55395:ICH sampling rate changes after resume from suspend 
Message-ID:  <200309020500.h8250RrX062621@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/55395; it has been noted by GNATS.

From: Orion Hodson <orion@freebsd.org>
To: "Kevin Oberman" <oberman@es.net>
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 <pci/pcireg.h>
  #include <pci/pcivar.h>
  =
 
 -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--
 
 



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