Skip to content

Commit 74bf71e

Browse files
sthibaultiwai
authored andcommitted
ALSA: hda: Fix 1-minute detection delay when i915 module is not available
Distribution installation images such as Debian include different sets of modules which can be downloaded dynamically. Such images may notably include the hda sound modules but not the i915 DRM module, even if the latter was enabled at build time, as reported on https://bugs.debian.org/931507 In such a case hdac_i915 would be linked in and try to load the i915 module, fail since it is not there, but still wait for a whole minute before giving up binding with it. This fixes such as case by only waiting for the binding if the module was properly loaded (or module support is disabled, in which case i915 is already compiled-in anyway). Fixes: f9b54e1 ("ALSA: hda/i915: Allow delayed i915 audio component binding") Signed-off-by: Samuel Thibault <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 3f88094 commit 74bf71e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sound/hda/hdac_i915.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
136136
if (!acomp)
137137
return -ENODEV;
138138
if (!acomp->ops) {
139-
request_module("i915");
140-
/* 60s timeout */
141-
wait_for_completion_timeout(&bind_complete,
142-
msecs_to_jiffies(60 * 1000));
139+
if (!IS_ENABLED(CONFIG_MODULES) ||
140+
!request_module("i915")) {
141+
/* 60s timeout */
142+
wait_for_completion_timeout(&bind_complete,
143+
msecs_to_jiffies(60 * 1000));
144+
}
143145
}
144146
if (!acomp->ops) {
145147
dev_info(bus->dev, "couldn't bind with audio component\n");

0 commit comments

Comments
 (0)