Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I2S and PCM format

Can someone explain what is the difference between I2S interface and PCM interface. Does I2S interface only supports i2s format audio data and not PCM format audio data ?

like image 518
DJNEXUS Avatar asked Sep 03 '15 05:09

DJNEXUS


1 Answers

PCM is a digital representation of an audio signal. It can be stored in memory or written on paper or whatever. An example of a 16-bit PCM audio sample might be something like 0x0152.

I2S is a electrical serial interface used to transmit PCM data from one device to another. The interface has a line used to delineate frames called the frame clock, a line for marking individual bits called the bit clock and 1 or more lines for the data. At the start of each frame clock a PCM sample is serialized bit by bit with a high voltage for a 1 and a zero voltage for a 0. The bit is held at that value for the entire duration of a bit clock and then it moves onto the next bit.

Here's some ascii art showing how an 8-bit sample 0x55 (01010101 binary), single channel might be transmitted. The frame clock runs at the sample rate, the bit clock at 8 times the sample rate and the data line contains the embedded data.

        _______________                 _
FCLK  _|               |_______________|
        _   _   _   _   _   _   _   _   _
BCLK  _| |_| |_| |_| |_| |_| |_| |_| |_|
            ___     ___     ___     ___
DATA  ___0_| 1 |_0_| 1 | 0 | 1 |_0_| 1 |_

The wikipedia articles do a pretty good job of explaining.

like image 184
jaket Avatar answered Sep 20 '22 12:09

jaket