All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: James Courtier-Dutton <James@superbug.co.uk>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] emu10k1: fix P16V breakage for non	Audigy2 cards
Date: Thu, 17 Mar 2005 10:53:32 -0500	[thread overview]
Message-ID: <1111074813.23171.11.camel@mindpipe> (raw)
In-Reply-To: <4238A516.7070802@superbug.co.uk>

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

On Wed, 2005-03-16 at 21:28 +0000, James Courtier-Dutton wrote:
> Thank you for fixing the bug.
> The "unhandled interrupt" should be commented out. It is used for 
> reverse engineering certain features.
> 

OK, updated patch attached.

Please apply to CVS ASAP, this is a bad bug!

Lee



[-- Attachment #2: sblive-p16v-fixes-2.patch --]
[-- Type: text/x-patch, Size: 2978 bytes --]

Index: alsa/alsa-kernel/pci/emu10k1/emu10k1.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emu10k1.c,v
retrieving revision 1.32
diff -u -r1.32 emu10k1.c
--- alsa/alsa-kernel/pci/emu10k1/emu10k1.c	13 Mar 2005 12:17:08 -0000	1.32
+++ alsa/alsa-kernel/pci/emu10k1/emu10k1.c	16 Mar 2005 05:15:06 -0000
@@ -140,9 +140,11 @@
 		return err;
 	}
 	/* This stores the periods table. */
-	if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1024, &emu->p16v_buffer) < 0) {
-		snd_p16v_free(emu);
-		return -ENOMEM;
+	if (emu->audigy && emu->revision == 4) { /* P16V */	
+		if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1024, &emu->p16v_buffer) < 0) {
+			snd_p16v_free(emu);
+			return -ENOMEM;
+		}
 	}
 
 	if ((err = snd_emu10k1_mixer(emu)) < 0) {
Index: alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c,v
retrieving revision 1.44
diff -u -r1.44 emu10k1_main.c
--- alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c	13 Mar 2005 12:17:08 -0000	1.44
+++ alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c	16 Mar 2005 05:15:07 -0000
@@ -600,7 +600,8 @@
 	if (emu->port)
 		pci_release_regions(emu->pci);
 	pci_disable_device(emu->pci);
-	snd_p16v_free(emu);
+	if (emu->audigy && emu->revision == 4) /* P16V */	
+		snd_p16v_free(emu);
 	kfree(emu);
 	return 0;
 }
Index: alsa/alsa-kernel/pci/emu10k1/irq.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/irq.c,v
retrieving revision 1.13
diff -u -r1.13 irq.c
--- alsa/alsa-kernel/pci/emu10k1/irq.c	13 Mar 2005 12:17:10 -0000	1.13
+++ alsa/alsa-kernel/pci/emu10k1/irq.c	16 Mar 2005 05:15:07 -0000
@@ -170,19 +170,20 @@
 		}
 		outl(orig_status, emu->port + IPR); /* ack all */
 	}
-	while ((status2 = inl(emu->port + IPR2)) != 0) {
-		u32 mask = INTE2_PLAYBACK_CH_0_LOOP;  /* Full Loop */
-		emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
-		orig_status2 = status2;
-		if(status2 & mask) {
-			if(pvoice->use) {
-				snd_pcm_period_elapsed(pvoice->epcm->substream);
-			} else { 
-				snd_printk(KERN_ERR "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", status2, mask, pvoice, pvoice->use);
+	if (emu->audigy && emu->revision == 4) { /* P16V */	
+		while ((status2 = inl(emu->port + IPR2)) != 0) {
+			u32 mask = INTE2_PLAYBACK_CH_0_LOOP;  /* Full Loop */
+			emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
+			orig_status2 = status2;
+			if(status2 & mask) {
+				if(pvoice->use) {
+					snd_pcm_period_elapsed(pvoice->epcm->substream);
+				} else { 
+					snd_printk(KERN_ERR "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", status2, mask, pvoice, pvoice->use);
+				}
 			}
+			outl(orig_status2, emu->port + IPR2); /* ack all */
 		}
-		outl(orig_status2, emu->port + IPR2); /* ack all */
 	}
-
 	return IRQ_RETVAL(handled);
 }

  reply	other threads:[~2005-03-17 15:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16  5:21 [PATCH] emu10k1: fix P16V breakage for non Audigy2 cards Lee Revell
2005-03-16  5:27 ` Lee Revell
2005-03-16 21:28   ` James Courtier-Dutton
2005-03-17 15:53     ` Lee Revell [this message]
2005-03-17 15:58       ` Takashi Iwai
2005-03-17 16:00         ` Lee Revell
2005-03-17 16:20         ` Lee Revell
2005-03-17 16:41           ` Takashi Iwai
2005-03-17 16:48             ` Lee Revell
2005-03-18 19:52       ` James Courtier-Dutton
2005-03-18 19:54         ` Lee Revell
2005-03-18 19:56         ` Lee Revell
2005-03-17 14:11 ` [PATCH] emu10k1: fix misc oopses Thierry Vignaud
2005-03-17 15:02   ` Lee Revell
2005-03-17 16:01   ` Takashi Iwai

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=1111074813.23171.11.camel@mindpipe \
    --to=rlrevell@joe-job.com \
    --cc=James@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 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.