PC speaker
Date invented | 1981 |
---|---|
Invented by | IBM |
Connects to | Motherboard |
Use | loudspeaker built into most IBM PC compatible computers |
Common manufacturers | several |
A PC speaker is a
Use cases
BIOS/UEFI error codes
The PC speaker is used during the
Software
Several programs, including music software, operating systems or games, could play pulse-code modulation (PCM) sound through the PC speaker using special Pulse-width Modulation techniques explained later in this article.
Games
The PC speaker was often used in very innovative ways to create the impression of
However, because the method used to reproduce PCM was very sensitive to timing issues, these effects either caused noticeable sluggishness on slower PCs or sometimes failed on faster PCs (that is, significantly faster than the program was originally developed for). Also, it was difficult for programs to do much else, even update the display, during the playing of such sounds. Thus, when sound cards (which can output complex sounds independent from the CPU once initiated) became mainstream in the PC market after 1990, they quickly replaced the PC speaker as the preferred output device for sound effects. Most newly-released PC games stopped supporting the speaker during the second half of the 1990s.
Other programs
Several programs, including MP (Module Player, 1989), Scream Tracker, Fast Tracker, Impulse Tracker, and even device drivers for Linux[4] and Microsoft Windows, could play PCM sound through the PC speaker.
Modern Microsoft Windows systems have PC speaker support as a separate device with special capabilities – that is, it cannot be configured as a normal audio output device. Some software uses this special sound channel to produce sounds. For example, Skype can use it as a reserve calling signal device for the case where the primary audio output device cannot be heard (for example because the volume is set to the minimum level, the amplifier is turned off or headphones are plugged in).
In the 1990s, a
Pinouts
In some applications, the PC speaker is affixed directly to the computer's motherboard; in others, including the first IBM Personal Computer, the speaker is attached by wire to a connector on the motherboard. Some PC cases come with a PC speaker preinstalled. A wired PC speaker connector may have a two-, three-, or four-pin configuration, and either two or three wires. The female connector of the speaker connects to pin headers on the motherboard, which are sometimes labeled SPEAKER or SPKR.
Pin Number | Pin Name | Pin Function |
---|---|---|
1 | -SP | Speaker negative |
2 | GND or KEY | Ground, or unwired key |
3 | GND | Ground |
4 | +SP5V | Speaker positive +5V DC |
Pulse-width modulation
The PC speaker is normally meant to reproduce a
With the PC speaker this method achieves limited quality playback, but a commercial solution named RealSound used it to provide improved sound on several games.
Obtaining a high fidelity sound output using this technique requires a switching frequency much higher than the audio frequencies meant to be reproduced (typically with a ratio of 10:1 or more), and the output voltage to be
The quality depends on a trade-off between the PWM
The audio fidelity of this technique is further decreased by the lack of a properly sized dynamic loudspeaker, specially in modern machines and particularly laptops that use a tiny
This use of the PC speaker for complex audio output became less common with the introduction of Sound Blaster and other sound cards.
See also
Notes
- ^ IBM 5150 Technical Reference (PDF). IBM. 1984. pp. 1–25.
- ISBN 978-0-9723801-7-1.
- ^ a b "Bran's Kernel Development Tutorial: The Programmable Interval Timer". www.osdever.net. Retrieved 23 January 2023.
- ^ Sergeev, Stas. "PC-Speaker PCM driver for Linux". Archived from the original on 26 October 2009. Retrieved 15 February 2009.
{{cite web}}
: CS1 maint: unfit URL (link) - ^ Nastasi, Alison (19 July 2014). "The World's Worst Computer Viruses Illustrated". Flavorwire. Retrieved 11 September 2021.
- ^ Ögren, Joakim (1997). The Hardware Book (PDF). p. 290.
- ^ ASUS P5KPL-AM SE Motherboard manual (PDF). ASUSTek Computer Inc. 2008. p. 1-13. Archived from the original (PDF) on 13 October 2017. Retrieved 27 February 2017.
- ^ Leonard, Jim (2022). "IBM PC Sound Ramblings - The Best Sound You've Never Heard". The Oldskool PC. Retrieved 31 August 2022.
- ^ Schlunder, Edward (18 November 2006). "Resistor/Pulse Width Modulation DAC". K9spud Microcontroller Electronics. Archived from the original on 17 March 2017.
External links
- Smacky Open-source C++ software for playing (monophonic) music on the PC speaker.
- Site for old PC without sound cards.
- Programming the PC Speaker, by Mark Feldman for PC-GPE.
- Programming the PC Speaker, by Phil Inch: part 1, part 2 (includes a very detailed explanation of how to play back PCM audio on the PC speaker, and why it works)
- Bleeper Music Maker A freeware to use the PC speaker to make music (superseded by BaWaMI)
- Beep for Linux and Windows, by Frank Buß. APIs for beeping.
- Commandline PC speaker program for LinuxFTP
- Practical article on implementing a Linux Kernel Driver
- Timing on the PC family under DOS (Sections 7.5, 7.29, 7.30, and 10.7 – 10.7.4 in particular)