Audio Ports
Audio Ports
I've been able to make the pc speaker beep, but how do I output and get input to/from the Audio ports (the red, green [and in some cases blue] ports where you plug in the headphones, speakers, and micrphones)?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Audio Ports
Write a driver for your audio chipset.
Re: Audio Ports
are there any tutorials? How do you make a driver?
Re: Audio Ports
Hardly any. Don't always rely on tutorials, do some research. Not an offence, just a suggestion.abraker95 wrote:are there any tutorials?
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: Audio Ports
I already did, and I did try to go to devices in control panel to find hardware port access, but nothing
Re: Audio Ports
If its a PCI card, you would need to obtain its information from the PCI config space and a datasheet for the hardware device. If its onboard, its probably in the motherboard chipset specifications.
If you cannot find the datasheet you are looking for, post your audio card and [we] might be able to find it. Do attempt to search for it first however.
If you cannot find the datasheet you are looking for, post your audio card and [we] might be able to find it. Do attempt to search for it first however.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Audio Ports
Have you read Beginner Mistakes? You just made one.abraker95 wrote:Are there any tutorials?
Re: Audio Ports
Oh yea the motherboard config sheet... How did I miss that??? I'll check it out soon.
Re: Audio Ports
I found nothing, just a documentation on pins on the motherboard(with not port address)... How does the computer know that for example the pc speaker is port 0x61?
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: Audio Ports
For something as old as the PC speaker, it's practically standard. For newer cards, it's probably stored somewhere in memory or by the BIOS but you have to know where to look for that at. Also port 0x61 is the keyboard controller, although the PC speaker is controlled through it.
Re: Audio Ports
Hello,
What document are you looking in? Whats the make/model? (Asking because onboard audio is in my chipsets spec. Are you sure you are looking at the right document?)
What document are you looking in? Whats the make/model? (Asking because onboard audio is in my chipsets spec. Are you sure you are looking at the right document?)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Audio Ports
Sounds like abraker95 is looking at the motherboard manual, not the chipset datasheet/s.neon wrote:Hello,
What document are you looking in? Whats the make/model? (Asking because onboard audio is in my chipsets spec. Are you sure you are looking at the right document?)abraker95 wrote:I found nothing, just a documentation on pins on the motherboard(with not port address)... How does the computer know that for example the pc speaker is port 0x61?
To find the right chipset datasheet/s, sometimes you need to download a collection of them from Intel (e.g. all the "desktop" ones that suit a specific type of CPU) and use the "vendor ID" and "device ID" from both the PCI host controller and the PCI to LPC bridge to determine which datasheet/s are the right datasheets.
If the chipset isn't made by Intel, then you might be out of luck - for other chipset manufacturers (SiS, VIA, etc) it can be very hard to get any information at all.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Audio Ports
That's the only documentation I have, and the motherboard was made by a company called Gigabyte... So how does the computer know the port addresses when I look at them using device manager?
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Audio Ports
And what colour is your computer case? that's important information.abraker95 wrote:That's the only documentation I have, and the motherboard was made by a company called Gigabyte... So how does the computer know the port addresses when I look at them using device manager?
Re: Audio Ports
Hello,
As a developer, you should know that the computer doesnt know anything.
You arent looking at the right spec - search Google for your chipsets datasheets. Do keep in mind that, as posted above, many manufacturers dont release these datasheets. If you cant find the spec, either post your chipset type here or dont worry about onboard audio support as there isnt any other way.
The OS "knows" how to communicate with the device because of the device driver thats installed-isnt anything special to it.
As a developer, you should know that the computer doesnt know anything.
You arent looking at the right spec - search Google for your chipsets datasheets. Do keep in mind that, as posted above, many manufacturers dont release these datasheets. If you cant find the spec, either post your chipset type here or dont worry about onboard audio support as there isnt any other way.
The OS "knows" how to communicate with the device because of the device driver thats installed-isnt anything special to it.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}