mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* patch to make suspend/resume work
@ 2004-04-18  5:53 Giridhar Pemmasani
  2004-04-20 13:50 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Giridhar Pemmasani @ 2004-04-18  5:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: alsa-user, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]


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.


[-- Attachment #2: alsa-s3-fix --]
[-- Type: application/octet-stream, Size: 634 bytes --]

--- intel8x0.c.orig	2004-04-15 17:19:56.000000000 -0400
+++ intel8x0.c	2004-04-15 17:20:55.000000000 -0400
@@ -445,6 +445,7 @@
 	
 #ifdef CONFIG_PM
 	int in_suspend;
+	u32 pci_state[64 / sizeof(u32)];
 #endif
 };
 
@@ -2223,11 +2224,13 @@
 {
 	intel8x0_t *chip = snd_magic_cast(intel8x0_t, pci_get_drvdata(dev), return -ENXIO);
 	intel8x0_suspend(chip);
+	pci_save_state(dev, chip->pci_state);
 	return 0;
 }
 static int snd_intel8x0_resume(struct pci_dev *dev)
 {
 	intel8x0_t *chip = snd_magic_cast(intel8x0_t, pci_get_drvdata(dev), return -ENXIO);
+	pci_restore_state(dev, chip->pci_state);
 	intel8x0_resume(chip);
 	return 0;
 }

[-- Attachment #3: Type: text/plain, Size: 11 bytes --]



-- 
Giri

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-22 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-18  5:53 patch to make suspend/resume work Giridhar Pemmasani
2004-04-20 13:50 ` Pavel Machek
2004-04-22 20:02   ` Giridhar Pemmasani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®