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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 0AD4BC432C0 for ; Wed, 27 Nov 2019 11:48:50 +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 160542070B for ; Wed, 27 Nov 2019 11:48:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="sLb9w/gZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 160542070B 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 F06461697; Wed, 27 Nov 2019 12:47:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F06461697 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574855327; bh=HeOpy4yv7FUvDc6SZgUQDb8/a6oU5+3shqpd0M6sYvY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sLb9w/gZNhj1TI1kG9Os6GSHo6g2O+m4ZX7D21emsBoWyRtui/fWYGxSnp+m2nP4C gp73L3qXvKrYMyf37lhbv+5dwnWHPNxV7fcir2BMeMWN+F/2FuoL83Gw5gxyil0AKh J4gR0rm7xZ5fiILBvI3TrPGhm66g1pY3mFeaJW6k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7A3BFF80109; Wed, 27 Nov 2019 12:47:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 19424F8014D; Wed, 27 Nov 2019 12:47:55 +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 85CC6F80109 for ; Wed, 27 Nov 2019 12:47:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 85CC6F80109 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 87648B061; Wed, 27 Nov 2019 11:47:51 +0000 (UTC) Date: Wed, 27 Nov 2019 12:47:51 +0100 Message-ID: From: Takashi Iwai To: Kai Vehmanen In-Reply-To: <20191127112536.28791-1-kai.vehmanen@linux.intel.com> References: <20191127112536.28791-1-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: alsa-devel@alsa-project.org, Nikhil Mahale Subject: Re: [alsa-devel] [PATCH] ALSA: hda: hdmi - fix regression in connect list handling 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 Wed, 27 Nov 2019 12:25:36 +0100, Kai Vehmanen wrote: > > Fix regression in how intel_haswell_fixup_connect_list() > results are used in hda_read_pin_conn(). Use of > snd_hda_get_raw_connections() in hda_read_pin_conn() bypasses > the cache and thus also bypasses the overridden pin connection > list. On platforms that require the connection list fixup, > mux list will be empty and HDMI playback will fail to -EBUSY > at open. Ah, thanks for catching this. This is an obvious overlook. > @@ -1312,10 +1316,19 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx) > > snd_hda_set_dev_select(codec, pin_nid, dev_id); > > + if (spec->intel_hsw_fixup) { > + intel_haswell_fixup_connect_list(codec, pin_nid); > + conns = snd_hda_get_connections(codec, pin_nid, > + per_pin->mux_nids, > + HDA_MAX_CONNECTIONS); > + } else { > + conns = snd_hda_get_raw_connections(codec, pin_nid, > + per_pin->mux_nids, > + HDA_MAX_CONNECTIONS); > + } Actually intel_haswell_fixup_connect_list() doesn't influence on the hardware setup but just updates the software cache. So, basically we can copy the values directly from spec->cvt_nids here without the override hack as we have now. That is, something like if (spec->intel_hsw_fixup) { conns = spec->cvt_nids; memcpy(per_pin->mux_nids, spec->num_cvts, sizeof(hda_nid_t) * conns); } else { snd_hda_set_dev_select(codec, pin_nid, dev_id); conns = snd_hda_get_raw_connections(codec, pin_nid, per_pin->mux_nids, HDA_MAX_CONNECTIONS); } Could you check whether this works? thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel