From regnauld@moof.catpipe.net  Sat May 14 12:55:47 2005
Return-Path: <regnauld@moof.catpipe.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EF2CE16A4D0
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 May 2005 12:55:47 +0000 (GMT)
Received: from moof.catpipe.net (moof.catpipe.net [195.249.214.130])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 973FC43D64
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 May 2005 12:55:47 +0000 (GMT)
	(envelope-from regnauld@moof.catpipe.net)
Received: from localhost (localhost [127.0.0.1])
	by localhost.catpipe.net (Postfix) with ESMTP id 8042E1B385
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 May 2005 14:55:45 +0200 (CEST)
Received: from moof.catpipe.net ([127.0.0.1])
 by localhost (moof.catpipe.net [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 21293-10 for <FreeBSD-gnats-submit@freebsd.org>;
 Sat, 14 May 2005 14:55:41 +0200 (CEST)
Received: by moof.catpipe.net (Postfix, from userid 1001)
	id 07EB51B3AA; Sat, 14 May 2005 14:55:40 +0200 (CEST)
Message-Id: <20050514125354.6B44D17001@flow.starbsd.org>
Date: Sat, 14 May 2005 14:55:40 +0200
From: Phil Regnauld <regnauld@catpipe.net>
Reply-To: Phil Regnauld <regnauld@catpipe.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Intel ICH3 sound chip reverts to 48KHz after suspend/resume
X-Send-Pr-Version: 3.113

>Number:         81013
>Category:       kern
>Synopsis:       [sound] [patch] Intel ICH3 sound chip reverts to 48KHz after suspend/resume
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 14 13:00:20 GMT 2005
>Closed-Date:    Fri Jan 06 15:25:26 GMT 2006
>Last-Modified:  Fri Jan 06 15:25:26 GMT 2006
>Originator:     Phil Regnauld
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
catpipe Systems ApS
>Environment:
System: FreeBSD flow.eu.org 6.0-CURRENT FreeBSD 6.0-CURRENT #2: Wed May 11 13:03:32 CEST 2005 root@flow.eu.org:/usr/obj/usr/src/sys/FLOW5 i386


>Description:
	The ICH series of sound chips apparently only handle 48KHz fixed rate.
	To work around this, the FreeBSD sound driver does resampling.

	Unfortunately, it seems that on the tested system (IBM ThinkPad X23
	with ICH3 -- see below), suspending via acpiconf -s 3, and later
	resuming causes samples to be played at 48KHz again.

	The result is music running 10% faster (which is indeed audible).

	This has been observed on 5.3-STABLE and 6.0-CURRENT.

	pcm0: <Intel ICH3 (82801CA)> at io 0x1c00, 0x18c0 irq 9 bufsz 16384  (1p/1r/2v channels duplex default)

	It should be possible to reset the driver ?  Since the sound driver
	is compiled in, unloading/reloading the driver has not (yet) been
	tested.

>How-To-Repeat:
	
	acpiconf -s 3
	resume system

	Play something via mpg123 or xmms

	mplayer -speed 0.92 (44.1/48*100) will allow one to play the
	music / media at the right speed.

>Fix:

	No fix known.
>Release-Note:
>Audit-Trail:

From: Ariff Abdullah <skywizard@MyBSD.org.my>
To: Phil Regnauld <regnauld@catpipe.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: misc/81013: Intel ICH3 sound chip reverts to 48KHz after
 suspend/resume
Date: Sat, 14 May 2005 21:57:30 +0800

 This is a multi-part message in MIME format.
 
 --Multipart=_Sat__14_May_2005_21_57_30_+0800_ULanHjNbSE+WdX8R
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 This is indeed a long standing issue. Can you try this patch?
 
 --
 Ariff Abdullah
 MyBSD
 
 --Multipart=_Sat__14_May_2005_21_57_30_+0800_ULanHjNbSE+WdX8R
 Content-Type: application/octet-stream;
  name="vchan.c.diff"
 Content-Disposition: attachment;
  filename="vchan.c.diff"
 Content-Transfer-Encoding: base64
 
 LS0tIHN5cy9kZXYvc291bmQvcGNtL3ZjaGFuLmMub3JpZwlTYXQgTWF5IDE0IDIxOjUxOjMxIDIw
 MDUKKysrIHN5cy9kZXYvc291bmQvcGNtL3ZjaGFuLmMJU2F0IE1heSAxNCAyMTo1MzoyOSAyMDA1
 CkBAIC0yOTIsMTAgKzI5MiwyMSBAQAogICAgCUNITl9MT0NLKHBhcmVudCk7CiAJLyogWFhYIGdy
 b3NzIHVnbHkgaGFjaywgbXVyZGVyIGRlYXRoIGtpbGwgKi8KIAlpZiAoZmlyc3QgJiYgIWVycikg
 eworCQlzdHJ1Y3QgcGNtY2hhbl9jYXBzICpwYXJlbnRfY2FwczsKKwkJaW50IHNwZWVkOworCiAJ
 CWVyciA9IGNobl9yZXNldChwYXJlbnQsIEFGTVRfU1RFUkVPIHwgQUZNVF9TMTZfTEUpOwogCQlp
 ZiAoZXJyKQogCQkJcHJpbnRmKCJjaG5fcmVzZXQ6ICVkXG4iLCBlcnIpOwotCQllcnIgPSBjaG5f
 c2V0c3BlZWQocGFyZW50LCA0NDEwMCk7CisKKwkJcGFyZW50X2NhcHMgPSBjaG5fZ2V0Y2Fwcyhw
 YXJlbnQpOworCisJCWlmIChwYXJlbnRfY2FwcyAhPSBOVUxMKQorCQkJc3BlZWQgPSBwYXJlbnRf
 Y2Fwcy0+bWF4c3BlZWQ7CisJCWVsc2UKKwkJCXNwZWVkID0gNDQxMDA7CisKKwkJZXJyID0gY2hu
 X3NldHNwZWVkKHBhcmVudCwgc3BlZWQpOwogCQlpZiAoZXJyKQogCQkJcHJpbnRmKCJjaG5fc2V0
 c3BlZWQ6ICVkXG4iLCBlcnIpOwogCX0K
 
 --Multipart=_Sat__14_May_2005_21_57_30_+0800_ULanHjNbSE+WdX8R--

From: Phil Regnauld <regnauld@catpipe.net>
To: Ariff Abdullah <skywizard@MyBSD.org.my>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: misc/81013: Intel ICH3 sound chip reverts to 48KHz after suspend/resume
Date: Sat, 14 May 2005 18:42:39 +0200

 Ariff Abdullah (skywizard) writes:
 > 
 > 
 > This is indeed a long standing issue. Can you try this patch?
 
 	That fixed it!
 
 	By the way, my PR was a dupe of kern/55395.  The patch in 
 	that PR, while it does apply, does not resolve the problem:
 	snd_ich fails to attach with it.  Your patch works, and seems
 	to do so in an architecture independent way.
 
 	Note: the problem could be, before your patch, "worked" around
 	by unloading/reloading snd_ich.
 
 	Test: suspended and resumed, and the playback rate remained
 	the same.
 
 	Thanks!
 
 	Phil
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat May 14 18:26:31 GMT 2005 
Responsible-Changed-Why:  
Fix up and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81013 
State-Changed-From-To: open->closed 
State-Changed-By: netchild 
State-Changed-When: Fri Jan 6 15:25:04 UTC 2006 
State-Changed-Why:  
This is fixed in 6-stable and -current. 

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