From owner-svn-src-stable@FreeBSD.ORG Wed Dec 26 18:50:04 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8C8BE4B; Wed, 26 Dec 2012 18:50:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 73CAB8FC12; Wed, 26 Dec 2012 18:50:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBQIo4dN020778; Wed, 26 Dec 2012 18:50:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBQIo4mw020776; Wed, 26 Dec 2012 18:50:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201212261850.qBQIo4mw020776@svn.freebsd.org> From: Alexander Motin Date: Wed, 26 Dec 2012 18:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244712 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2012 18:50:04 -0000 Author: mav Date: Wed Dec 26 18:50:03 2012 New Revision: 244712 URL: http://svnweb.freebsd.org/changeset/base/244712 Log: MFC r244145: Add quirks for AD1984A codec and Lenovo X300 laptop. PR: kern/148741 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 Wed Dec 26 18:28:17 2012 (r244711) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Wed Dec 26 18:50:03 2012 (r244712) @@ -271,7 +271,17 @@ hdac_pin_patch(struct hdaa_widget *w) } /* New patches */ - if (id == HDA_CODEC_AD1986A && + if (id == HDA_CODEC_AD1984A && + subid == LENOVO_X300_SUBVENDOR) { + switch (nid) { + case 17: /* Headphones with redirection */ + patch = "as=1 seq=15"; + break; + case 20: /* Two mics together */ + patch = "as=2 seq=15"; + break; + } + } else if (id == HDA_CODEC_AD1986A && (subid == ASUS_M2NPVMX_SUBVENDOR || subid == ASUS_A8NVMCSM_SUBVENDOR || subid == ASUS_P5PL2_SUBVENDOR)) { @@ -372,6 +382,13 @@ hdaa_widget_patch(struct hdaa_widget *w) HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT; w->waspin = 1; } + /* + * Clear "digital" flag from digital mic input, as its signal then goes + * to "analog" mixer and this separation just limits functionaity. + */ + if (hdaa_codec_id(devinfo) == HDA_CODEC_AD1984A && + w->nid == 23) + w->param.widget_cap &= ~HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK; HDA_BOOTVERBOSE( if (w->param.widget_cap != orig) { device_printf(w->devinfo->dev, Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Wed Dec 26 18:28:17 2012 (r244711) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Wed Dec 26 18:50:03 2012 (r244712) @@ -218,6 +218,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_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */