public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: rsousa@grad.physics.sunysb.edu
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH] EMU10K1 joystick bug
Date: Tue, 29 May 2001 22:08:06 -0400	[thread overview]
Message-ID: <3B145606.7494C177@didntduck.org> (raw)

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

The EMU10K1 driver currently disables the joystick port on module load
and unload.  This patch preserves the HCFG_JOYENABLE bit when the HCFG
register is modified.

-- 

						Brian Gerst

[-- Attachment #2: diff-emu10k1joy --]
[-- Type: text/plain, Size: 1277 bytes --]

diff -urN linux-2.4.5/drivers/sound/emu10k1/main.c linux/drivers/sound/emu10k1/main.c
--- linux-2.4.5/drivers/sound/emu10k1/main.c	Sat May 26 09:41:32 2001
+++ linux/drivers/sound/emu10k1/main.c	Tue May 29 21:17:06 2001
@@ -363,10 +363,11 @@
 static int __devinit hw_init(struct emu10k1_card *card)
 {
 	int nCh;
-	u32 pagecount; /* tmp */
+	u32 pagecount, tmp;
 
 	/* Disable audio and lock cache */
-	emu10k1_writefn0(card, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE);
+	tmp = emu10k1_readfn0(card, HCFG) & HCFG_JOYENABLE;
+	emu10k1_writefn0(card, HCFG, tmp | HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE);
 
 	/* Reset recording buffers */
 	sblive_writeptr_tag(card, 0,
@@ -557,6 +558,7 @@
 static void __devinit emu10k1_exit(struct emu10k1_card *card)
 {
 	int ch;
+	u32 tmp;
 
 	emu10k1_writefn0(card, INTE, 0);
 
@@ -574,7 +576,8 @@
 	}
 
 	/* Disable audio and lock cache */
-	emu10k1_writefn0(card, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE);
+	tmp = emu10k1_readfn0(card, HCFG) & HCFG_JOYENABLE;
+	emu10k1_writefn0(card, HCFG, tmp | HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE);
 
 	sblive_writeptr_tag(card, 0,
                             PTB, 0,

                 reply	other threads:[~2001-05-30  2:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3B145606.7494C177@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rsousa@grad.physics.sunysb.edu \
    /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