Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13817880pxu; Mon, 4 Jan 2021 05:26:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVzdiuqwUEtogkkMTh4gs70o+tdqISrN3xl7mHuzlpgER/YmPVbSzHNjqJwOW+2ik8m9NX X-Received: by 2002:a17:906:d0c1:: with SMTP id bq1mr60393448ejb.202.1609766767803; Mon, 04 Jan 2021 05:26:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609766767; cv=none; d=google.com; s=arc-20160816; b=09SmILpO153Zr1rG+XxtgxAxIZY1pKiQWB+5NTDWJ2lPnLEOKUv1jMm+gNgoA8plLl S4fBqr2buo8+RfNl3X5630nnspXhxKu4gtt3wACCA6rVQYgq0fq8IWlCyERsjRSRBntB 8Yx605Lp65ub/1agsjjpwRmel3QOFeJMbAOZqYm0UjiyjLv8NbCvMqXU+fBRMt8K+I1C 0MCZ8Xh41Ac3HKEgs7t03IXoK8YTmLtlfZRxOK0TrmCv6zcNSCcWQqzk7lfdaldDFYfU 3SnP13W0iGCCofj/NOL6CJ4ClLi/DMqy3asquOZU5Gdj/VmXYX+yjsYD8JZmq76hc5zZ jz6Q== 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:dkim-signature; bh=vPrbs+ygK2nW6UXpFCX2PTOIhaEcotjknLDYayf1rbg=; b=d8ufvtPHPK5vQOlvusnOdB3AzaFxyD+DF68g44iP1xWy6dN6gBM5E+Aj8avnJdRJP9 SzD+zjMWGaZ5dEX6TaS9Y6C2kdNdxqMH7BwFBqbz6sLXZZpSaSKWVzoYNI8+A+8I0hAa Ztzhsc0DhDbQqeHK908bE7wWQlDA06w/Fsa4foDr4h12SE4zNJdHg5H2hznaJlMzZxzK T4ZQQO9qmKzI4u0ex/RU9so76n6ce8PO+RQ3vR/NvPPiva+BtpRJ90zy4hY1S4ZoMRLg uTlZsgwg7EAG7V31PUnrIpPHjOaOBJigAlpP+7APUJY3cF51C3/+Bm24KRIsUfK6NVaQ i/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RR+t52c/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f5si31127934eds.162.2021.01.04.05.25.44; Mon, 04 Jan 2021 05:26:07 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RR+t52c/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbhADNWe (ORCPT + 99 others); Mon, 4 Jan 2021 08:22:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34292 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbhADNWd (ORCPT ); Mon, 4 Jan 2021 08:22:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609766466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vPrbs+ygK2nW6UXpFCX2PTOIhaEcotjknLDYayf1rbg=; b=RR+t52c/ES0bgXN62OrfOtjjhLmMeMkufS98DPBRXA5g9l+rBb+QiyOfyxQisqKx0uxmtQ 3VlvqXta2VBHyOSRCx6Isg5nMZsQ1u9/kJd3iXt6wmy+5nDWPVqfg4u9pib2EHkMPXVNGv mUDSiKXc81BwnOfOlZ57btbEyfCu4z0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-skHsRw5jOvqfXn9Kyt7T3A-1; Mon, 04 Jan 2021 08:21:04 -0500 X-MC-Unique: skHsRw5jOvqfXn9Kyt7T3A-1 Received: by mail-wm1-f69.google.com with SMTP id s130so10590290wme.0 for ; Mon, 04 Jan 2021 05:21:04 -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=vPrbs+ygK2nW6UXpFCX2PTOIhaEcotjknLDYayf1rbg=; b=CPiTmON7VChO/DPxj0o0YHXDMQ7J8IyzrNs9GRJWGbOq3pO/kGkapU3qTMPkiWUPs6 JHjVul7aGG8si8cDOTrxMvODNqRGqnFafy/ff/IjyOq4wjpJpwVLPYf7gGtFZlZSL+9U l41MTnfyDzDSDAhKPNo8n+o1Ua/NWU/PvVMMNAfZFMG4HqOTSmWdAlNhWplTw6ddQPgF Q+Pf4O7yVWHnuOz43ykgwR+kOBhQpddhbqdGgEoUqGc3DXivEUEdX/st9BsHMz8yYwQI EQ2tYfBUWcgfDmUhSk8Q2I1S/PzEa8LAzbSmKw6+POZZaURRoSI5hATXl45D13i92I6k RaCQ== X-Gm-Message-State: AOAM533UfaKtV/3Ig16WIklsRDS6W38bM1hAD8Fyg36Vyh23l9A+giPR HaCqC0KkPsnJ3K5uevcPZCI1Iru17H72RxFthtGZVsfyuo7CocKmZB9zQSwAOfIA7kxIIxUx5JR bfPlhox+/1q7ElLIsLQPf2x4n5nrvS8uK9LksQsgM X-Received: by 2002:adf:e452:: with SMTP id t18mr76929197wrm.177.1609766463247; Mon, 04 Jan 2021 05:21:03 -0800 (PST) X-Received: by 2002:adf:e452:: with SMTP id t18mr76929177wrm.177.1609766463058; Mon, 04 Jan 2021 05:21:03 -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: Karol Herbst Date: Mon, 4 Jan 2021 14:20:52 +0100 Message-ID: Subject: Re: [Nouveau] [PATCH v2] ALSA: hda: Continue to probe when codec probe fails To: Kai-Heng Feng Cc: Ilia Mirkin , "moderated list:SOUND" , Kai Vehmanen , Takashi Iwai , nouveau , tiwai@suse.com, open list , Pierre-Louis Bossart , Alex Deucher , Alan Stern , Linux PCI , Bjorn Helgaas , 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 3:50 AM Kai-Heng Feng wrote: > > 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. > it might be that the code to enable the sub function is a bit broken :/ but it should work. Maybe the quirk_nvidia_hda function needs to be called on more occasions? No idea. > 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 > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau >