In the embedded hardware world, the term CODEC stands for COder/DECoder and is basically an analog-to-digital converter (ADC) and a digital-to-analog converter (DAC) in one package. A codec, whether hardware or emulated in software, converts analog audio signals into digital signals for transmission or encodes them for storage in a digital format. Later, the decoder side of a codec can be used to decompress and convert the digital data into an analog signal. An example of a device with a codec might be a recording/playback device. CODECs are responsible for changing the sound that a microphone picks up and converting it to a stream of 0s and 1s for transmission (analog-to-digital conversion), or in a more common vernacular, “data streaming“ if the digital signal is transmitted. codecs are also used for encoding, compressing, decoding, and decompressing video as well.
Digital data is not always compressed, as some file extensions have been associated with a much larger storage footprint. A song that is compressed might be have a .mp3 extension. Pulse-Code Modulation (PCM) is an uncompressed audio format that gets stored as raw digital data; it has only been encoded, not compressed. The .WAV extension is a Windows format that often is an uncompressed PCM file and a song saved as a .WAV file on a hard drive takes up much more room than the sale song saved as an MP3. It’s also easy to see why the term codec is also known as a Compression/Decompression device, a task which can be completely accomplished in software with a software codec. Hardware codecs are fast and high quality, dedicated codecs. Software codecs are flexible in that one can change conversion details and updates to the codec can be done over the internet. However, the software codec is dependent upon the processor that’s running the codec software. No software codec can capture an analog signal and covert it to digital format like a hardware ADC, since software-based emulation happens with a processor that can only work with digital signals. Real-world, incoming analog signals are best when filtered with analog filters prior to being converted to digital bits, after which they can be digitally filtered and processed.
One common application for CODECs is with Digital Signal Processors (DSPs) in audio electronics devices. CODECs convert sound (using the ADC) to digital signals for a processor to compress and store and for playback, the stored digital data is decompressed and converted to analog signals via the DAC. The analog signal reaches the human ear by converting the analog signal into a transmissible sound via a pulse width modulator and a speaker, for example.