I am trying to design an audio amplifier based on a digital input chip (TAS6424-Q1 for example) with two, stereo, I2S enabled sources for the input (for example the BM83 Bluetooth module and the Si4688-A10 radio receiver). An MCU would be connected via I2C for control of these devices.

Does the I2S standard allow both these devices to share the same I2S bus connection? If so, how would I select which device is enabled as the input?


Does the I2S standard allow both these devices to share the same I2S bus connection?

No, if you even look only briefly into what I2S is, then you'll notice that it's a unidirectional point-to-point link (not really a bus) with no means to distinguish multiple sources.

how would I select which device is enabled as the input?

Use a switch for the total of two or three lines that constitute the signal.

That works as long as both use the same type of signalling, and the receiving end is able to recover from the loss of synchronicity, and you can tolerate the noise that switchover will cause.

If there's different types of I2S configuration, or you can't work with the transient that the switchover produces, then your only solution is to actually pipe your I2S through digital logic (a microcontroller might be able to produce and consume I2S, and then you can have that finish the last sample of a frame from one source cleanly, reconfigure everything, and then start the transmission from the other source; alternatively, you'll need a small FPGA or a CPLD. At which point, really, maybe look into an I2S device with multiple inputs).

  • \$\begingroup\$ While likely correct for the asker's situation, it's not entirely true that I2S streams cannot be contributed to by multiple sources. The most common situation where they would be is when monophonic sources like digital-output MEMS microphones are combined into a stereo stream where each outputs into the left or right channel period as configured by the select input many have. \$\endgroup\$ – Chris Stratton Sep 17 '20 at 15:54
  • \$\begingroup\$ In this case the sources are not only presumably stereo, but probably both asynchronously clock masters (rather than the receiver of the I2S stream clocking the source), so indeed, it will be necessary to switch all the lines, and not just the data one. Likely the system should go into mute; make the switch; then unmute. \$\endgroup\$ – Chris Stratton Sep 17 '20 at 16:00
  • \$\begingroup\$ I think I'll just switch analog audio lines in this particular project in order to keep things simple. If I2S would allow me to transfer high quality audio signals and simplify multiplexing multiple sources then I would pursue using it but it seems likely to make things more complicated. \$\endgroup\$ – Joe Mann Sep 17 '20 at 17:22
  • \$\begingroup\$ @JoeMann I'd not be that negative, because "mute, switch, unmute" isn't that hard with a microcontroller that you need either way. \$\endgroup\$ – Marcus Müller Sep 17 '20 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.