Skip to contentSkip to conversation

ALSA and IrDA workaround for Dell Inspiron

PATCH In review Jörg Prante 2 participants 2 messages Mar 14, 2002 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA and IrDA workaround for Dell Inspiron

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 <[email protected]>

sound/oss/ac97_codec.c +9 -0
@@ -31,6 +31,8 @@
  **************************************************************************
  *
  * History
+ * v0.4a Mar 12 2002 Jörg Prante <[email protected]>
+ *  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;
sound/oss/Config.in +5 -0
@@ -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
#1 lore raw
Quoted 10 lines · 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.

Quoted 8 lines

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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com