Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1233307iob; Fri, 29 Apr 2022 00:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPwAMwYRJtlyR1yu6F1Lwjchv09InJL8c/yTO7gGqNsXoU8w8FSKwuqe/uoRZGoBnkvSk8 X-Received: by 2002:a65:6942:0:b0:378:9365:5963 with SMTP id w2-20020a656942000000b0037893655963mr30829645pgq.142.1651216110874; Fri, 29 Apr 2022 00:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651216110; cv=none; d=google.com; s=arc-20160816; b=y199AeDi09D4i1hLw/6qB0TAbl2n7+oblD4zyl3jdevhQV6ltKsuq0H7G0z65IeFhc PwaKaX8bzBZ7riOIk0wH8eEABA2D2QPUxOHkaYKp9q6rdmr9r95rhGyiSnjkiz/DLY17 l0dp+5fbcZ5qXvVIQN8zxWLhuYEGS31fGNe8hKZ/DaO6TtJpUjUcV++J0IETiuYfo3JS lbXQLqqg4ru5oJig66+lJ/LKWlivD0ycCBuKPF9gOpDU1nse3YwIXsnat1WX8Zo9pbsX ws2wlrVeqGEPdLxFEm1J6HGYAfU+Vdjwu3GMD42DrFWpJcCx54+f9KgQiW+Vz+SPtFpS X4Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bPr0ptXF7OjbSR7427CjEN3UvinYooMSIoU7zovFKYA=; b=HVzov/D96wXSAgm4rI2bWcC39FHeOw7+z6CIDVBbqcYUQ0ESUE49AjHEde+LUiXWmF SeJ9hUBBRg515IOfgT99lXeuxv3hrCjMyBv3NuN9N8dTk2dgafqRFxq+2EASKOoQZRZI euZVAcM8gDSGGSTRt/sM5c4xj2mmB/Jdy1vOxJL4E6ax26gkLq1cX3CKEJilkN47LxZy kZECgi/dZ6BRVGH8xNQNTxHHu64H6ZBLz5WvrOXB7MmzXXm+6GaaDTuo881FLOiMPvRn JHlTnRAy33gykUYsbaHG0onEIZsjac2hPJqLgZ2XTlFNWc9FSHdhUxJyipFLud5y4TtN yshA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MbmY5wfp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a621d11000000b004fa687c28d4si5918432pfd.86.2022.04.29.00.08.12; Fri, 29 Apr 2022 00:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MbmY5wfp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354553AbiD2Ge4 (ORCPT + 99 others); Fri, 29 Apr 2022 02:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354492AbiD2Ger (ORCPT ); Fri, 29 Apr 2022 02:34:47 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE6A7629A for ; Thu, 28 Apr 2022 23:31:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DAE35CE306A for ; Fri, 29 Apr 2022 06:31:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21056C385AF; Fri, 29 Apr 2022 06:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651213887; bh=gGK7/gBcj48QlxuUQ6aLxtWNQgyWkYr7fybLKh0KD5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MbmY5wfpkIXYzVOY7GrWXGECIEPh4shZM0RuPaXg/0Pj3b62Ok4OxUHJfO1disdc6 v/aNccc7zhdMTWUjzv5GKqeWAEITIiynZ6Aq6cIGLE+EBCAx5+L476WZThSPpLXa6t 93I/1eyw5mATjnSM7HXiPsJTeYs7BRTIDy+YKdEK0lfz70yTYjYuZudGITkfd12rPj 4lgICGJ6SnFQQabh9SmD4Y5XX1+q+ES4gWn9BshAcmn1NlMVOiDEhdEBaY1ksWxClF c+WWMHte6ENzDZX0deLkyoqvooI1c0bqPgRHYQWbVS/NqRZTJerGzZEl3CfpyzrvSW g26ODSGzqn1EA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nkK9z-001Qml-NN; Fri, 29 Apr 2022 07:31:23 +0100 From: Mauro Carvalho Chehab To: Luis Chamberlain Cc: mauro.chehab@intel.com, Mauro Carvalho Chehab , "Kai Vehmanen" , "Lucas De Marchi" , "Pierre-Louis Bossart" , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter , David Airlie Subject: [PATCH 2/2] ALSA: hda - identify when audio is provided by a video driver Date: Fri, 29 Apr 2022 07:31:16 +0100 Message-Id: <5c3a968858a05c27e299eadf2a925d4aa91ac17a.1651212016.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some devices, the hda driver needs to hook into a video driver, in order to be able to properly access the audio hardware and/or the power management function. That's the case of several snd_hda_intel devices that depends on i915 driver. Currently, this dependency is hidden from /proc/modules and from lsmod, making harder to identify the need to unbind the audio driver before being able to unbind the i915 driver. Add a reference for it at the module dependency, in order to allow userspace to identify it, and print a message on such cases. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH 0/2] at: https://lore.kernel.org/all/cover.1651212016.git.mchehab@kernel.org/ sound/hda/hdac_component.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c index bb37e7e0bd79..103c6be8be1e 100644 --- a/sound/hda/hdac_component.c +++ b/sound/hda/hdac_component.c @@ -211,6 +211,14 @@ static int hdac_component_master_bind(struct device *dev) } complete_all(&acomp->master_bind_complete); + + if (acomp->ops->owner && acomp->ops->owner->name) { + dev_info(dev, "audio component provided by %s driver\n", + acomp->ops->owner->name); + module_add_named_dependency(acomp->ops->owner->name, + dev->driver->owner); + } + return 0; module_put: -- 2.35.1