0

There are tons of electrical descriptions of I2S; however, I cannot find information about how the data is formatted/structured. What I mean by format is, what does a value on the serial data line mean? Do these values have information on volume, pitch, or something else?

As an application example, I have a .wav audio file. I unpacked the file and obtained a stream of data samples. How should this sample data be transmitted on I2S so that a receiver can play the audio? 0x 0011 2233 4455 6677 8899 AABB CCDD EEFF 0011 2233 4455 ... and so on. Should these values be formatted in some way that is meaningful to the receiver? Maybe something like 0x0011____, 0x2233____, where blank means other miscellaneous information?

Let's assume for the case of I2S Standard, 24 bits per sample. Any information would be helpful. Thanks.

Megool
  • 963
  • 2
  • 8
  • 29
  • Which resources did you find already? A simple Wikipedia look up revealed Philips' specification as a start. It might be that the data structure is defined by the participating devices. – the busybee Jun 04 '20 at 06:09
  • I have read Philip's specification, Sparknotes, and others but I could not find what I am looking for. – Megool Jun 04 '20 at 06:36
  • I am specifically looking for how a 16, 24, or 32 bit value of data is structured... Does it just mean the amplitude of sampled audio? – Megool Jun 04 '20 at 06:42
  • Same question in SE/EE: (https://electronics.stackexchange.com/questions/503590/i2s-data-structure-inter-ic-sound) – the busybee Jun 04 '20 at 13:48

1 Answers1

0

Wikipedia I²S say you'll have 3 lines, one for the clock (sample rate * bits per channel * number of channel), one for the channel selection (0 left, 1 write) and one for the data, msb first. There also some diagram. What do you need more ?

The data structure you may use in your software can be whatever you want since you correctly program the I²S IP and send the relevant data to it. You may use some array to store left channel and right channel, correctly typed regarding bits/sample.

The value of a sample is indeed the amplitude of the sampled/generated signal.

Welgriv
  • 714
  • 9
  • 24