PnP, IRQ problems with WaveFront & 2.1.121

Paul Barton-Davis (pbd@Op.Net)
Wed, 16 Sep 1998 10:32:35 -0400


David -

I'd like you to try out the latest version of the driver. Its not in
general release yet, but is being used by a few people (I've been
using it for a month or two). It doesn't add any visible
functionality (unless you've tried to infer the driver API and write
some user level code), but it does do autodetection of the board
interrupt. That is, it uses the kernel "probe_irq_*()" functions to
detect any interrupt on an unassigned vector after tweaking the board
so that it should generate one.

Here's the code fragment that shows the kind of warnings to expect:

irq_mask = probe_irq_on ();

outb (0x0, dev.control_port);
outb (0x80 | 0x40 | bits, dev.data_port);
wavefront_should_cause_interrupt(0x80|0x40|0x10|0x1,
dev.control_port,
(2*HZ)/100);

reported_irq = probe_irq_off (irq_mask);

if (reported_irq != dev.irq) {
if (reported_irq == 0) {
printk (KERN_ERR LOGNAME
"No unassigned interrupts detected "
"after h/w reset\n");
} else if (reported_irq < 0) {
printk (KERN_ERR LOGNAME
"Multiple unassigned interrupts detected "
"after h/w reset\n");
} else {
printk (KERN_ERR LOGNAME "autodetected IRQ %d not the "
"value provided (%d)\n", reported_irq,
dev.irq);
}
return 1;
} else {
printk (KERN_INFO LOGNAME "autodetected IRQ at %d\n",
reported_irq);
}

But first, here's a couple of warnings: someone else wrote me with a
similar problem, and what this driver essentially told me was that
their board is either *NOT* generating an interrupt, or its generating
an interrupt on a preassigned interrupt vector. Its possible to use
/proc/stat to figure out which of these two is true, though in
practice, if the shared interrupt was with something like the disk
driver or (and how could this be!) the timer, it would be essentially
impossible to detect in the noise.

So, it does seem possible that some WaveFront cards fail to generate
interrupts under certain conditions. In case you wonder: the reason
such cards/circumstances don't stop the DOS/Windows drivers is that
they don't use interrupts. The Turtle Beach drivers do actually
generate a few interrupts during card setup, but they are
side-effects, and then they turn them off and never use them again.

The second warning is more trival: before using the new driver, you'll
need minor patch below for .../drivers/sound/sound_calls.h.

Let me know what the new driver says.

--pbd

ps. oh yeah, that new driver: http://www.op.net/~pbd/wavefront-0.3.0.tar.gz
the driver code is stable, hopefully it installs cleanly as well.
this should appear in a new version of the kernel soon, so be
forewarned that some subsequent kernel patch will notice the
pre-existing change to sound_calls.h ...

------------------------------------------------------------------------------

diff -u --new-file --recursive -x *.[oa] -x .??* sound-orig/sound_calls.h sound/sound_calls.h
--- sound-orig/sound_calls.h Sat Jul 18 17:11:41 1998
+++ sound/sound_calls.h Tue Sep 8 09:46:17 1998
@@ -273,7 +273,7 @@
int probe_vidc(struct address_info *hw_config);
void unload_vidc(struct address_info *hw_config);

-/* From wavefront.c */
+/* From wavfront.c */
void attach_wavefront (struct address_info *hw_config);
int probe_wavefront (struct address_info *hw_config);
void unload_wavefront (struct address_info *hw_config);
@@ -282,29 +282,4 @@
void attach_wf_mpu(struct address_info * hw_config);
int probe_wf_mpu(struct address_info *hw_config);
void unload_wf_mpu(struct address_info *hw_config);
-int virtual_midi_enable (int mididev, struct address_info *);
-void virtual_midi_disable (int mididev);

-/* From wavefront.c */
-void attach_wavefront (struct address_info *hw_config);
-int probe_wavefront (struct address_info *hw_config);
-void unload_wavefront (struct address_info *hw_config);
-
-/* From wf_midi.c */
-void attach_wf_mpu(struct address_info * hw_config);
-int probe_wf_mpu(struct address_info *hw_config);
-void unload_wf_mpu(struct address_info *hw_config);
-int virtual_midi_enable (int mididev, struct address_info *);
-void virtual_midi_disable (int mididev);
-
-/* From wavefront.c */
-void attach_wavefront (struct address_info *hw_config);
-int probe_wavefront (struct address_info *hw_config);
-void unload_wavefront (struct address_info *hw_config);
-
-/* From wf_midi.c */
-void attach_wf_mpu(struct address_info * hw_config);
-int probe_wf_mpu(struct address_info *hw_config);
-void unload_wf_mpu(struct address_info *hw_config);
-int virtual_midi_enable (int mididev, struct address_info *);

-void virtual_midi_disable (int mididev);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/