I am trying to understand why we use I2S is better for transferring audio than SPI as I2S has less bandwidth compare to SPI.
Electronic – Why I2S is better for transmitting audio compare to SPI
audioi2sspi
Related Topic
- Electronic – MCLK in I2S audio protocol
- Choosing an Audio D/A converter for I2S digital audio based on 32fs
- I2S interface using LPC2138
- Electronic – Audio Grade Capacitors – Marketing Hype or Better Technology
- Electrical – How to transfer data from/to the I2S controller through AXI DMA
- Electronic – Why does I2S have extra clock cycle in SCLK that is wasted i.e no data transferred
Best Answer
There is a lot more to audio than bandwidth. The way I2S works, the data are provided just in time to be converted to analog. So the I2S DAC or codec doesn't need to buffer data or maintain any type of complex synchronization. It relies on the incoming clock to determine the sample rate. This also means that the data must be sent continuously, meaning that the I2S bus will be completely utilized at all times while audio is playing.
If you wanted to use SPI the same way, you would have to run it at exactly the right rate, always delivering data just in time to be converted to analog. This means that the bus would be 100% occupied during audio playback and unavailable for anything else. Otherwise you would need to work out a complex buffering scheme and hardware flow control to tell the host when to send more data, etc.
I guess a simple way of answering the question is that I2S is specifically deisgned to send audio to a DAC. SPI is more general purpose. Most SPI implementations do not support the type of fine-grained clock speed control that would be needed to interface directly to a DAC the way I2S does.