From owner-svn-src-stable-12@freebsd.org  Fri Feb 15 20:52:34 2019
Return-Path: <owner-svn-src-stable-12@freebsd.org>
Delivered-To: svn-src-stable-12@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02B5914E90DA;
 Fri, 15 Feb 2019 20:52:34 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 9BE7885230;
 Fri, 15 Feb 2019 20:52:33 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90EB724060;
 Fri, 15 Feb 2019 20:52:33 +0000 (UTC)
 (envelope-from wulf@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1FKqXsS055154;
 Fri, 15 Feb 2019 20:52:33 GMT (envelope-from wulf@FreeBSD.org)
Received: (from wulf@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1FKqXXn055153;
 Fri, 15 Feb 2019 20:52:33 GMT (envelope-from wulf@FreeBSD.org)
Message-Id: <201902152052.x1FKqXXn055153@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: wulf set sender to
 wulf@FreeBSD.org using -f
From: Vladimir Kondratyev <wulf@FreeBSD.org>
Date: Fri, 15 Feb 2019 20:52:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject: svn commit: r344176 - stable/12/sys/dev/sound/pci/hda
X-SVN-Group: stable-12
X-SVN-Commit-Author: wulf
X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda
X-SVN-Commit-Revision: 344176
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 9BE7885230
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.94 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.996,0];
 NEURAL_HAM_SHORT(-0.95)[-0.949,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US];
 NEURAL_HAM_LONG(-1.00)[-0.999,0]
X-BeenThere: svn-src-stable-12@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for only the 12-stable src tree
 <svn-src-stable-12.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable-12>, 
 <mailto:svn-src-stable-12-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable-12/>
List-Post: <mailto:svn-src-stable-12@freebsd.org>
List-Help: <mailto:svn-src-stable-12-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable-12>, 
 <mailto:svn-src-stable-12-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Feb 2019 20:52:34 -0000

Author: wulf
Date: Fri Feb 15 20:52:32 2019
New Revision: 344176
URL: https://svnweb.freebsd.org/changeset/base/344176

Log:
  MFC r343327:
  
  Add quirk to enable mic and headphones redirection on HP Spectre laptops.
  
  Tested on HP Spectre 13 AF006UR.

Modified:
  stable/12/sys/dev/sound/pci/hda/hdaa_patches.c
  stable/12/sys/dev/sound/pci/hda/hdac.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- stable/12/sys/dev/sound/pci/hda/hdaa_patches.c	Fri Feb 15 20:49:32 2019	(r344175)
+++ stable/12/sys/dev/sound/pci/hda/hdaa_patches.c	Fri Feb 15 20:52:32 2019	(r344176)
@@ -410,6 +410,18 @@ hdac_pin_patch(struct hdaa_widget *w)
 			patch = "as=1 seq=15";
 			break;
 		}
+	} else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) {
+		switch (nid) {
+		case 18:
+			patch = "as=2";
+			break;
+		case 25:
+			patch = "as=2 seq=15";
+			break;
+		case 33:
+			patch = "as=1 seq=15";
+			break;
+		}
 	} else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) {
 		switch (nid) {
 		case 24:

Modified: stable/12/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- stable/12/sys/dev/sound/pci/hda/hdac.h	Fri Feb 15 20:49:32 2019	(r344175)
+++ stable/12/sys/dev/sound/pci/hda/hdac.h	Fri Feb 15 20:52:32 2019	(r344176)
@@ -188,6 +188,7 @@
 #define HP_DV5000_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30a5)
 #define HP_DC7700S_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2801)
 #define HP_DC7700_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2802)
+#define HP_AF006UR_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x83a2)
 #define HP_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0xffff)
 /* What is wrong with XN 2563 anyway? (Got the picture ?) */
 #define HP_NX6325_SUBVENDORX	0x103c30b0