From owner-svn-src-all@FreeBSD.ORG Sun Jul 27 08:20:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF71374C; Sun, 27 Jul 2014 08:20:33 +0000 (UTC) Received: from mail-qa0-x22d.google.com (mail-qa0-x22d.google.com [IPv6:2607:f8b0:400d:c00::22d]) (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 2CEB822D4; Sun, 27 Jul 2014 08:20:33 +0000 (UTC) Received: by mail-qa0-f45.google.com with SMTP id cm18so6433136qab.18 for ; Sun, 27 Jul 2014 01:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=26p8CqPZwpuTK3vNY3BAqqULoDhpOJv071vOJr439aw=; b=hybjh+J5HKWYMQkzoyE/5D/Fmw+aYo5EpNhER8zyZACidxaJNz6El2ZnWM4ySmggcb uunfslf9zYGpJOoWlXA5ooUNCmrmC8bKlYrQ24t8qp26qeFdOjWxZh7YrkFVG9ksv7jn 5YwLfqnvdDwJGjQQUnBxvtXg2s89ZmSBU9QwWqB9t5rnMw/j3fEBhfMVOBpPxetPCupw KW9hZaX1mnU+HHsQaRSPowLA5JqrO2Et0QqZHSrg16EqjbAVAysNCmDzVDPXWGMKbgGZ k/Xdj416vQKfUXTKBkJNEvrgk5U1+8YRrrnnxL9OLpq84W30qVK4jZS1tgK9zhzdYoR3 7MvA== MIME-Version: 1.0 X-Received: by 10.224.112.1 with SMTP id u1mr44500148qap.7.1406449231821; Sun, 27 Jul 2014 01:20:31 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.1.6 with HTTP; Sun, 27 Jul 2014 01:20:31 -0700 (PDT) In-Reply-To: <53C335EF.2090606@FreeBSD.org> References: <201407131031.s6DAVTja093433@svn.freebsd.org> <53C335EF.2090606@FreeBSD.org> Date: Sun, 27 Jul 2014 01:20:31 -0700 X-Google-Sender-Auth: gAcSBRm7vdPxtwg6lVul3VBClX4 Message-ID: Subject: Re: svn commit: r268584 - head/sys/dev/sound/pci/hda From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Mark Johnston , "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: Sun, 27 Jul 2014 08:20:33 -0000 Hi! ok, so how do I figure out what the right patch should be? pcm0: at nid 22 and 24 on hdaa0 pcm1: at nid 26 and 29 on hdaa0 .. and hdac0@pci0:0:27:0: class=0x040300 card=0x20f217aa chip=0x293e8086 rev=0x03 hdr=0x00 -a On 13 July 2014 18:44, Alexander Motin wrote: > 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