Conflict between v4l and adi module

Scott Bronson (bronson@rinspin.com)
Mon, 30 Jul 2001 14:15:41 -0700


I tracked this conflict down a few days ago. It's 100%
reproducible. Does anyone have any insight, or any ideas
of what I should look at now?

Immediately after booting, if I fire up my BT848-based TV
tuner, quit, then try to open /dev/js0, this happens:

[vesper] ~/joystick$ ./jstest /dev/js0
jstest: No such device

If I don't use v4l before trying to open the joystick, everything
just works as it should. This failure also happens if I grab
frames from my ov511-based webcam or my QuickCam Express instead
of watching TV. That's why I think it's v4l that's the culprit.

After jstest reports the missing /dev/js0, if I rmmod adi and
modprobe it again, the joystick starts working again. And it
continues to work from then on, no matter what I do (watch TV,
capture frames, run, quit, etc).

To summarize, the failure (/dev/js0: No such device) only happens
if I use v4l before opening /dev/js0 after booting the computer.
Once /dev/js0 is successfully opened, it always works from then on.
rmmoding and insmoding adi always resolves the conflict. Rebooting
and then using v4l before opening the joystick always causes it.

One last data point, probably not terribly valuable: if I leave
xawtv and the v4l driver open while I rmmod and insmod adi, then
nothing changes. jstest still reports No such device. To get
things working, I need to close xawtv and THEN reload adi.

Linux kernel 2.4.7, X 4.0.3, on a 700 MHz AMD Athlon system.
The joystick is plugged in to a Hoontech 4DWave sound card
with Alsa drivers. All modules are being loaded at boot by
/etc/modules:

tulip
bttv

# joystick...
joydev
pcigame
analog
adi

Nothing is in the logs.

Any ideas? Uninitialized variable maybe? I'm happy to go
digging through the source, but I'm hoping somebody could
give me some hints to narrow down what I have to look through.
Thanks,

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