From nobody@FreeBSD.org  Tue Sep  2 04:21:05 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C66FC106568D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Sep 2008 04:21:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B26EA8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Sep 2008 04:21:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m824L5PM080486
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 2 Sep 2008 04:21:05 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m824L5FD080485;
	Tue, 2 Sep 2008 04:21:05 GMT
	(envelope-from nobody)
Message-Id: <200809020421.m824L5FD080485@www.freebsd.org>
Date: Tue, 2 Sep 2008 04:21:05 GMT
From: Dennis Generaloff <giantlock@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [snd_hda] Lenovo 3k N200, speakers not deactivated after headphones connecting
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127037
>Category:       kern
>Synopsis:       [snd_hda] [patch] Lenovo 3k N200, speakers not deactivated after headphones connecting
>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:   Tue Sep 02 04:30:01 UTC 2008
>Closed-Date:    Sun Sep 14 05:30:13 UTC 2008
>Last-Modified:  Sun Sep 14 05:30:13 UTC 2008
>Originator:     Dennis Generaloff
>Release:        7.1-PRERELEASE
>Organization:
>Environment:
FreeBSD 7.1-PRERELEASE #1: Tue Sep  2 04:53:34 MSD 2008     user@host:/usr/src/sys/GENERIC  i386
>Description:
On Lenovo 3k N200 laptop (uses snd_hda), speakers do no switch OFF when plugging a headphone in the jack connector.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- sys/dev/sound/pci/hda/hdac.c.orig	2008-07-22 23:52:23.000000000 +0400
+++ sys/dev/sound/pci/hda/hdac.c	2008-09-02 04:43:06.000000000 +0400
@@ -241,6 +241,7 @@
 /* Lenovo */
 #define LENOVO_VENDORID		0x17aa
 #define LENOVO_3KN100_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2066)
+#define LENOVO_3KN200_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
 #define LENOVO_TCA55_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
 #define LENOVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
 
@@ -699,6 +700,8 @@
 	    0, 0, -1, 10, { 13, -1 }, -1 },
 	{ LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL,
 	    1, 0, -1, 26, { 27, -1 }, -1 },
+        { LENOVO_3KN200_SUBVENDOR, HDA_CODEC_ALC861VD, HDAC_HP_SWITCH_CTL,
+            0, 0, -1, 27, { 20, -1 }, -1 },
 	/* { LENOVO_TCA55_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL,
 	    0, 0, -1, 26, { 27, 28, 29, 30, -1 }, -1 }, */
 	{ LG_LW20_SUBVENDOR, HDA_CODEC_ALC880, HDAC_HP_SWITCH_CTL,


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Sep 2 06:59:57 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Alexander Motin <mav@FreeBSD.org>
To: bug-followup@FreeBSD.org, giantlock@gmail.com
Cc:  
Subject: Re: kern/127037: [snd_hda] [patch] Lenovo 3k N200, speakers not deactivated
 after headphones connecting
Date: Tue, 02 Sep 2008 19:35:10 +0300

 Present HDA driver requires quirk of such kind to be made for every 
 existing codec/board combination to make jack detection to work. So 
 technically this patch looks good, but the common idea is ugly.
 
 At this moment I am working on significantly new snd_hda driver which 
 will not require quirks of such kind. My latest patches could be found 
 on http://people.freebsd.org/~mav/, discussion goes on 
 freebsd-multimedia@ mailing list.
State-Changed-From-To: open->patched 
State-Changed-By: joel 
State-Changed-When: Sun Sep 7 20:33:11 UTC 2008 
State-Changed-Why:  
Committed to head. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127037 
State-Changed-From-To: patched->closed 
State-Changed-By: joel 
State-Changed-When: Sun Sep 14 05:29:40 UTC 2008 
State-Changed-Why:  
Patch committed to RELENG_7. 

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