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

Modified Files:
        cs46xx.c cs46xx_lib.c 
Log Message:
clean up PM codes

Index: cs46xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs46xx/cs46xx.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- cs46xx.c    2 Apr 2003 14:42:38 -0000       1.20
+++ cs46xx.c    18 Jun 2003 11:07:21 -0000      1.21
@@ -163,7 +163,6 @@
 }
 
 #ifdef CONFIG_PM
-#ifndef PCI_OLD_SUSPEND
 static int snd_card_cs46xx_suspend(struct pci_dev *pci, u32 state)
 {
        cs46xx_t *chip = snd_magic_cast(cs46xx_t, pci_get_drvdata(pci), return -ENXIO);
@@ -176,18 +175,6 @@
        snd_cs46xx_resume(chip);
        return 0;
 }
-#else
-static void snd_card_cs46xx_suspend(struct pci_dev *pci)
-{
-       cs46xx_t *chip = snd_magic_cast(cs46xx_t, pci_get_drvdata(pci), return);
-       snd_cs46xx_suspend(chip);
-}
-static void snd_card_cs46xx_resume(struct pci_dev *pci)
-{
-       cs46xx_t *chip = snd_magic_cast(cs46xx_t, pci_get_drvdata(pci), return);
-       snd_cs46xx_resume(chip);
-}
-#endif
 #endif
 
 static void __devexit snd_card_cs46xx_remove(struct pci_dev *pci)

Index: cs46xx_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- cs46xx_lib.c        15 May 2003 13:16:00 -0000      1.60
+++ cs46xx_lib.c        18 Jun 2003 11:07:21 -0000      1.61
@@ -3010,7 +3010,7 @@
 /*
  *  initialize chip
  */
-static int snd_cs46xx_chip_init(cs46xx_t *chip, int busywait)
+static int snd_cs46xx_chip_init(cs46xx_t *chip)
 {
        int timeout;
 
@@ -3090,7 +3090,8 @@
        /*
          *  Wait until the PLL has stabilized.
         */
-       mdelay(100); /* FIXME: schedule? */
+       set_current_state(TASK_UNINTERRUPTIBLE);
+       schedule_timeout(HZ/10); /* 100ms */
 
        /*
         *  Turn on clocking of the core so that we can setup the serial ports.
@@ -3143,12 +3144,8 @@
                 */
                if (snd_cs46xx_peekBA0(chip, BA0_ACSTS) & ACSTS_CRDY)
                        goto ok1;
-               if (busywait)
-                       mdelay(10);
-               else {
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout((HZ+99)/100);
-               }
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout((HZ+99)/100);
        }
 
 
@@ -3197,12 +3194,8 @@
                 */
                if ((snd_cs46xx_peekBA0(chip, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) 
== (ACISV_ISV3 | ACISV_ISV4))
                        goto ok2;
-               if (busywait)
-                       mdelay(10);
-               else {
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout((HZ+99)/100);
-               }
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout((HZ+99)/100);
        }
 
 #ifndef CONFIG_SND_CS46XX_NEW_DSP
@@ -3811,7 +3804,7 @@
        chip->amplifier = 0;
        chip->active_ctrl(chip, 1); /* force to on */
 
-       snd_cs46xx_chip_init(chip, 1);
+       snd_cs46xx_chip_init(chip);
 
 #if 0
        snd_cs46xx_codec_write(chip, BA0_AC97_GENERAL_PURPOSE, 
@@ -3992,7 +3985,7 @@
        }
 #endif
 
-       err = snd_cs46xx_chip_init(chip, 0);
+       err = snd_cs46xx_chip_init(chip);
        if (err < 0) {
                snd_cs46xx_free(chip);
                return err;



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to