Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4284898pxu; Mon, 21 Dec 2020 08:36:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwig6eGtX7mhqCwaTy7jKStedxdTIPV4PdQhYiHJzqmcB69cT1QdT8j4dX4OV6h96PRQ68q X-Received: by 2002:a17:906:605:: with SMTP id s5mr15767062ejb.280.1608568576522; Mon, 21 Dec 2020 08:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608568576; cv=none; d=google.com; s=arc-20160816; b=c6oPmxZ5hcw/n89vgrk/znkwKIwqane0raFRr1ek3JBYtWKZXiMKkM2rOEM9fblyAq 6akZRQe4zq/lkYFFwx2gr5VJ7hYKnYncewygYcbd+i7up4JGYMRl/X4arbEot/M3a6Dl CYDcbsCpHRZROha3TTpmWOitEno50Q+Lu0dS85wvjz/Sxzfu4nT5RwAo76eLMF6doPRj fvpaUnVyH6honaAGZ8/x7tzQeVnUmjD+lSt9yL9QNioSQ35s/eDngM0YT05DAdvLz4/d smDRB4ig5qjIAIE4uuBvrwyMNwaFuKCjrYZXRV7LsNYSR8IEPnvMnsset5HPLbhMcWLI AzDw== 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=1DJCzPnkhqRPedetC6f30gfeqZjj9GSnRoXOKXqtenM=; b=tMz4sc8FxUFWj9cizzNOoA7JOzxv/JukFbHSu+zly5G3zWRUj1qq8TiF8J1fv3rpT8 FurfBo9IDigMr/OrHlKMr9A8goFDKInggvsL51sUkHsliGAb2u/RdogVDsUWmQYi4EgL PF9QUGkJlQamdY5bBfjGL94u47Wmt4SXEwy2WiMxq4pCzdOlC6z6lsJfl9oakkoNNPrL +1H0fB8cBtONmrlOOYk/Vy/YUGfXLL4zuY5yxI3s0I9TNb1Hm3J05ShDT9+r262579d8 FuUKwfAHuyv6CwK5nTPDhSqwi7/4JXo22lyzBLUMxJuDI49MmO6P8JkHzI19Zq8I2Sta t7jg== 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 l19si10747959edq.537.2020.12.21.08.35.53; Mon, 21 Dec 2020 08:36:16 -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 S1725885AbgLUQeQ (ORCPT + 99 others); Mon, 21 Dec 2020 11:34:16 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60040 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbgLUQeP (ORCPT ); Mon, 21 Dec 2020 11:34:15 -0500 Received: from mail-lf1-f70.google.com ([209.85.167.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1krO7o-0008SI-Qh for linux-kernel@vger.kernel.org; Mon, 21 Dec 2020 16:33:33 +0000 Received: by mail-lf1-f70.google.com with SMTP id 140so11194474lfm.23 for ; Mon, 21 Dec 2020 08:33:32 -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=1DJCzPnkhqRPedetC6f30gfeqZjj9GSnRoXOKXqtenM=; b=iGaevfbfBdO9EBzWNPcntJMFLVDuQsE9N/Zz+Dv1/DAsNqJUFsvezU62T2J9M7uY38 LVng268QiPcWWWk8KZGENjdRk/AqSLAWB2lLyGTEDVfKWSBmEwd0eMW3SEGY18RNZtPO M4m2h64zY2uQ55P5n0oXgOobXeF1ZIDMLLBLt01ssAR2Cm34GzlF3liFIB7hPheiUxF4 h1ftzNxJZXvJG7/eXxyfGtqe3LkyGj1T+YRa1shGI9CGp/LsUL2SmzRg3/grX1rJvrnR o3EQngMXz4FTAehIDwodo1Nso1PB6+mUZPvuF4+nq1RC5Zfn9Yo6YKmjv2f3iffklK2d ikaw== X-Gm-Message-State: AOAM530bnoqrCzi4gUv+d7BACNtNxQ47TwyTG0txp218gTlbm6kIVmms XZPuq6XhZ4SNS7b/M9VAufbuCiVGb6Ye6Y6EZs3OlHQe6UAvImSwgD9U62RQfAq95/Lazd8A+Bb tmPjvHZHQrtzoH/eNpYp5umPozB4Bbi/y5hiQfKHdlqbsDwuY/OasalCP5Q== X-Received: by 2002:a2e:9b8a:: with SMTP id z10mr7354276lji.126.1608568411903; Mon, 21 Dec 2020 08:33:31 -0800 (PST) X-Received: by 2002:a2e:9b8a:: with SMTP id z10mr7354267lji.126.1608568411594; Mon, 21 Dec 2020 08:33:31 -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 00:33:20 +0800 Message-ID: Subject: Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails To: Takashi Iwai Cc: tiwai@suse.com, Jaroslav Kysela , Kai Vehmanen , Pierre-Louis Bossart , Alex Deucher , Mike Rapoport , "moderated list:SOUND" , open list , Bjorn Helgaas , Alan Stern , Linux PCI , nouveau@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+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. Kai-Heng > > > thanks, > > Takashi