Date: Thu, 11 May 2000 09:44:41 -0700 From: Ken Marx <kmarx@bigshed.com> To: "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>, Ken Marx <kmarx@bigshed.com> Subject: user level device detection Message-ID: <391AE379.C038BCBC@bigshed.com>
index | next in thread | raw e-mail
Hi,
I've got some code that's trying to determine if a soundcard/sound-support
exists in the running system.
I'm using PCIOCGETCONF to look for any PCI soundcards.
Here are my questions:
1. It appears that PCIOCGETCONF is not a public interface on 2.x, 3.x.
Is there a clean way around this without #includ'ing things from
/usr/src/sys/pci (which may not even exist on the host doing the compile)?
2. Even for 4.0 it seems that the interface isn't completely public:
I had to go look at /usr/src/sys/pci/pcireg.h to get symbolic #defines
for things like PCIC_MULTIMEDIA, etc. Is this correct? Due to change?
3. For ISA soundcard detection, I'm looking at how pnpinfo does it.
a. Is this a reasonable way to go?
c. If so, is the keyword 'Audio' in the descriptive text guaranteed
to always be there for an ISA soundcard?
b. Is there a simpler, cleaner i/f for doing this (akin to PCIOCGETCONF
perhaps)?
4. Will the above approaches cover the case of motherboards with on-board
sound support? If not, then...?
5. Is there perhaps a simpler way to do this in general? E.g., without
presuming permissions to read on /dev/pci and /dev/io, respectively?
Some general way to get a list of all probed devices and their
attributes?
(I suppose I could look at dmesg output and search for sndN and pcmN.
I'm hoping for something less crude. Or is there a programatic
interface for the /var/log output, et al? I'd have to be able to get
to this info even when the /dev/kmem msg buffer and log wraps.)
Thanks in advance for any guidence.
k.
--
Ken Marx, kmarx@bigshed.com
We cannot possibly do our job unless we attempt to be pro-active and stop
beating around the bush on the goal of our customer satisfaction.
- http://cgi.bigshed.com/~kmarx/cgi-bin/speak.cgi
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?391AE379.C038BCBC>
