From owner-svn-src-all@FreeBSD.ORG Mon Jul 14 01:44:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F3BC24C; Mon, 14 Jul 2014 01:44:20 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99A9D2CE2; Mon, 14 Jul 2014 01:44:19 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id hi2so1749127wib.4 for ; Sun, 13 Jul 2014 18:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=waTEVr9ewNqm+ibu4nzGywgLiuvKVkzcp9aykElT8dQ=; b=eClb9fYmJPfDggROc70m4XOdsxtknOADL/H+W+5aO3O7hestrOu0fmDniCWHeP7IDz /qugVEhE4niKbQnJ89ken2lAlQqm5KGvpQMW6VfBzSA2SnGKIUIsMRo0JRol+XXK9HFV fNtqqOl5j8mK0HjCrP4j22KOw/PAMJCao0DeLDtgnMcEr5SZVDCQrVv2HHMdtkYTGK7Q tDgofIv4I/303tSwU0zSJFCAPB8faXjkTjn5oNVZaA0W903tuPMLuFG5CIZ+qdLsCuwd fQkkFTN1wWYwCNd3VYGVZCULI1zNejHhJkWg4eWxnacsT5gYpuh22g0qVm4tfpZce8Up gJnA== X-Received: by 10.180.93.196 with SMTP id cw4mr20354091wib.69.1405302257887; Sun, 13 Jul 2014 18:44:17 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id w5sm25200413wif.3.2014.07.13.18.44.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Jul 2014 18:44:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <53C335EF.2090606@FreeBSD.org> Date: Mon, 14 Jul 2014 04:44:15 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Adrian Chadd , Mark Johnston Subject: Re: svn commit: r268584 - head/sys/dev/sound/pci/hda References: <201407131031.s6DAVTja093433@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 01:44:20 -0000 On 13.07.2014 21:50, Adrian Chadd wrote: > So I have an X230 and a T400 - both require fiddling of the default > sound unit sysctl when I want to use headphones. > > Does this above patch outline what I need to do to get it working dynamically? As a quick and easy solution -- quite likely yes. Proper general solution for all of those laptops, and not only, would be to rewrite the concept of default unit in sound(4) to allow it be switched during playback/record, and separately for playback/record paths. HDA driver is already able to provide all information about connected devices, number of their channels, etc, but there is just nothing above it to use that information. :( > On 13 July 2014 03:31, Mark Johnston wrote: >> Author: markj >> Date: Sun Jul 13 10:31:29 2014 >> New Revision: 268584 >> URL: http://svnweb.freebsd.org/changeset/base/268584 >> >> Log: >> Add a headphone redirection quirk for the Lenovo G580. >> >> 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 Sun Jul 13 09:34:59 2014 (r268583) >> +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Sun Jul 13 10:31:29 2014 (r268584) >> @@ -350,7 +350,8 @@ hdac_pin_patch(struct hdaa_widget *w) >> (subid == LENOVO_X1_SUBVENDOR || >> subid == LENOVO_X220_SUBVENDOR || >> subid == LENOVO_T420_SUBVENDOR || >> - subid == LENOVO_T520_SUBVENDOR)) { >> + subid == LENOVO_T520_SUBVENDOR || >> + subid == LENOVO_G580_SUBVENDOR)) { >> switch (nid) { >> case 25: >> patch = "as=1 seq=15"; >> >> Modified: head/sys/dev/sound/pci/hda/hdac.h >> ============================================================================== >> --- head/sys/dev/sound/pci/hda/hdac.h Sun Jul 13 09:34:59 2014 (r268583) >> +++ head/sys/dev/sound/pci/hda/hdac.h Sun Jul 13 10:31:29 2014 (r268584) >> @@ -241,6 +241,7 @@ >> #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) >> #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) >> #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) >> +#define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) >> #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) >> >> /* Samsung */ >> > -- Alexander Motin