In software, a multimedia codec is a type of file that is encoded in a specific format and that requires a specific interpretation to obtain the information stored inside. A hardware codec does precisely this task but in such a way that it is not necessary to use a CPU executing a program for it. Among these codecs are the audio codecs, hidden in a part of our PCs as another piece of hardware.
The evolution of hardware audio on PC
As with graphics hardware, the one dedicated to audio or sound has also evolved over time. The idea has always been to achieve the highest fidelity of sound on PC, but the initial hardware was limited by two aspects. On the one hand the computing power of the processors and on the other the precision of the data. Which is still the same as in the case of graphics hardware, but at a certain point in terms of audio there was a departure from traditional development.
As is well known, while GPUs have evolved into highly complex processors, audio has instead become more and more integrated, to the point where it has completely disappeared within other components. The motive behind it? It is simple to explain, while the graphics have a noticeable improvement even among the most advanced games. The audio on the other hand is good enough for the vast majority.
The reason why the audio has gotten good enough, even without having the evolution that the GPUs have undergone, is in the concept of mathematical approximation. An approximation is a representation that, although not exact, is considered useful due to its fidelity to the reality it represents. So, as soon as audio became a faithful approximation, the evolutionary step stopped being to achieve the highest possible fidelity.
The emergence of video and audio compression formats
The most famous audio format in history is MP3, an acronym derived from MPEG-1 Layer 3, which is the part of the audio of the video codec used for VideoCD, known as MPEG. Which was created with the aim of creating a format with which to transmit music through the telephone line, in an era in which the internet was a name that very few people knew, since we are talking about the early 90s.
In the end, MP3 was developed, an audio format that had a compression ratio 10 times higher than conventional audio CDs. Which means that ten times more audio could be stored. To compress the sound, the limitations of the human ear were used to achieve a format that was a faithful approximation, which required less data to function as a basis. But the other half of the equation was in decoding the format. Despite the fact that MP3 was from the early 90’s as a format, even a PC from the same era had problems reproducing the format, and it was necessary to create special chips with the ability to decode files in that format.
The need for hardware audio codecs
The MP3 format not only made portable music players appear where it was no longer necessary to carry the discs with us, it also allowed its distribution through the network and therefore the telephone line. But it also created a need in PC hardware, which was none other than incorporating encoding and decoding mechanisms for the different compression formats that were appearing on the commercial circuit.
The network of networks was filled with music files distributed in P2P networks that required to be encoded in this format, the CPUs of the time began to carry SIMD units inside that accelerated this type of task. But the appearance of DVD as a video and data format not only made it possible to watch movies on the PC, but audio and video codecs were implemented to decode them. A development and a need that brought with it the implementation of audio codecs to decode these files as quickly as possible.
What is an audio codec and how does it work?
Once the introduction is complete, we have to go to the heart of the matter, for this we have to understand that the word codec is a shortening of the term encoding-decoding. It is a processor that, from an input data stream, which is encoded, generates another from the execution of some rules that it follows to decode that data. Said rules can be written in the form of a program in an internal memory of the processor or be micro-wired. So the differences between an audio codec and a video codec outside the format they deal with are non-existent, after all, a data stream is nothing more than an accumulation of bits to be treated.
So what is the difference? Well, it is in the way in which that data becomes something tangible for the user. Video codecs are to be transmitted through a video signal and from there to a screen. On the other hand, in a video codec, the file that is generated will be transmitted to an audio output. Of course, there are GPUs that use their computing pipeline to decode and generate audio. Which they do thanks to the fact that the HDMI output carries both the audio and video signals.
Audio codecs were thought to save space in order to be able to transmit data on very slow communication interfaces, but once space and network speed were no longer a problem, their design moved in a different direction. The ability to encode audio systems in 3D or positional audio, to be able to use multi-speaker systems in multimedia content. Which would require a portion of CPU power to do so.
Where are hardware audio codecs found today?
It depends, you have to take into account that today the power of the CPUs is so great compared to how it was not long ago, that many functions that previously depended on dedicated hardware have returned to the CPU again. Precisely the audio codec is usually found on audio boards, being a small chip on the motherboard or inside some other component. But because it is a part that is no longer often looked at the inclusion of hardware audio codecs is found in high-end hardware.
It is possible that the CPU of your PC is managing the audio of your favorite game or series itself and you do not realize it. After all, only a portion of the power of a CPU is needed to do the job of decoding the audio. However, this does not mean that it does not affect the overall performance of the system. But given the tendency to save the audio codec on many PCs, most applications today tend to ignore them and are designed to be able to pull the user’s CPU exclusively.
Nowadays, hardware audio codecs are so integrated and miniaturized that we can find them in high-end speakers and headphones, performing positional audio interpretation functions in combination with motion sensors of the user or the speaker itself according to their orientation.