Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13206

Modified Files:
        intel8x0.c 
Log Message:
From: Giridhar Pemmasani <[EMAIL PROTECTED]>

It seems that pci config space is messed up after resume for Intel ICH4
audio controller (on Dell Latitude D600, but I notice that others also
complain about this problem).  Consequently resume from S3 causes oops with
snd_intel8x0 module.  If the module is removed before suspend and loaded
afterwards, I still get oops.  The following simple patch fixes the
problem.  With this, I can leave alsa untouched during suspend/resume.


Index: intel8x0.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- intel8x0.c  14 Apr 2004 17:24:32 -0000      1.135
+++ intel8x0.c  21 Apr 2004 18:18:27 -0000      1.136
@@ -444,6 +444,10 @@
        struct snd_dma_buffer bdbars;
        u32 int_sta_reg;                /* interrupt status register */
        u32 int_sta_mask;               /* interrupt status mask */
+
+#ifdef CONFIG_PM
+       u32 pci_state[64 / sizeof(u32)];
+#endif
 };
 
 static struct pci_device_id snd_intel8x0_ids[] = {
@@ -2208,6 +2212,7 @@
        for (i = 0; i < 3; i++)
                if (chip->ac97[i])
                        snd_ac97_suspend(chip->ac97[i]);
+       pci_save_state(chip->pci, chip->pci_state);
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
        return 0;
 }
@@ -2217,6 +2222,7 @@
        intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return 
-EINVAL);
        int i;
 
+       pci_restore_state(chip->pci, chip->pci_state);
        pci_enable_device(chip->pci);
        pci_set_master(chip->pci);
        snd_intel8x0_chip_init(chip, 0);



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to