Date: Tue, 04 Sep 2001 03:00:49 -0700 From: Ed Hall <edhall@weirdnoise.com> To: Manas <bhatt_manas@yahoo.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to write device driver Message-ID: <200109041000.f84A0nv55943@screech.weirdnoise.com> In-Reply-To: Your message of "Tue, 04 Sep 2001 01:54:57 PDT." <20010904085457.64565.qmail@web10705.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Manas <bhatt_manas@yahoo.com> wrote: : hi all, : I upgraded my box from 4.0 to 4.3-stable but my sound : card is still not getting recognised. So i thought why : not write my own device driver. It might be a better idea to at least ask about support for your sound card. You might just be having a configuration problem. Someone may be working on a driver for it. And so forth. : Since i am totally : novice in this area, i searched some places. I found : in the ports collections (/usr/ports/share/examples) : some shell scripts which generate some skeleton driver : structures. : My questions is how should i proceed :) (sounds : cliched but i can't help it). Find the existing sound card driver closest to what you need -- you'll need full documentation for your sound card and a good idea of what other cards have a similar architecture. Then look in /usr/src/sys/dev/sound for a similar driver. Study the driver it until you understand it, using the examples you've found and the man pages to help answer questions. If you're completely stumped on a specific question you can try asking here, but don't expect a step-by-step description; the steps you need to take are going to be unique to your card. Once you have a good idea of what is needed, start hacking away, starting with recognition and initialization of your card, then signal routing/mixing (you only need to start with a canned configuration to get I/O going, then come back and finish), then try to get some sound out (usually easier than getting sound in), then finish up what's left. Or take the path that seems most suitable to you. Learn "ddb" -- you'll be needing it as well as a lot of patience in figuring out why your box just locked up without a peep. Driver programming has few of the comforts of applications programming. : thanks : -manas : ps : please don't say that give your device : information and someone in the freebsd group will : write it. I want to write it on my own:) It's not likely that someone will offer to write it anyway unless there is a more general need for supporting the card. But you could have been more forthcoming as to the details of your card -- you'd probably have wound up with better advice. -Ed To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109041000.f84A0nv55943>