Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4637532pxu; Mon, 21 Dec 2020 18:51:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSGP37K/eG3QQzYUz5hGdXFdGZhiASsV/cYn2EAqtrVEEHGSRkGhYvkfualEKdckqN+4dD X-Received: by 2002:a17:906:a192:: with SMTP id s18mr17275581ejy.249.1608605484660; Mon, 21 Dec 2020 18:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608605484; cv=none; d=google.com; s=arc-20160816; b=OmSSU0i/1UX5sT2cYPGeLRmrg9wwWKHe5+UVmVoAtqoG6+/ZdkI97XJNTf6hYX99CQ tGGdeqYNH07qXqhRd+SkI1gOlXUtAD9SdSuMX3Kd4ZuTPUPLo/D+cdvwjn0FXQZh3xyq 0XFucJhRG+0VJ75b/2Xl4g4s1OFBXC1jrlPNiV0LN67jm4X00olD+xGPDTxEdXvwuZCZ fTUEpDXfKYI8CfGM9lbGt5Qs2lEC03+iFg9jcf8qy/BVKiF7P115hGeSXW6qn5T+LufT tzxtCyoTu0QhQI2sGSP/i6BetT2nUiachuwaMSrmLhLssP9XDdaBpkZclQ+HLBEIAftt a0bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=N2WMaOhgXeDwILxq6jfp+AN/tR6hFKnoPSJxCRZJRSk=; b=ZMr3033AO+yZyP2EistU9nDvTnj6gFcCMaSWhTQ3VGsKpqORpM0r03LoP+2d2trZ5S N6+YlomI5UPtOjPMbHUH4sywguybFjbOHrsRDAd/XLwK+4VEmqh1rKoVX5jO/BoIuizP 4LVhqwaqM14sfSvXhaxEqSv2nq5AGP8DYkr3YaWD4v8YjOMPZQIiYQJCgs8BxzusOwgC RaeF6F3HXD6lVKDNAWtvysZAKYS07AkCDyVe+mRCy9l2YJdUX4oWAVOXstpAWY5FM89R HYOpol7PHX1lY2qEcLqYgLo+YV5foIPvTVxqeU4ejgiqPFEt5IlkOkDzxm6LvxDER4AT YB9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si11821112edt.253.2020.12.21.18.51.02; Mon, 21 Dec 2020 18:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725825AbgLVCus (ORCPT + 99 others); Mon, 21 Dec 2020 21:50:48 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:41900 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbgLVCur (ORCPT ); Mon, 21 Dec 2020 21:50:47 -0500 Received: from mail-lf1-f71.google.com ([209.85.167.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1krXkT-0003Aq-Be for linux-kernel@vger.kernel.org; Tue, 22 Dec 2020 02:50:05 +0000 Received: by mail-lf1-f71.google.com with SMTP id t194so14124934lff.15 for ; Mon, 21 Dec 2020 18:50:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N2WMaOhgXeDwILxq6jfp+AN/tR6hFKnoPSJxCRZJRSk=; b=nvrK+nmrhafjyKi0x1SO2ahsQIaic/S3BBxnc9C4nFBDF6JNoYsjUxSxsCarQ1+C+a 6mjWndxBI5VjnrtMcpty4Rg+PYx8BvGxTMZaTZAPQuJtlYJLpLkioR+XnYaQnfFQqvbI Ei1z7C+RpdT+fOPNrjb72yLdx/vPPuQAgQWcuYj8z576rkux1TUUK850wOjjUdEDagDR 0BEYjek8vUT4hsfvigRckigLl0nhRjxrRrzmv5C16x3B+W+K+bGdrr2/cYMs9UEORujs y5FndjgkWa/FI0I4no91O6R8haOOTFgqyh0Yfqma1OTvCoNh64dWLT9gxc2U4BjGxg1n TQtA== X-Gm-Message-State: AOAM531RByJ49kDrDHce8qQDy/JtyVIiomPo9s4W1qPZzGEdPxs1sy8U DsektCe7OQCFsQ5M87ohMnL6gOYT88U3m+2dTgBdos9wnHwS50rkG45Q8FzHsbR9anWBJBprPhy vPb6n2WQT0S4MFVL25pYGXMoQG7+W1K1F6jKoF7RyBW6bGsWwornk7H84BQ== X-Received: by 2002:a19:dc5:: with SMTP id 188mr8244388lfn.513.1608605404813; Mon, 21 Dec 2020 18:50:04 -0800 (PST) X-Received: by 2002:a19:dc5:: with SMTP id 188mr8244369lfn.513.1608605404522; Mon, 21 Dec 2020 18:50:04 -0800 (PST) MIME-Version: 1.0 References: <20201214060621.1102931-1-kai.heng.feng@canonical.com> <20201216124726.2842197-1-kai.heng.feng@canonical.com> In-Reply-To: From: Kai-Heng Feng Date: Tue, 22 Dec 2020 10:49:53 +0800 Message-ID: Subject: Re: [Nouveau] [PATCH v2] ALSA: hda: Continue to probe when codec probe fails To: Ilia Mirkin Cc: Takashi Iwai , "moderated list:SOUND" , Kai Vehmanen , nouveau , open list , Pierre-Louis Bossart , tiwai@suse.com, Bjorn Helgaas , Alan Stern , Linux PCI , Alex Deucher , Jaroslav Kysela , Mike Rapoport Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 1:56 AM Ilia Mirkin wrote: > > On Mon, Dec 21, 2020 at 11:33 AM Kai-Heng Feng > wrote: > > > > [+Cc nouveau] > > > > On Fri, Dec 18, 2020 at 4:06 PM Takashi Iwai wrote: > > [snip] > > > > Quite possibly the system doesn't power up HDA controller when there's > > > > no external monitor. > > > > So when it's connected to external monitor, it's still needed for HDMI audio. > > > > Let me ask the user to confirm this. > > > > > > Yeah, it's the basic question whether the HD-audio is supposed to work > > > on this machine at all. If yes, the current approach we take makes > > > less sense - instead we should rather make the HD-audio controller > > > working. > > > > Yea, confirmed that the Nvidia HDA works when HDMI is connected prior boot. > > > > > > > - The second problem is that pci_enable_device() ignores the error > > > > > returned from pci_set_power_state() if it's -EIO. And the > > > > > inaccessible access error returns -EIO, although it's rather a fatal > > > > > problem. So the driver believes as the PCI device gets enabled > > > > > properly. > > > > > > > > This was introduced in 2005, by Alan's 11f3859b1e85 ("[PATCH] PCI: Fix > > > > regression in pci_enable_device_bars") to fix UHCI controller. > > > > > > > > > > > > > > - The third problem is that HD-audio driver blindly believes the > > > > > codec_mask read from the register even if it's a read failure as I > > > > > already showed. > > > > > > > > This approach has least regression risk. > > > > > > Yes, but it assumes that HD-audio is really non-existent. > > > > I really don't know any good approach to address this. > > On Windows, HDA PCI is "hidden" until HDMI cable is plugged, then the > > driver will flag the magic bit to make HDA audio appear on the PCI > > bus. > > IIRC the current approach is to make nouveau and device link work. > > I don't have the full context of this discussion, but the kernel > force-enables the HDA subfunction nowadays, irrespective of nouveau or > nvidia or whatever: That's the problem. The nvidia HDA controller on the affected system only gets its power after HDMI cable plugged, so the probe on boot fails. Kai-Heng > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c?h=v5.10#n5267 > > Cheers, > > -ilia