Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pavel Hofman <pavel.hofman@insite.cz>
Cc: alsa-devel@alsa-project.org, "Martin Krüger" <m_a_krueger@gmx.de>
Subject: Re: PATCH - MIDI on ice1724 - real-time kernel problem SOLVED(?)
Date: Fri, 27 Jun 2008 16:24:49 +0200	[thread overview]
Message-ID: <s5hhcbfgdla.wl%tiwai@suse.de> (raw)
In-Reply-To: <4864F121.8050405@insite.cz>

At Fri, 27 Jun 2008 15:54:41 +0200,
Pavel Hofman wrote:
> 
> Martin Krüger wrote:
> > Martin Krüger schrieb:
> >> Hi Pavel,
> >>
> >> sorry for the long break, i was really busy at studying.
> >>
> >> ---snip---
> >>
> >> Thanks a lot,
> >> Martin
> >> _______________________________________________
> >> Alsa-devel mailing list
> >> Alsa-devel@alsa-project.org
> >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >>   
> > 
> > Hi again,
> > 
> > i did some other playing around this evening. (Debugging would be a word 
> > much too big...)
> > 
> > I commented out the logic stuff in the following subroutines of the 
> > ice1724.c:
> > 
> > - static int vt1724_midi_output_open(struct snd_rawmidi_substream *s)
> > - static int vt1724_midi_output_close(struct snd_rawmidi_substream *s)
> > - static void vt1724_midi_output_trigger(struct snd_rawmidi_substream 
> > *s, int up)
> > - static void vt1724_midi_output_drain(struct snd_rawmidi_substream *s)
> > 
> > The vt1724_enable_midi_irq(s, VT1724_IRQ_MPU_TX, 1) is killing my 
> > kernel, i don't know why.
> 
> So enabling the MPU TX interrupt causes lockup. Very similar to my 
> experience with the previous version of the MIDI driver. Please put a 
> debug line to snd_vt1724_interrupt, listing status bits for each 
> interrupt. That was the place I experienced loops etc. In my case the 
> flood eventually fooled the logging facility, but I could still read the 
> first few logs.
> 
> 
> > On the input side everything works, so i am a bit confused. Again. ;-)
> 
> I was also getting only TX interrupt floods, RX was OK.

If it's about TX, the patch below might stop lockup (but TX must be
still buggy)...


Takashi

---
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index e596d77..b499328 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -382,23 +382,25 @@ static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id)
 	unsigned char status_mask =
 		VT1724_IRQ_MPU_RX | VT1724_IRQ_MPU_TX | VT1724_IRQ_MTPCM;
 	int handled = 0;
-#ifdef CONFIG_SND_DEBUG
 	int timeout = 0;
-#endif
 
 	while (1) {
 		status = inb(ICEREG1724(ice, IRQSTAT));
 		status &= status_mask;
 		if (status == 0)
 			break;
-#ifdef CONFIG_SND_DEBUG
 		if (++timeout > 10) {
-			printk(KERN_ERR
-			       "ice1724: Too long irq loop, status = 0x%x\n",
-			       status);
+			status = inb(ICEREG1724(ice, IRQSTAT));
+			printk(KERN_ERR "ice1724: Too long irq loop, "
+			       "status = 0x%x\n", status);
+			if (status & VT1724_IRQ_MPU_TX) {
+				printk(KERN_ERR "ice1724: Disabling MPU_TX\n");
+				outb(inb(ICEREG1724(ice, IRQMASK)) &
+				     ~VT1724_IRQ_MPU_TX,
+				     ICEREG1724(ice, IRQMASK));
+			}
 			break;
 		}
-#endif
 		handled = 1;		
 		if (status & VT1724_IRQ_MPU_TX) {
 			spin_lock(&ice->reg_lock);
@@ -2410,8 +2412,10 @@ static int __devinit snd_vt1724_create(struct snd_card *card,
 	}
 
 	/* unmask used interrupts */
+#if 0 /* these are enabled/disabled dynamically */
 	mask = VT1724_IRQ_MPU_RX | VT1724_IRQ_MPU_TX;
 	outb(mask, ICEREG1724(ice, IRQMASK));
+#endif
 	/* don't handle FIFO overrun/underruns (just yet),
 	 * since they cause machine lockups
 	 */

  reply	other threads:[~2008-06-27 14:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080520112539.81C9D2484D@alsa0.perex.cz>
2008-05-23 10:26 ` [alsa-cvslog] alsa-kmirror: ALSA kernel mirror repository branch, master now at 9d46f4a919532c3f29a4ca1df3a4ce4686b11f37 Thierry Vignaud
2008-05-24 16:53   ` PATCH - MIDI on ice1724 - real-time kernel problem SOLVED(?) Martin Krüger
2008-05-26  7:57     ` Pavel Hofman
2008-05-26 10:54       ` Martin Krüger
2008-05-26 14:53         ` Takashi Iwai
2008-05-26 16:29           ` Martin Krüger
2008-05-28 11:58             ` Martin Krüger
2008-05-29  9:35               ` Pavel Hofman
2008-05-29 14:03                 ` "Martin Krüger"
2008-05-29 16:14                   ` Pavel Hofman
2008-06-07 21:36                     ` Pavel Hofman
2008-06-24 11:07                       ` Martin Krüger
2008-06-26 21:01                         ` Martin Krüger
2008-06-27 13:54                           ` Pavel Hofman
2008-06-27 14:24                             ` Takashi Iwai [this message]
2008-06-18  9:58   ` can we make the log appears in subject instead of useless sha1 ID? Thierry Vignaud
2008-06-19  9:54     ` 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=s5hhcbfgdla.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=m_a_krueger@gmx.de \
    --cc=pavel.hofman@insite.cz \
    /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