Page 1 of 2

Audio Ports

Posted: Mon Feb 14, 2011 7:46 am
by abraker95
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)?

Re: Audio Ports

Posted: Mon Feb 14, 2011 8:00 am
by Combuster
Write a driver for your audio chipset.

Re: Audio Ports

Posted: Mon Feb 14, 2011 9:08 am
by abraker95
are there any tutorials? How do you make a driver?

Re: Audio Ports

Posted: Mon Feb 14, 2011 10:12 am
by Chandra
abraker95 wrote:are there any tutorials?
Hardly any. Don't always rely on tutorials, do some research. Not an offence, just a suggestion.

Re: Audio Ports

Posted: Mon Feb 14, 2011 1:02 pm
by abraker95
I already did, and I did try to go to devices in control panel to find hardware port access, but nothing :cry:

Re: Audio Ports

Posted: Mon Feb 14, 2011 1:42 pm
by neon
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.

Re: Audio Ports

Posted: Tue Feb 15, 2011 5:39 am
by Combuster
abraker95 wrote:Are there any tutorials?
Have you read Beginner Mistakes? You just made one.

Re: Audio Ports

Posted: Tue Feb 15, 2011 7:12 am
by abraker95
Oh yea the motherboard config sheet... How did I miss that??? I'll check it out soon. :lol:

Re: Audio Ports

Posted: Wed Feb 16, 2011 7:05 pm
by abraker95
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?

Re: Audio Ports

Posted: Wed Feb 16, 2011 7:10 pm
by Tosi
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

Posted: Wed Feb 16, 2011 9:13 pm
by neon
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?)

Re: Audio Ports

Posted: Thu Feb 17, 2011 1:55 pm
by Brendan
neon wrote:Hello,
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?
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?)
Sounds like abraker95 is looking at the motherboard manual, not the chipset datasheet/s.

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

Re: Audio Ports

Posted: Thu Feb 17, 2011 9:10 pm
by abraker95
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

Posted: Thu Feb 17, 2011 9:26 pm
by Brynet-Inc
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?
And what colour is your computer case? that's important information.
Image

Re: Audio Ports

Posted: Thu Feb 17, 2011 9:34 pm
by neon
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.