Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 473C6C432C0 for ; Tue, 3 Dec 2019 14:06:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C222820684 for ; Tue, 3 Dec 2019 14:06:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="haJra7Bo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C222820684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1D81584A; Tue, 3 Dec 2019 15:05:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1D81584A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575382002; bh=jqLT2Nk30SPrebdItPW+Y8I8vznXIAo3gzeNVmzbHPg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=haJra7Bomf60devf6o9OMqdURzDtCQ7WJ/QNVPS8WPxZBRwQ95K3NWWRKRGlVNQs5 hOf3MrHXeuFFI8YwilTShiJC+8rawdUIs5yFZ0HNjxlePgO1/aE8vgpmTJIPN0H2DN dLkxhhTX6DKRPMvprQz9MnSAkOtfNvwRZ+zLSRzM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5067AF8015A; Tue, 3 Dec 2019 15:05:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B850DF80228; Tue, 3 Dec 2019 15:05:49 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6BC8F8015A for ; Tue, 3 Dec 2019 15:05:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6BC8F8015A X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7518EAC5F; Tue, 3 Dec 2019 14:05:45 +0000 (UTC) Date: Tue, 03 Dec 2019 15:05:45 +0100 Message-ID: From: Takashi Iwai To: Kai Vehmanen In-Reply-To: References: <20191129143756.23941-1-kai.vehmanen@linux.intel.com> <20191129143756.23941-2-kai.vehmanen@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Nikhil Mahale , alsa-devel@alsa-project.org Subject: Re: [alsa-devel] [PATCH 2/2] [RFC] ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 03 Dec 2019 14:48:10 +0100, Kai Vehmanen wrote: > > Hi Takashi and Nikhil, > > On Mon, 2 Dec 2019, Kai Vehmanen wrote: > > yup, -1 for non-MST, that was just plain wrong in my Friday mail. The > > problem seems to be pipe id is positive in some non-MST cases (like > > https://github.com/thesofproject/linux/issues/1536 ), which is very > > suprising looking at e.g. intel_audio_codec_enable(), but that seems to be > > happening nevertheless. > > ok, got graphics driver log from this case now, and this turns out to be a > system with an unusual converter setup for HDMI output. I.e. from user > point of view it's HDMI, but for graphics driver it looks like a DP > connection (with MST enabled which is not so common but apparently is the > case). So i915 driver is working as expected and in patch_hdmi we should > handle it as a normal MST case. > > Takashi, considering the commit message is wrong, I think it's better > to revert the "ALSA: hda: hdmi - preserve non-MST PCM routing for Intel > platforms" patch. Should I send a revert? > > It also doesn't fully preseve the old routing as in the case of a single > DP-MST monitor (with dev_id=1), hdmi_find_pcm_slot() will not pick the > preferred PCM "per_pin->pin_nid_idx", but will choose "spec->num_nids + > (per_pin->dev_id - 1)". So seems better to just drop it. Well, if we want to keep the old behavior for compatibility just to be sure, how about a patch like below? Takashi --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1348,21 +1348,18 @@ static int hdmi_find_pcm_slot(struct hdmi_spec *spec, * with the legacy static per_pin-pcm assignment that existed in the * days before DP-MST. * + * Intel DP-MST prefers this legacy behavior for compatibility, too. + * * per_pin of m!=0 prefers to get pcm=(num_nids + (m - 1)). */ - if (per_pin->dev_id == 0) { + if (per_pin->dev_id == 0 || spec->intel_hsw_fixup) { if (!test_bit(per_pin->pin_nid_idx, &spec->pcm_bitmap)) return per_pin->pin_nid_idx; } else { i = spec->num_nids + (per_pin->dev_id - 1); if (i < spec->pcm_used && !(test_bit(i, &spec->pcm_bitmap))) return i; - - /* keep legacy assignment for dev_id>0 on Intel platforms */ - if (spec->intel_hsw_fixup) - if (!test_bit(per_pin->pin_nid_idx, &spec->pcm_bitmap)) - return per_pin->pin_nid_idx; } /* have a second try; check the area over num_nids */ _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel