Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4342667pxu; Mon, 21 Dec 2020 10:00:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJya5d83fg9JO8kyh4M8TZrx4AiU8Gy4jDdBj7sOdabL2SK9m2umbtVRbQDZsGokWgccjWcQ X-Received: by 2002:a17:906:565a:: with SMTP id v26mr15353914ejr.332.1608573646457; Mon, 21 Dec 2020 10:00:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608573646; cv=none; d=google.com; s=arc-20160816; b=S+DA7EMuBX6myhYhSVnFkCNytJ1gA23dVSfByWhG9zoEktaWxZZuWipaFd4y06h766 hgDI4cQcgQ5J5EPcqRfx6rGfJ1zhym5hx+OYLSpMMka/d3mAJdh1pfKd1kfu4Fe3uqMK IxOmj0xjPa6qGHpP+pP0hNy7yTqvjLMfW5q/kvRsiEBnXYBFiw9xvG8Shh/7ggd/ftlQ CQhX6ao4WPAw59pde8p2LYnSee2gWJZqQ8/NjSY4L1Uu0Tzeia9m5GpFUgTgtqgwwy+T KO4jXXF6E/aOwfuaRK9pY5ulYnjHWiEMsuTPXUK7KzU6We3xtmdHaXX95X2/5IbDKku7 BBHQ== 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=MrAF3XcfgmbCY17OqyOzfLrhkI98KCYJDR2DMtLfdY8=; b=b/lCxhr4tnHDjxCpgsiHLNvNlUeI+kRULQ1LmAYx7i1ijRmkJpzYAUGch5dMDd1XEU NXOE6GLCLHY1LDVZrYB7uGvPsX0ZodidoMc8RYMzUtwVsno6awcHO7wZLrZ1mKLcjLsM QeTJrU+ejrZEUbb1Xl91PBoL6BuC33d+RKZqzEEEMF2G/WvjuSDHmBPUzZ66OS8JqCh8 cLWMeihNRFNw3sk+G22lvVYXifiM07ROe5/zI0rtQNUoWJQPYdMHZWZoAxwpXZ7MAMmO h9ra1s7+pKRo810INZiMAnWhN5+AFxC9rMygD1UbO3QPGBD9/9tQxdIpdrV8TfzfzmGk m54Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si11064338edq.377.2020.12.21.10.00.01; Mon, 21 Dec 2020 10:00:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725825AbgLUR5b (ORCPT + 99 others); Mon, 21 Dec 2020 12:57:31 -0500 Received: from mail-ua1-f50.google.com ([209.85.222.50]:35414 "EHLO mail-ua1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbgLUR5a (ORCPT ); Mon, 21 Dec 2020 12:57:30 -0500 Received: by mail-ua1-f50.google.com with SMTP id y21so3567688uag.2; Mon, 21 Dec 2020 09:57:14 -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=MrAF3XcfgmbCY17OqyOzfLrhkI98KCYJDR2DMtLfdY8=; b=FARL21fepaGwlqbh/znW1t6ArcgYhrw+vNSqHVaHhhpo12JPUl6ZgqPMfJovTSkS1V YRZweEnvWbfysQwqaJaBhUsQEruNg/YIqjIhXc3ko4T+y0czYl5jzOJ0hfQuExluwubW ncZ6DYd09EWUET9T3FIkl/QhY4G0cYZFKyskfQSkx89JirSj9SgbDXzbVqai1OrdbHN5 Xe2JVYjhVNrUsL9I/dfxDq+notIe/d88ifeo8V9/PS0lryRGl0WG2+36t7UI37NJBTcd K2fNFt9wjRTM0c5zBAlOhUOeVofj1wiW0PBJy/pHaYbyYuJcAPmiScGJYqU7t13G7+He dk6g== X-Gm-Message-State: AOAM532NMv9GRv9x+BOjE8Qe3nBdYdq2SRZDOfTRFTP2h2hHfY6lv4TU 1KxGhCON57ztne31MZvtGgHg0WxijSaBHElZADc= X-Received: by 2002:ab0:1e4a:: with SMTP id n10mr13442742uak.98.1608573409390; Mon, 21 Dec 2020 09:56:49 -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: Ilia Mirkin Date: Mon, 21 Dec 2020 12:56:38 -0500 Message-ID: Subject: Re: [Nouveau] [PATCH v2] ALSA: hda: Continue to probe when codec probe fails To: Kai-Heng Feng 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 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: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c?h=v5.10#n5267 Cheers, -ilia