mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jörg Prante" <joergprante@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] ALSA and IrDA workaround for Dell Inspiron
Date: Thu, 14 Mar 2002 16:27:01 +0100	[thread overview]
Message-ID: <200203141527.AUR63833@netmail.netcologne.de> (raw)

[-- 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

             reply	other threads:[~2002-03-14 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14 15:27 Jörg Prante [this message]
2002-03-14 19:37 ` Jaroslav Kysela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200203141527.AUR63833@netmail.netcologne.de \
    --to=joergprante@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®