From owner-freebsd-questions Thu May 11 9:39:30 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dnai.com (dnai.com [207.181.194.98]) by hub.freebsd.org (Postfix) with ESMTP id 3C9B237BB9A for ; Thu, 11 May 2000 09:39:25 -0700 (PDT) (envelope-from kmarx@bigshed.com) Received: from azoth.dnai.com (azoth.dnai.com [207.181.194.94]) by dnai.com (8.9.3/8.9.3) with ESMTP id JAA11284; Thu, 11 May 2000 09:39:24 -0700 (PDT) Received: from bigshed.com (dnai-216-15-97-193.cust.dnai.com [216.15.97.193]) by azoth.dnai.com (8.9.3/8.9.3) with ESMTP id JAA07099; Thu, 11 May 2000 09:39:24 -0700 (PDT) Message-ID: <391AE379.C038BCBC@bigshed.com> Date: Thu, 11 May 2000 09:44:41 -0700 From: Ken Marx X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: "freebsd-questions@FreeBSD.ORG" , Ken Marx Subject: user level device detection Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Envelope-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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