All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel8x0 - IBM Thinkpad T30
@ 2003-07-21 15:41 Arnaud de Bossoreille de Ribou
  0 siblings, 0 replies; only message in thread
From: Arnaud de Bossoreille de Ribou @ 2003-07-21 15:41 UTC (permalink / raw)
  To: alsa-devel

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

Hi,

here is a patch which fixes a bug on T30 computers when switching back
from suspend mode.

The first modification allow the system to recover from errors when a
warm reset is not enough.

The second one fixes the bug I explained.

With this patch no need to kill all the applications using audio devices
before switching to suspend mode.

I made the patch with an old version on the driver (0.9.4) but it's easy
to port it for the CVS version.

Regards,

-- 
Arnaud

[-- Attachment #2: intel8x0.patch --]
[-- Type: text/plain, Size: 862 bytes --]

--- ../alsa-driver-0.9.4/alsa-kernel/pci/intel8x0.c	2003-05-20 14:55:15.000000000 +0200
+++ alsa-kernel/pci/intel8x0.c	2003-06-07 12:22:49.000000000 +0200
@@ -1542,7 +1542,10 @@
 	}
 	ac97.pci = chip->pci;
 	if ((err = snd_ac97_mixer(chip->card, &ac97, &x97)) < 0)
+	{
+		iputdword(chip, ICHREG(GLOB_CNT), igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_AC97COLD);
 		return err;
+	}
 	chip->ac97[0] = x97;
 	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks);
 	/* the following three entries are common among all devices */
@@ -1769,7 +1772,7 @@
       	if (status == (ICH_PCR | ICH_SCR | ICH_TCR))
       		goto __ok3;
 	/* wait for other codecs ready status. No secondary codecs? , ok */
-	end_time = jiffies + HZ / 4;
+	end_time = jiffies + HZ / 2;
 	do {
 		nstatus = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR);
 		if (nstatus != status) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-21 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 15:41 [PATCH] intel8x0 - IBM Thinkpad T30 Arnaud de Bossoreille de Ribou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.