]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: hda: Fix the audio-component completion timeout
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 Sep 2018 16:21:11 +0000 (18:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 20 Sep 2018 06:36:03 +0000 (08:36 +0200)
The timeout of audio component binding was incorrectly specified in
msec, not in jiffies, which results in way too shorter timeout than
expected.

Along with fixing it, add the information print about the binding
failure to show the unexpected situation more clearly.

Fixes: a57942bfdd61 ("ALSA: hda: Make audio component support more generic")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_i915.c

index b5282cbbe48981d350f396525013fc571cdf62fa..617ff1aa818f991a01091a9e03aa7952978c0b92 100644 (file)
@@ -145,9 +145,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
        if (!acomp->ops) {
                request_module("i915");
                /* 10s timeout */
-               wait_for_completion_timeout(&bind_complete, 10 * 1000);
+               wait_for_completion_timeout(&bind_complete,
+                                           msecs_to_jiffies(10 * 1000));
        }
        if (!acomp->ops) {
+               dev_info(bus->dev, "couldn't bind with audio component\n");
                snd_hdac_acomp_exit(bus);
                return -ENODEV;
        }