mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA and IrDA workaround for Dell Inspiron
@ 2002-03-14 15:27 Jörg Prante
  2002-03-14 19:37 ` Jaroslav Kysela
  0 siblings, 1 reply; 2+ messages in thread
From: Jörg Prante @ 2002-03-14 15:27 UTC (permalink / raw)
  To: linux-kernel

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


Here is a patch to solve an IrDA lockup when ALSA OSS is used with IrDA on 
Dell Inspiron 8100. Maybe some other laptops are concerned, too. Please test 
if other machines can use this patch.

The ALSA OSS initialization code performs a hard reset on the IrDA port of a 
Dell Inspiron. No more data can be sent or received via the infrared port 
until a cold restart of the system (power down). The lockup will always 
happen when ALSA is started after IrDA which is normally the case. 

I found the ALSA OSS AC97 modem probe is the reason. This patch enables a 
workaround by a kernel option CONFIG_SOUND_NO_MODEM_PROBE which 
disables the modem probe if the option is enabled.

The patch will be included in my upcoming kernel patch set -jp8.

Please reply with CC since I am not subscribed to the Linux kernel mailing 
list.

Cheers,

Jörg Prante <joerg@infolinux.de>

[-- Attachment #2: alsa-irda-no-modem-probe.patch --]
[-- Type: text/x-diff, Size: 1413 bytes --]

--- linux/sound/oss/ac97_codec.c	Fri Mar  8 03:18:13 2002
+++ linux-jp8/sound/oss/ac97_codec.c	Thu Mar 14 15:48:39 2002
@@ -31,6 +31,8 @@
  **************************************************************************
  *
  * History
+ * v0.4a Mar 12 2002 Jörg Prante <joerg@infolinux.de>
+ *  minor fix: do not probe for modem codec
  * v0.4 Mar 15 2000 Ollie Lho
  *	dual codecs support verified with 4 channels output
  * v0.3 Feb 22 2000 Ollie Lho
@@ -691,8 +693,15 @@
 	}
 
 	/* probe for Modem Codec */
+#if CONFIG_SOUND_NO_MODEM_PROBE
+	/* Do not probe for Modem Codec. 
+	   This prevents IrDA lockups on some laptops (Dell Inspiron)
+       when sound is initialized after IrDA init. -jprante */
+	modem = 0; 
+#else
 	codec->codec_write(codec, AC97_EXTENDED_MODEM_ID, 0L);
 	modem = codec->codec_read(codec, AC97_EXTENDED_MODEM_ID);
+#endif
 
 	codec->name = NULL;
 	codec->codec_ops = &null_ops;
--- linux/sound/oss/Config.in	Thu Mar 14 00:42:48 2002
+++ linux-jp8/sound/oss/Config.in	Thu Mar 14 15:53:32 2002
@@ -4,6 +4,11 @@
 # More hacking for modularisation.
 #
 
+# Do not probe for modem codec option. This is a workaround to prevent 
+# hard IrDA lockups on some laptops (Dell Inspiron). -jprante
+
+bool 'Do not probe for AC97 Modem Codec (prevent IrDA lockup)' CONFIG_SOUND_NO_MODEM_PROBE
+
 # Prompt user for primary drivers.
 
 dep_tristate '  BT878 audio dma' CONFIG_SOUND_BT878 $CONFIG_SOUND

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

* Re: [PATCH] ALSA and IrDA workaround for Dell Inspiron
  2002-03-14 15:27 [PATCH] ALSA and IrDA workaround for Dell Inspiron Jörg Prante
@ 2002-03-14 19:37 ` Jaroslav Kysela
  0 siblings, 0 replies; 2+ messages in thread
From: Jaroslav Kysela @ 2002-03-14 19:37 UTC (permalink / raw)
  To: Jörg Prante; +Cc: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 1290 bytes --]

On Thu, 14 Mar 2002, [iso-8859-15] Jörg Prante wrote:

> 
> Here is a patch to solve an IrDA lockup when ALSA OSS is used with IrDA on 
> Dell Inspiron 8100. Maybe some other laptops are concerned, too. Please test 
> if other machines can use this patch.
> 
> The ALSA OSS initialization code performs a hard reset on the IrDA port of a 
> Dell Inspiron. No more data can be sent or received via the infrared port 
> until a cold restart of the system (power down). The lockup will always 
> happen when ALSA is started after IrDA which is normally the case. 
> 
> I found the ALSA OSS AC97 modem probe is the reason. This patch enables a 
> workaround by a kernel option CONFIG_SOUND_NO_MODEM_PROBE which 
> disables the modem probe if the option is enabled.
> 
> The patch will be included in my upcoming kernel patch set -jp8.
> 
> Please reply with CC since I am not subscribed to the Linux kernel mailing 
> list.

A small note: The directory linux/sound/oss contains only OSS sources
moved from linux/drivers/sound. They are not related with ALSA in any way.
ALSA AC97 codec routines don't touch modem registers at all.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project  http://www.alsa-project.org
SuSE Linux    http://www.suse.com



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

end of thread, other threads:[~2002-03-14 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-14 15:27 [PATCH] ALSA and IrDA workaround for Dell Inspiron Jörg Prante
2002-03-14 19:37 ` Jaroslav Kysela

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®