From patchwork Tue Mar 3 16:02:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 5924061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0169E9F380 for ; Tue, 3 Mar 2015 16:02:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42BD020117 for ; Tue, 3 Mar 2015 16:02:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1A84A201D3 for ; Tue, 3 Mar 2015 16:02:37 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0813D261737; Tue, 3 Mar 2015 17:02:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1149B2615FC; Tue, 3 Mar 2015 17:02:28 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4B3F12616B9; Tue, 3 Mar 2015 17:02:26 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id 9B32326154F for ; Tue, 3 Mar 2015 17:02:20 +0100 (CET) Received: from c83-254-142-7.bredband.comhem.se ([83.254.142.7] helo=[192.168.8.102]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YSpH1-0007tr-0R; Tue, 03 Mar 2015 16:02:19 +0000 Message-ID: <54F5DB0B.8020507@canonical.com> Date: Tue, 03 Mar 2015 17:02:19 +0100 From: David Henningsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?windows-1252?Q?Ingo_Br=FCckl?= , alsa-devel@alsa-project.org References: <54f5ce0b.08a2b775.bm000@wupperonline.de> In-Reply-To: <54f5ce0b.08a2b775.bm000@wupperonline.de> Cc: tiwai@suse.de, superquad.vortex2@gmail.com Subject: Re: [alsa-devel] [PATCH] ALSA: hda - Fix wrong detection of "Headphone+LO" or "Speaker+LO" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On 2015-03-03 16:04, Ingo Brückl wrote: > David Henningsson wrote on Tue, 03 Mar 2015 14:24:28 +0100: > >> If I understand correctly, you have three DACs, one internal speaker, >> one headphone jack, and three jacks that are both used for 5.1 surround >> and line out/mic/line in. Is this correct? > > This is correct. In addition I have a front mic jack. Could you upload/pastebin your alsa-info somewhere? Then we could run it through the emulator and reproduce the problem. >> How do the DACs get assigned in this case? One would assume that you'd >> get 02 -> Front LO, HP, Speaker, 03 -> Rear LO, 04 -> CLFE LO. > > With my private patch to enforce multi-io I seem to lose the internal speaker > which isn't bad because it isn't connected (and probably never won't be). Since you're using private patches you're somewhat out on "unsupported" ground, but anyhow... > > You are right concerning the remaining assignments: > > multi_outs = 14/0/0/0 : 2/3/4/0 (type LO) > out path: depth=3 '02:0c:14' > multi_ios(2) = 1a/18 : 3/4 > mio path: depth=3 '03:0d:1a' > mio path: depth=3 '04:0e:18' > hp_outs = 1b/0/0/0 : 2/0/0/0 > hp path: depth=3 '02:0c:1b' > spk_outs = 15/0/0/0 : 0/0/0/0 > >> And then the volume/mute control for DAC node 02 would be called "PCM" >> (since both hp_lo_shared and spk_lo_shared are true), but in fact it would >> be more appropriate to call it "Front". > > I've got a Master that would only affect the Front (PCM) and a PCM that > affected Surround/CLFE which was very unpleasant. > > With the patch I'm getting a real Master (for all Front/Surround/CLFE) and a > separate Front Volume Control in addition to Surround, Center and LFE which > is exactly how it should be. Hmm. What do you think of the attached patch - would it work as well? It removes the part that returns early for all three, letting it fall through to the part that returns "Front" etc. diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index b680b4e..9f0be7c 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -1100,11 +1100,9 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch, if (!ch && cfg->speaker_outs && cfg->hp_outs) { bool hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type); bool spk_lo_shared = !path_has_mixer(codec, spec->speaker_paths[0], ctl_type); - if (hp_lo_shared && spk_lo_shared) - return spec->vmaster_mute.hook ? "PCM" : "Master"; - if (hp_lo_shared) + if (hp_lo_shared && !spk_lo_shared) return "Headphone+LO"; - if (spk_lo_shared) + if (spk_lo_shared && !hp_lo_shared) return "Speaker+LO"; } }