From nobody@FreeBSD.org  Mon May 28 20:04:15 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A04B316A53D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 May 2007 20:04:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 9104113C457
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 May 2007 20:04:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4SK4FSh062795
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 May 2007 20:04:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l4SK4FGH062794;
	Mon, 28 May 2007 20:04:15 GMT
	(envelope-from nobody)
Message-Id: <200705282004.l4SK4FGH062794@www.freebsd.org>
Date: Mon, 28 May 2007 20:04:15 GMT
From: Konrad<konrad@emanuryn.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fix (enable) phone out for laptops with ALC655.
X-Send-Pr-Version: www-3.0

>Number:         113101
>Category:       kern
>Synopsis:       [pcm] [patch] Fix (enable) phone out for laptops with ALC655.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ariff
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 28 20:10:03 GMT 2007
>Closed-Date:    Fri Jun 08 17:34:29 GMT 2007
>Last-Modified:  Fri Jun  8 17:40:01 GMT 2007
>Originator:     Konrad
>Release:        7.0-CURRENT
>Organization:
Gdansk University of Technology
>Environment:
FreeBSD predator.ether.net 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue May  8 13:49:52 CEST 2007     versus@predator.ether.net:/usr/src/sys/i386/compile/VERSUS  i386
>Description:
For a few months I was unable to use my laptop with external headphones.

Today I tried ALSA under Knoppix, and saw interesting switch in alsamixer
named front duplication or something, which made my headphones output sound.

Then I downloaded ALC655 spec and found, that by default surround out is
enabled in bit 0 of 0x6a reg, so the signal only does to front speakers,
and headphones apparently aren't front speakers. :) In the sheet it's called:
S-OUT is duplicated output of LINE-OUT.
>How-To-Repeat:
Install FreeBSD on Amilo Pro V2055, start xmms and connect headphones, or
start mplayer in full screen (after patching the OpenChrome driver like I
did), and connect your laptop to a sound system, and try to hear something. :) 
>Fix:
--- old.c       Mon May 28 21:47:55 2007
+++ ac97_patch.c        Mon May 28 21:49:59 2007
@@ -94,4 +94,12 @@
        default:
                break;
        }
+
+        /*
+         * Amilo Pro V2055 with ALC655 has phone out by default
+         * disabled (surround on), leaving us only with internal speakers. This
+         * should really go to mixer. We write the Data Flow Control reg.
+         */
+        ac97_wrcd(codec, 0x6a, ac97_rdcd(codec, 0x6a) | 1);
+
 }


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Jun 2 19:09:19 UTC 2007 
State-Changed-Why:  
To which file does this patch apply? 


Responsible-Changed-From-To: freebsd-i386->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 2 19:09:19 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=113101 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 3 22:15:28 UTC 2007 
State-Changed-Why:  
Over to maintainer(s). 


Responsible-Changed-From-To: linimon->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jun 3 22:15:28 UTC 2007 
Responsible-Changed-Why:  

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

From: Ariff Abdullah <ariff@FreeBSD.org>
To: bug-followup@FreeBSD.org,konrad@emanuryn.pl
Cc:  
Subject: Re: kern/113101: [pcm] [patch] Fix (enable) phone out for laptops 
 with ALC655.
Date: Mon, 4 Jun 2007 18:54:45 +0800

 Please post the output of pciconf -lv | grep pcm . While this seems
 to solve your specific model problem, it could introduce a regression
 for other people with different type of hardwares but simmilar codec.
 
 
 Thanks.
 
 --
 Ariff Abdullah
 FreeBSD
 
 ... Recording in stereo is obviously too advanced
     and confusing for us idiot ***** users :P ........

From: konrad@egipt-medytacje.pl
To: Ariff Abdullah <ariff@FreeBSD.org>, bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/113101: [pcm] [patch] Fix (enable) phone out for laptops with
	ALC655.
Date: Mon, 04 Jun 2007 23:49:28 +0200

 Well, I think there should be no regressions, unless somebody is using 4-channel sound, because we only enable additional output of channels 1 and 2, disabling channels 3 and 4.
 Here You go:
 pcm0@pci0:17:5: class=0x040100 card=0x10ca1734 chip=0x30591106 rev=0x60 hdr=0x00
Responsible-Changed-From-To: freebsd-multimedia->ariff 
Responsible-Changed-By: ariff 
Responsible-Changed-When: Tue Jun 5 17:28:40 UTC 2007 
Responsible-Changed-Why:  
Let me handle this. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/113101: commit references a PR
Date: Tue,  5 Jun 2007 20:12:47 +0000 (UTC)

 ariff       2007-06-05 20:12:41 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/sound/pcm    ac97_patch.c 
   Log:
   Fix (enable) phone out for laptops with ALC655, specifically
   for Amilo Pro V2055.
   
   PR:             kern/113101
   Submitted by:   konrad@egipt-medytacje.pl
   MFC after:      3 days
   
   Revision  Changes    Path
   1.9       +9 -0      src/sys/dev/sound/pcm/ac97_patch.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: ariff 
State-Changed-When: Fri Jun 8 17:34:02 UTC 2007 
State-Changed-Why:  
Fix committed. Thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/113101: commit references a PR
Date: Fri,  8 Jun 2007 17:33:47 +0000 (UTC)

 ariff       2007-06-08 17:33:38 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/dev/sound/pcm    ac97_patch.c 
   Log:
   MFC: (revision 1.9)
   
   Fix (enable) phone out for laptops with ALC655, specifically
   for Amilo Pro V2055.
   
   PR:             kern/113101
   Submitted by:   konrad@egipt-medytacje.pl
   
   Revision  Changes    Path
   1.3.2.3   +9 -0      src/sys/dev/sound/pcm/ac97_patch.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
