Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4294113pxu; Mon, 21 Dec 2020 08:50:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6yuPG7cEAJlVYjgNWju/dW3PGuUnsrnBNWlaqbqocQsoH8EU5QEa7GvnoLC/7x/MF1Dq2 X-Received: by 2002:a17:906:c790:: with SMTP id cw16mr16276121ejb.344.1608569449771; Mon, 21 Dec 2020 08:50:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608569449; cv=none; d=google.com; s=arc-20160816; b=jlsFb+6s70QbpXDcvrEfKqBA+kvkm7O3j0zaqhbFTEJrNb9JEoqKvQNGzvEoIqUhXX BsHsttO1OSYyE5oGTlksV9PjRZa1N873zNrRH5T6BAzhdeRq4drh9XLakv/zjZ8TMFyw /h2pTs6g8R/DkTulSeNhvqyUYnbddq7uC27Sh5uVIMRuTHWMSQPqsDMvSEUF6f5wZGvI fA557G6lySbAsAdbj1Iup9YQ7ZjPlwvxAnsOKGBvCx6XrLSvOmneM0dnflcdzVFx1tGR rs/4YHHGV84av6UqTKAqKKgZ+bhhZBJmuRWgsktKf6XWjqOelk9vliiFoMqdWWk8vu7p iorw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=L6Cpz2d9arAeoqzTDf3XZaH31tSWKljnQASh5KStV5I=; b=Gbtas1zIvJQRLo97xHnQtrl5qh30sEuCLCwxfs2pjnDO5Lll496SGax7AE0BpRDZZ/ ONResltWcjGImteceeTrWQfCezGtDM33H6jeBQ+GtWSnw6xrALZ50gzLuJgDjDiv9fb4 6aQjPQWGRpyMv30oG+1Vj6dY782bojuZjx04e50OJJ5aXbtgm4F2o0heoRcDMBP6O6Xz RZOmqtlRg5mSuyszgjNo9cDTrpmL/iH+PP8PqG1KckTX+/ksPcO+jbq+Ay/a9WV3/jM6 mU8fFSEzIvsFMq/zHm8xTo5fyW68M0ow5RJJ7f/dEMBJq53geU/4MisqGbUc1qZkQ2TG Mp1A== 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 v10si9016552eja.441.2020.12.21.08.50.26; Mon, 21 Dec 2020 08:50:49 -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 S1725791AbgLUQsc (ORCPT + 99 others); Mon, 21 Dec 2020 11:48:32 -0500 Received: from mx2.suse.de ([195.135.220.15]:48198 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbgLUQsc (ORCPT ); Mon, 21 Dec 2020 11:48:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 41CFDAD35; Mon, 21 Dec 2020 16:47:50 +0000 (UTC) Date: Mon, 21 Dec 2020 17:47:49 +0100 Message-ID: From: Takashi Iwai To: Kai-Heng Feng 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 Subject: Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails In-Reply-To: References: <20201214060621.1102931-1-kai.heng.feng@canonical.com> <20201216124726.2842197-1-kai.heng.feng@canonical.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") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Dec 2020 17:33:20 +0100, 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. But what happens if you plug the HDMI cable later and want to use the HDMI audio? It won't work with your fix, right? Takashi