[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5c3a968858a05c27e299eadf2a925d4aa91ac17a.1651212016.git.mchehab@kernel.org>
Date: Fri, 29 Apr 2022 07:31:16 +0100
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: mauro.chehab@...el.com, Mauro Carvalho Chehab <mchehab@...nel.org>,
"Kai Vehmanen" <kai.vehmanen@...el.com>,
"Lucas De Marchi" <lucas.demarchi@...el.com>,
"Pierre-Louis Bossart" <pierre-louis.bossart@...el.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>
Subject: [PATCH 2/2] ALSA: hda - identify when audio is provided by a video driver
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 <mchehab@...nel.org>
---
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
Powered by blists - more mailing lists