This is a note to let you know that I've just added the patch titled

    ALSA: hda - Move runtime PM check to runtime_idle callback

to the 3.7-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-move-runtime-pm-check-to-runtime_idle-callback.patch
and it can be found in the queue-3.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6eb827d23577a4efec2b10a9c4cc9ded268a1d1c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Wed, 12 Dec 2012 11:50:12 +0100
Subject: ALSA: hda - Move runtime PM check to runtime_idle callback

From: Takashi Iwai <[email protected]>

commit 6eb827d23577a4efec2b10a9c4cc9ded268a1d1c upstream.

The runtime_idle callback is the right place to check the suspend
capability, but currently we do it wrongly in the runtime_suspend
callback.  This leads to a kernel error message like:
   pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50 [snd_hda_intel] 
returns -11
and the runtime PM core would even repeat the attempts.

Reported-and-tested-by: Borislav Petkov <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 sound/pci/hda/hda_intel.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2557,10 +2557,6 @@ static int azx_runtime_suspend(struct de
        struct snd_card *card = dev_get_drvdata(dev);
        struct azx *chip = card->private_data;
 
-       if (!power_save_controller ||
-           !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
-               return -EAGAIN;
-
        azx_stop_chip(chip);
        azx_clear_irq_pending(chip);
        return 0;
@@ -2575,12 +2571,25 @@ static int azx_runtime_resume(struct dev
        azx_init_chip(chip, 1);
        return 0;
 }
+
+static int azx_runtime_idle(struct device *dev)
+{
+       struct snd_card *card = dev_get_drvdata(dev);
+       struct azx *chip = card->private_data;
+
+       if (!power_save_controller ||
+           !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
+               return -EBUSY;
+
+       return 0;
+}
+
 #endif /* CONFIG_PM_RUNTIME */
 
 #ifdef CONFIG_PM
 static const struct dev_pm_ops azx_pm = {
        SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume)
-       SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, NULL)
+       SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, 
azx_runtime_idle)
 };
 
 #define AZX_PM_OPS     &azx_pm


Patches currently in stable-queue which might be from [email protected] are

queue-3.7/alsa-hda-fix-the-wrong-pincaps-set-in-alc861vd-dallas-hp-fixup.patch
queue-3.7/alsa-hda-add-mute-led-for-hp-pavilion-17-realtek-codec.patch
queue-3.7/alsa-hda-add-stereo-dmic-fixup-for-acer-aspire-one-522.patch
queue-3.7/alsa-hda-move-runtime-pm-check-to-runtime_idle-callback.patch
queue-3.7/alsa-hda-always-turn-on-pins-for-hdmi-dp.patch
queue-3.7/alsa-hda-fix-pin-configuration-of-hp-pavilion-dv7.patch
queue-3.7/alsa-usb-audio-fix-missing-autopm-for-midi-input.patch
queue-3.7/alsa-usb-audio-avoid-autopm-calls-after-disconnection.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to