From patchwork Tue Mar 3 11:22:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ingo Brueckl X-Patchwork-Id: 5921581 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 58A589F380 for ; Tue, 3 Mar 2015 11:25:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B35920225 for ; Tue, 3 Mar 2015 11:25:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9194B20259 for ; Tue, 3 Mar 2015 11:25:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BE1572614D3; Tue, 3 Mar 2015 12:25:47 +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 0F4922612C8; Tue, 3 Mar 2015 12:25:14 +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 7F2352612CD; Tue, 3 Mar 2015 12:25:12 +0100 (CET) Received: from moutD.wup.tal.de (moutd.wup.tal.de [213.240.144.30]) by alsa0.perex.cz (Postfix) with ESMTP id 3F55C260851 for ; Tue, 3 Mar 2015 12:25:02 +0100 (CET) Received: from point.localnet (mue-88-130-96-087.dsl.tropolys.de [88.130.96.87]) (Authenticated sender: ib@wtal.de) by smtp.tal.de (Postfix) with ESMTPA id CF0AE813FA3F; Tue, 3 Mar 2015 12:25:01 +0100 (CET) Received: from ib by point.localnet with local (masqmail 0.2.21) id 1YSkwf-1JO-00; Tue, 03 Mar 2015 12:25:01 +0100 Message-ID: <54f5995b.7e5343ac.bm001@wupperonline.de> From: =?ISO-8859-1?Q?Ingo=20Br=FCckl?= To: alsa-devel@alsa-project.org Date: Tue, 03 Mar 2015 12:22:03 +0100 MIME-Version: 1.0 X-Mailer: blueMail/Linux 1.5 Cc: tiwai@suse.de, superquad.vortex2@gmail.com, david.henningsson@canonical.com Subject: [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 Add the constraint mentioned in the comment. It does not apply to a scenario with three DACs and multi-IO where we would normally get a "Master Playback Volume" and a "Front Playback Volume" (prevented without checking for num_dacs). Signed-off-by: Ingo Brückl --- 1.7.10 diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index ecee349..4c8910c 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -1097,7 +1097,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch, case AUTO_PIN_LINE_OUT: /* This deals with the case where we have two DACs and * one LO, one HP and one Speaker */ - if (!ch && cfg->speaker_outs && cfg->hp_outs) { + if (!ch && spec->multiout.num_dacs == 2 && 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)