Update of /cvsroot/alsa/alsa-kernel/pci/cs46xx
In directory sc8-pr-cvs1:/tmp/cvs-serv2662/pci/cs46xx

Modified Files:
        cs46xx_lib.c 
Log Message:
[PATCH: power-lock-fix.dif]

removed snd_power_lock/unlock from suspend/resume callbacks since
this will invoke sleep eventually.
snd_power_lock/unlock are called inside the control pm ioctl
globally, instead.



Index: cs46xx_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- cs46xx_lib.c        5 Jan 2003 14:27:55 -0000       1.41
+++ cs46xx_lib.c        7 Jan 2003 10:25:27 -0000       1.42
@@ -3725,16 +3725,13 @@
 {
        snd_card_t *card = chip->card;
 
-       snd_power_lock(card);
        if (card->power_state == SNDRV_CTL_POWER_D3hot)
-               goto __skip;
+               return;
        snd_pcm_suspend_all(chip->pcm);
        // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
        // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, 
BA0_AC97_GENERAL_PURPOSE);
        snd_cs46xx_hw_stop(chip);
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-      __skip:
-       snd_power_unlock(card);
 }
 
 void snd_cs46xx_resume(cs46xx_t *chip)
@@ -3742,9 +3739,8 @@
        snd_card_t *card = chip->card;
        int amp_saved;
 
-       snd_power_lock(card);
        if (card->power_state == SNDRV_CTL_POWER_D0)
-               goto __skip;
+               return;
 
        pci_enable_device(chip->pci);
        amp_saved = chip->amplifier;
@@ -3773,8 +3769,6 @@
                chip->active_ctrl(chip, -1);
        }
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-      __skip:
-       snd_power_unlock(card);
 }
 
 static int snd_cs46xx_set_power_state(snd_card_t *card, unsigned int power_state)



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to