VIP Central

 

MIPI Soundwire: Pulse Code Modulation (PCM)

In MIPI Soundwire: Digital Audio Simplified, we mentioned that digital audio formats including Pulse Code Modulation (PCM) and Pulse Density Modulation (PDM) are target applications for MIPI Soundwire.

For more information on MIPI Soundwire, you can download our whitepaper.

In this blog post, we will discuss PCM.

PULSE CODE MODULATION

Most current digital audio systems (computers, compact discs, digital telephony etc.) use multi-bit Pulse Code Modulation (PCM) to represent the sound signal. PCM has the advantage of being easy to manipulate. This allows signal-processing operations to be performed on the audio stream, such as mixing, filtering, and equalization. As shown in Figure 1, Analog to PCM conversion consists of three steps:  Sampling, Quantizing and Encoding.

PCM

Figure 1. Pulse Code Modulation 

Sampling: As shown in Figure 2, Sampling is reduction of a continuous signal to a discrete signal. It is also called digitization of time. It results in a sample, which is discrete (digital) in time but continuous (analog) in amplitude. Sampling rate, i.e. samples taken per second, is an important factor while doing sampling and it is necessary to capture audio covering human hearing range. Human beings can hear frequencies in the range of 20Hz to 20KHz. Nyquist theorem says that sampling rate should be double the frequency of highest frequency signal.  So, in order to preserve the quality of sound sensed by the human ear, roughly 40Khz sampling rate is required. That is why 44.1Khz (CD) and 48Khz (DVD, DV) are the most common sampling rates for digital audio.

PCM-Sampling

Figure 2. Sampling

Quantization: It is the process of mapping a large set of input values to a (countable) smaller set such as rounding values to some unit of precision. After this step, the sample is discrete in time and amplitude as well, as illustrated in Figure 3. A device or algorithmic function that performs quantization is called a Quantizer. The round-off error introduced by quantization is referred to as quantization error. The number of available discrete levels of amplitude determines quantization error, and it depends on the number of bits per sample. If we use more bits to quantize a signal, its quality will be better. For instance, an 8-bit sample will have 28 = 256 discrete levels. In terms of Singal-to-Noise Ratio (SNR), each additional bit increases the SNR by 6dB (improve signal quality). It is represented by following formula:

PCM-formula

Common PCM samples are of 8, 16, 20 and 24 bits wide.

PCM-Quantization

Figure 3. Quantization

Based on this information, one can decide what kind of sampling rate and sample bits are appropriate for a specific target application. Let us consider the case of the human voice signal in a telephone system: Frequency range 80 ~ 3.4 KHz], Human ear can tolerate SNR of 40 [dB].

To transmit human voice in digitized form based on Nyquist theorem, we need a sampling rate = 2*3.4 [kHz] = 6800 [samples/sec]. Based on SNR formula: 40 [dB] = 6*m + 1.76 ⇒ Number of bits per sample = 7.

Encoding: It is simply converting sample data into digital traffic, which includes interface dependent framing data as well.

For more information on MIPI Soundwire, you can download our whitepaper.