Page 1 of 1
Linking audio to a kernel
Posted: Tue Oct 16, 2007 8:20 pm
by atmb4u
I am a newbbie in this site. Im onto an OS level project. We need to link the audio to the kernel.Please help me
Plz help................
Posted: Tue Oct 16, 2007 8:32 pm
by Alboin
Wow.
- Wrong Forum
- Asking for "A-Z" or "just giv"
- Questionable Grammar
- Did not search this forum\wiki to find your answer. (Otherwise your wouldn't have posted in the manner you did. )
- ALSA was mentioned on an osdev forum.
To answer, you must first develop your kernel to a certain extent and then write drivers to support your audio card. And no, I've been doing osdev for awhile, and all the time ALSA has never been mentioned, so, sorry.
Please do obey forum policy. Thank you.
Posted: Sun Oct 21, 2007 6:15 pm
by Brynet-Inc
You've already posted this.. and you keep posting it in the wrong section as well
http://www.osdev.org/phpBB2/viewtopic.php?p=108339
Please don't wait 5 days and ask the same question again..
Posted: Sun Oct 21, 2007 6:26 pm
by atmb4u
Now then plz guide me. I am searching in the wrong area then show me the right path Plz....
This is because I don't know wat to do.....
plz
Posted: Sun Oct 21, 2007 6:28 pm
by atmb4u
Im sorry about the grammer.
Please pardon me...........
Posted: Sun Oct 21, 2007 6:46 pm
by JackScott
The OSDev wiki forum is generally only for questions relating to the development of the wiki, and questions about dubious content. If you have a general development question (such as this one is) you should consider using the Development board (
http://www.osdev.org/phpBB2/viewforum.php?f=1).
As for your actual question, we need more information to be able to help. For instance, what do you mean by 'link audio with the kernel'. I presume you mean you want to support sound cards. Well, there are a lot of different types, all accessed in different ways. Some of them might have ISA interfaces, some have PCI. Others will have non-standard drivers.
To begin with, check out
http://www.osdev.org/wiki/Resources#Audio
If you refine your question, hopefully we'll be able to help more.
Posted: Mon Oct 22, 2007 7:11 am
by mystran
atmb4u wrote:Now then plz guide me. I am searching in the wrong area then show me the right path Plz....
This is because I don't know wat to do.....
plz
Fine. You will need three things:
- a device driver for the specific type of audio interface in the computer
- audio data in some format
- some code to feed the data to the driver in the format it understands
How to write device drivers for sound cards should be your first problem. Such a device driver typically fills a buffer for the soundcard, waits until the buffer is empty (or near empty) then fills some more, and so on. Doing this in a reasonable manner involves interrupts, so make sure you can handle those first. Then figure out what device you want to support first (choosing some simple well documented and emulator supported thing like SBpro/16 might be a good idea), and search for documentation of said device.
The part that then feeds data to this driver (into some possibly larger buffer) is relatively easy, if your audio data is something simple. I'd suggest you forget about fancy codecs like MP3 at first, and just use something like uncompressed .WAVs, which are basicly PCM data.
Ofcourse if you've never written any software that plays audio under some normal operating system, I suggest you try that first, before you start messing with your own device drivers.
Did that help any?
AUDIO::AUDIO::AUDIO::All around...
Posted: Tue Oct 23, 2007 8:29 am
by atmb4u
Posted: Tue Oct 23, 2007 8:37 am
by JamesM
Hi,
Every audio chipset is different in some respects unfortunately. Although I'm no expert on the matter I'm sure you can find some traits that run through most (Register addresses etc?) but each will have a difference.
Re: AUDIO::AUDIO::AUDIO::All around...
Posted: Tue Oct 23, 2007 8:38 am
by mystran
atmb4u wrote:
Is it necessary to have "SPECIFIC" audio drivers to use the audio devices????
Yes, although some devices are compatible to other devices (or specifications). It used to be that all audio cards had some level of soundblaster compatibility. Not so anymore, but nowadays many cards (and especially integrated chipsets) follow the AC97 specification, so researching into that might be worth something.
Can I use same program to access audio devices in different systems at minimum level???
Same program, yes, but same driver, no. The program talks to the driver, the driver knows how to speak to a specific audio card.
Can I access it through any other easier means???
In a custom OS.. well, no.
Re: AUDIO::AUDIO::AUDIO::All around...
Posted: Tue Oct 23, 2007 8:45 am
by Brynet-Inc
atmb4u wrote:Is it necessary to have "SPECIFIC" audio drivers to use the audio devices????
Typically, Yes - Sound card manufactures don't design their cards identically...
atmb4u wrote:Can I use same program to access audio devices in different systems at minimum level???
Program? Normally you would write the drivers in-kernel or via modules.. and then implement a standard userland API (Like OSS..)
atmb4u wrote:Can I access it through any other easier means???
Intel's AC'97 is often implemented.... if you aren't one of the lucky few, Try looking at other OS's drivers and port them over (
licence permitting...)
http://en.wikipedia.org/wiki/AC97 (
Fairly common..)
http://en.wikipedia.org/wiki/Intel_High ... tion_Audio (
Also widely implemented..)
Please try searching Google or the Wiki first.. in the future
EDIT: mystran got here first sadly, hopefully I was of some help anyway..
Posted: Tue Oct 23, 2007 2:13 pm
by Dex
AC97 are not as good as they seem, as you would need at less 5 differant drivers, to cover the common ones. also most cards are still SB-Pro compatable, but you need to turn it it on, as they default to SB-Pro compatable off.
Also the way they are switch on, is differant on each make of card.