This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

swapping left and right channel in a I2S audio stream

Other Parts Discussed in Thread: SRC4392, TAS3208

Hi,

I am looking for a way to swap the left and right channel data in an I2S audio stream.

Reason is that both my left and right channel active speakers use the left channel from the I2S stream for audio input so in order to get the right side speaker to

play the right channel audio I have to swap the right channel data into the left channel location.

One way is to use shiftregisters 2x32 bit for the left channel and one 32 bit for the right channel and switch between left and right outputs with the LRCLK.

This involves a lot of shift registers.

Another but rude method is to invert the LRCLK signal for the right speaker but then I introduce a delay between left and right channel equal to half the

sample period (10.4uS in my case -> 48KHz Fs).

I have no idea if that is noticable in the sound image between left and right channel.

Do you have any thoughts on that or do you know an easier way to swap left and right channel in the I2S stream keeping both synchronously converted?

  • Jan,

    This can be accomplished in most of our TAS amplifiers, and even in the PCM DAC's / ADC's.

    what does the rest of the signal chain look like?

  • Dafydd,

    The plan is to use a SRC4392 as SPDIF+ SRC input selector for digital audio sources and its two I2Sports with an ADC and analog preamp for aux and phono inputs (yes, vinyl is hot again!). The outputs will be both analog and SPDIF.

    The SRC4392 has also a volume control so I can do basically all I need for a "digital preamp".

    The SRC4392 also has two I2S outputs I can use for analog outputs (using DACs) in case I want to use the analog inputs of my speakers.

    A Micro like MSP430 will do the human interface and SRC4392 control.

    What I intend to do is to add SPDIF inputs on my speakers to avoid several AD/DA itterations from digital sources.

    This means my digital preamp also needs two SPDIF transmitters, one for the left and one for the right speaker.  

    The analog inputs on my speaker systems both (left and right channel) use the left input channel of a TAS3802 I2S, where I also intend to inject the SPDIF input into. My left rpeaker is therefore OK but the right speaker needs the data shifted into the left channel timeslot. 

    In retrospect I should have made this modification directly in the speaker system but this is now water under the bridge and at the time of the speaker build I didn't contemplate on a digital preamp.

    The TAS3208 in the speaker system does all of the cross-over filtering, frequency curve correction and volume control for low, mid and high speakers.

    The digital audio, low, mid and high from the TAS3208 is converted back to analog, since I am using traditional class AB amplifiers (sorry)

    I want to stay in the digital domain (I2S) in my digital preamp for the speaker SPDIFs so ADC or DACs with left-right swapping are no option.

    I want to swap the SRC4392 right I2S output channel into the left timeslot for the right speaker channel, hence my question if simply inverting the LRCLK before the I2S stream goes into the SPDIF transmitter will work or give strange phase effects on the audio.

    There will be a ~10uS time delay between left and right so I might be doing a lot of shifting and switching for no reason.

    Could you check with the other audio guys if this delay will have an audible effect.

    ps. I thought I gave you the link to my digital speaker project? (www.transientelectronics.nl -> DiCOSS)

    Jan