From mistral@imasy.or.jp  Sat Mar  4 03:44:41 2006
Return-Path: <mistral@imasy.or.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D6B0516A420
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Mar 2006 03:44:41 +0000 (GMT)
	(envelope-from mistral@imasy.or.jp)
Received: from shimako.yamayuri.org (yumi.yamayuri.org [218.45.22.23])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5DA9043D45
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  4 Mar 2006 03:44:40 +0000 (GMT)
	(envelope-from mistral@imasy.or.jp)
Received: from shimako.yamayuri.org (localhost [127.0.0.1])
	by shimako.yamayuri.org (8.13.4/8.13.4/shimako) with ESMTP id k242kpE8005043
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 4 Mar 2006 12:01:52 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: (from sarumaru@localhost)
	by shimako.yamayuri.org (8.13.4/8.13.4/Submit) id k242kmSR005042;
	Sat, 4 Mar 2006 11:46:48 +0900 (JST)
	(envelope-from sarumaru)
Message-Id: <200603040246.k242kmSR005042@shimako.yamayuri.org>
Date: Sat, 4 Mar 2006 11:46:48 +0900 (JST)
From: Yoshihiko Sarumaru <mistral@imasy.or.jp>
Reply-To: Yoshihiko Sarumaru <mistral@imasy.or.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Turn on inverted external amplifier sense flags for Sony vaio type T
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94056
>Category:       kern
>Synopsis:       [ich] [patch] Turn on inverted external amplifier sense flags for Sony vaio type T
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 04 03:50:03 GMT 2006
>Closed-Date:    Sun Mar 12 09:59:15 GMT 2006
>Last-Modified:  Sun Mar 12 09:59:15 GMT 2006
>Originator:     Yoshihiko Sarumaru
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD shimako.yamayuri.org 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #1: Fri Feb 24 00:52:39 JST 2006 sarumaru@shimako.yamayuri.org:/usr/obj/usr/src/sys/VGN-T72 i386


	
>Description:
	It is already known that some machines that uses ich(4) sound driver
	must turn on inverted external amplifier sense flag, individually.
	See: Rev.1.57 and Rev.1.58

	My notebook also turned out to have to set the quirk.

	I'm afraid of some other unreported machines need this.
	Should it be configurable and noted to the NOTES or ich(4)?

[pciconf -lv]
pcm0@pci0:31:5: class=0x040100 card=0x81c0104d chip=0x24c58086 rev=0x03 hdr=0x00
    vendor   = 'Intel Corporation'
    device   = '82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller'
    class    = multimedia
    subclass = audio

>How-To-Repeat:
	echo ^G or play something having an audio track.

>Fix:
--- /usr/src/sys/dev/sound/pci/ich.c.orig	Sat Mar  4 11:31:33 2006
+++ /usr/src/sys/dev/sound/pci/ich.c	Sat Mar  4 11:29:40 2006
@@ -839,6 +839,7 @@
 	case 0x202f161f:	/* Gateway 7326GZ */
 	case 0x203a161f:	/* Gateway 4028GZ */
 	case 0x8144104d:	/* Sony VAIO PCG-TR* */
+	case 0x81c0104d:	/* Sony VAIO type T */
 	case 0x8197104d:	/* Sony S1XP */
 		ac97_setflags(sc->codec, ac97_getflags(sc->codec) | AC97_F_EAPD_INV);
 		break;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 4 05:13:59 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94056 
State-Changed-From-To: open->patched 
State-Changed-By: ariff 
State-Changed-When: Sun Mar 5 02:42:07 UTC 2006 
State-Changed-Why:  
Patched. MFC within 3 days. 

Take a look at http://people.freebsd.org/~ariff/test/eapd_inv/ , if 
you want to try an experimental external amplifier switch (through 
sysctl hw.snd.pcm<unit>.ac97_external_amplifier), sort of hardware 
mute / unmute. You can use hint.pcm.<unit>.ac97_eapd_inv="1" to set 
default inverted flags (which seems unnecessary since you can toggle 
it using sysctl). 

As I said, it's purely experimental. 

Thanks for the patch/submission. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94056 
State-Changed-From-To: patched->closed 
State-Changed-By: ariff 
State-Changed-When: Sun Mar 12 09:58:08 UTC 2006 
State-Changed-Why:  
Committed. Thanks. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=94056 
>Unformatted:
 >SEVERITY:	non-critical
