All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Friedrich Ewaldt <friedrich.ewaldt@gmx.de>
Cc: Thierry Vignaud <tvignaud@mandrakesoft.com>,
	alsa-devel@lists.sourceforge.net
Subject: Re: Re: [Alsa-user] fm801 driver status?
Date: Tue, 17 Dec 2002 19:11:27 +0100	[thread overview]
Message-ID: <s5h8yyowm5s.wl@alsa2.suse.de> (raw)
In-Reply-To: <3DFE3DA5.4000700@gmx.de>

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

At Mon, 16 Dec 2002 21:55:01 +0100,
Friedrich Ewaldt wrote:
> 
> >especially, please check the following:
> >
> >- loading the module and unloading it immediately works?
> >
> yep. /proc/asound builds up immediately, lsmod shows snd, ... modules 
> immediately after modprobing
 
ok.

> >- the port and irq number are correct, i.e. match with the resources
> >  listed on lspci?
> >
> info from /proc/asound/cards:
> FM801-AS at 0xec00, irq 10
> 
> lspci output:
> 00:0b.0 Multimedia audio controller: Fortemedia, Inc Xwave QS3000A
> [FM801] (rev a0)
>        Subsystem: Fortemedia, Inc: Unknown device 1319
>        Flags: bus master, medium devsel, latency 40, IRQ 10
>        I/O ports at ec00 [size=128]
> 
> (IRQ 10, I/O ec00 also shown by window?)

ok, looks fine, too.
 
> >- playback (via aplay) works?  does the system hang up at the start,
> >  during the playback or at the stop?
> >
> playback works. I even hear the correct sound when I plug in headphones :-)
> The system locks when stopping playback. (If only I had infinite audio 
> files...)
 
hmm...

> >- during the playback, does the count in /proc/interrupts increases?
> >  (check with another terminal)
> >  
> >
> the count at '10' (I assume this is irq 10) increases during playback by 
> approx. 10-15 per second.
 
ok, that's normal.

> >a typical reason of such a hang up is either the wrong spinlocks,
> >unexpected infinite loops in the driver code, or the interrupt
> >storms.  if it's the interrupt storm, then it can be related with the
> >hardware, often motherboard chipset, or BIOS version.
> >or, could it be because of ACPI?  did you apply it?
> >  
> >
> I unselected ACPI before compiling the kernel. ACPI is switched off in 
> the bios. (I have only APM running as power management)
 
ok, then it shouldn't be a problem.


perhaps do you see something out in the kernel messages on console 10
(alt+f10) when the system hangs?  well, after hang up, you cannot
switch the console, but you can start aplay on a certain
console, switch with alt+f10 and wait until the playback is finished.

anyway, could you try the attached patch?

if you see something on the kernel messages such like kernel panic or
oops, we can track the point...


ciao,

Takashi

[-- Attachment #2: fm801-intr-fix.dif --]
[-- Type: application/octet-stream, Size: 1767 bytes --]

Index: alsa-kernel/pci/fm801.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/fm801.c,v
retrieving revision 1.21
diff -u -r1.21 fm801.c
--- alsa-kernel/pci/fm801.c	16 Dec 2002 11:03:47 -0000	1.21
+++ alsa-kernel/pci/fm801.c	17 Dec 2002 18:08:52 -0000
@@ -470,8 +470,11 @@
 	unsigned int tmp;
 
 	status = inw(FM801_REG(chip, IRQ_STATUS));
-	if ((status & (FM801_IRQ_PLAYBACK|FM801_IRQ_CAPTURE|FM801_IRQ_MPU|FM801_IRQ_VOLUME)) == 0)
+	status &= FM801_IRQ_PLAYBACK|FM801_IRQ_CAPTURE|FM801_IRQ_MPU|FM801_IRQ_VOLUME;
+	if (! status)
 		return;
+	/* ack first */
+	outw(status, FM801_REG(chip, IRQ_STATUS));
 	if (chip->pcm && (status & FM801_IRQ_PLAYBACK) && chip->playback_substream) {
 		spin_lock(&chip->reg_lock);
 		chip->ply_buf++;
@@ -483,7 +486,6 @@
 				(chip->ply_buf & 1) ?
 					FM801_REG(chip, PLY_BUF1) :
 					FM801_REG(chip, PLY_BUF2));
-		outw(FM801_IRQ_PLAYBACK, FM801_REG(chip, IRQ_STATUS));
 		spin_unlock(&chip->reg_lock);
 		snd_pcm_period_elapsed(chip->playback_substream);
 	}
@@ -498,18 +500,13 @@
 				(chip->cap_buf & 1) ?
 					FM801_REG(chip, CAP_BUF1) :
 					FM801_REG(chip, CAP_BUF2));
-		outw(FM801_IRQ_CAPTURE, FM801_REG(chip, IRQ_STATUS));
 		spin_unlock(&chip->reg_lock);
 		snd_pcm_period_elapsed(chip->capture_substream);
 	}
-	if ((status & FM801_IRQ_MPU) && chip->rmidi != NULL) {
+	if (chip->rmidi && (status & FM801_IRQ_MPU))
 		snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs);
-		outw(FM801_IRQ_MPU, FM801_REG(chip, IRQ_STATUS));
-	}
-	if (status & FM801_IRQ_VOLUME) {
-		/* TODO */
-		outw(FM801_IRQ_VOLUME, FM801_REG(chip, IRQ_STATUS));
-	}
+	if (status & FM801_IRQ_VOLUME)
+		;/* TODO */
 }
 
 static snd_pcm_hardware_t snd_fm801_playback =

  reply	other threads:[~2002-12-17 18:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-12 14:45 fm801 driver status? Friedrich Ewaldt
2002-12-12 15:08 ` [Alsa-user] " Takashi Iwai
2002-12-12 16:27   ` Friedrich Ewaldt
2002-12-12 17:32     ` Takashi Iwai
2002-12-13  9:53       ` Thierry Vignaud
2002-12-13 11:17         ` Friedrich Ewaldt
2002-12-13 16:29           ` Takashi Iwai
2002-12-13 16:33             ` Thierry Vignaud
2002-12-13 16:57             ` Friedrich Ewaldt
2002-12-13 17:02               ` Takashi Iwai
2002-12-13 18:24                 ` Friedrich Ewaldt
2002-12-16 15:12                   ` Takashi Iwai
2002-12-16 20:55                     ` Friedrich Ewaldt
2002-12-17 18:11                       ` Takashi Iwai [this message]
2002-12-18 13:28                         ` Friedrich Ewaldt
2002-12-19 11:31                           ` Takashi Iwai
2002-12-19 20:21                             ` Friedrich Ewaldt
2002-12-13 11:15       ` Friedrich Ewaldt

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=s5h8yyowm5s.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=friedrich.ewaldt@gmx.de \
    --cc=tvignaud@mandrakesoft.com \
    /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.