From nobody@FreeBSD.org  Tue Jan  1 03:53:27 2013
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 C0478A8A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jan 2013 03:53:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A1A108FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jan 2013 03:53:27 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r013rRMo034111
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 Jan 2013 03:53:27 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r013rRoO034110;
	Tue, 1 Jan 2013 03:53:27 GMT
	(envelope-from nobody)
Message-Id: <201301010353.r013rRoO034110@red.freebsd.org>
Date: Tue, 1 Jan 2013 03:53:27 GMT
From: Joseph Mingrone <jrm@ftfl.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: AAfter uprading to 9-STABLE from 9.0-RELEASE plugging headphones or external speakers into the mic/audio jack doesn't cause audio to switch (Lenovo X220)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174876
>Category:       kern
>Synopsis:       [sound] After upgrading to 9-STABLE from 9.0-RELEASE plugging headphones or external speakers into the mic/audio jack doesn't cause audio to switch (Lenovo X220)
>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 Jan 01 04:00:00 UTC 2013
>Closed-Date:    Mon Mar 11 07:54:50 UTC 2013
>Last-Modified:  Mon Mar 11 08:00:00 UTC 2013
>Originator:     Joseph Mingrone
>Release:        9-STABLE
>Organization:
>Environment:
FreeBSD phe.ath.cx 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #3 r244906: Mon Dec 31 16:28:46 AST 2012     root@phe.ath.cx:/usr/obj/usr/src
/sys/PHE  amd64 (still says 9.1-PRELEASE, but I grabbed base/stable/9)
>Description:
With 9.0-RELEASE and hw.snd.default_auto=1 in /etc/sysctl.conf audio switched like this:

- play sound through internal speakers
- plug in headphones or external speakers and sound now plays only through the headphones or external speakers

After upgrading to 9-STABLE:

- play sound through internal speakers (works)
- plug in headphones or speakers and no sound from internal speakers or headphone or external speakers

I can force the switch by togling hw.snd.default_unit to 0 for internal speakers and 1 for headphones or external speakers.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 14 08:42:59 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Joseph Mingrone <jrm@ftfl.ca>
To: bug-followup@FreeBSD.org, jrm@ftfl.ca
Cc:  
Subject: Re: kern/174876: [sound] After upgrading to 9-STABLE from 9.0-RELEASE
 plugging headphones or external speakers into the mic/audio jack doesn&#39;t
 cause audio to switch (Lenovo X220)
Date: Fri, 1 Mar 2013 00:02:27 -0400

 Putting
 
 hint.hdac.0.cad0.nid25.config="as=1 seq=15"
 
 in /boot/loader.conf solves the problem.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174876: commit references a PR
Date: Mon,  4 Mar 2013 21:20:23 +0000 (UTC)

 Author: mav
 Date: Mon Mar  4 21:20:13 2013
 New Revision: 247815
 URL: http://svnweb.freebsd.org/changeset/base/247815
 
 Log:
   Add quirk to enable headphones redirection on Lenovo X220.
   
   PR:		kern/174876
   MFC after:	1 week
 
 Modified:
   head/sys/dev/sound/pci/hda/hdaa_patches.c
   head/sys/dev/sound/pci/hda/hdac.h
 
 Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
 ==============================================================================
 --- head/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Mar  4 21:18:45 2013	(r247814)
 +++ head/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Mar  4 21:20:13 2013	(r247815)
 @@ -333,6 +333,13 @@ hdac_pin_patch(struct hdaa_widget *w)
  			patch = "as=1 seq=15";
  			break;
  		}
 +	} else if (id == HDA_CODEC_CX20590 &&
 +	    subid == LENOVO_X220_SUBVENDOR) {
 +		switch (nid) {
 +		case 25:
 +			patch = "as=1 seq=15";
 +			break;
 +		}
  	}
  
  	if (patch != NULL)
 
 Modified: head/sys/dev/sound/pci/hda/hdac.h
 ==============================================================================
 --- head/sys/dev/sound/pci/hda/hdac.h	Mon Mar  4 21:18:45 2013	(r247814)
 +++ head/sys/dev/sound/pci/hda/hdac.h	Mon Mar  4 21:20:13 2013	(r247815)
 @@ -220,6 +220,7 @@
  #define LENOVO_3KN200_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
  #define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
  #define LENOVO_TCA55_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
 +#define LENOVO_X220_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21da)
  #define LENOVO_X300_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac)
  #define LENOVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Mon Mar 11 07:54:13 UTC 2013 
State-Changed-Why:  
Fix committed and merged to 9-STABLE. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174876: commit references a PR
Date: Mon, 11 Mar 2013 07:54:09 +0000 (UTC)

 Author: mav
 Date: Mon Mar 11 07:53:51 2013
 New Revision: 248148
 URL: http://svnweb.freebsd.org/changeset/base/248148
 
 Log:
   MFC r247815:
   Add quirk to enable headphones redirection on Lenovo X220.
   
   PR:		kern/174876
 
 Modified:
   stable/9/sys/dev/sound/pci/hda/hdaa_patches.c
   stable/9/sys/dev/sound/pci/hda/hdac.h
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/dev/   (props changed)
 
 Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c
 ==============================================================================
 --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Mar 11 07:10:15 2013	(r248147)
 +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Mar 11 07:53:51 2013	(r248148)
 @@ -333,6 +333,13 @@ hdac_pin_patch(struct hdaa_widget *w)
  			patch = "as=1 seq=15";
  			break;
  		}
 +	} else if (id == HDA_CODEC_CX20590 &&
 +	    subid == LENOVO_X220_SUBVENDOR) {
 +		switch (nid) {
 +		case 25:
 +			patch = "as=1 seq=15";
 +			break;
 +		}
  	}
  
  	if (patch != NULL)
 
 Modified: stable/9/sys/dev/sound/pci/hda/hdac.h
 ==============================================================================
 --- stable/9/sys/dev/sound/pci/hda/hdac.h	Mon Mar 11 07:10:15 2013	(r248147)
 +++ stable/9/sys/dev/sound/pci/hda/hdac.h	Mon Mar 11 07:53:51 2013	(r248148)
 @@ -220,6 +220,7 @@
  #define LENOVO_3KN200_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
  #define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
  #define LENOVO_TCA55_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
 +#define LENOVO_X220_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21da)
  #define LENOVO_X300_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac)
  #define LENOVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
