3-way active crossover on MIMXRT685-AUD-EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

3-way active crossover on MIMXRT685-AUD-EVK

537 Views
M_Wisniewski
Contributor I

Hello,

I’m trying to implement a 3-way active crossover on the MIMXRT685-AUD-EVK board. My goal is to route an audio input signal through different frequency bands to three separate outputs (J4, J50, and J51). The end objective is to use three audio inputs: one for a microphone, one for a Bluetooth input, and one for a wired connection.

I’m currently working with the interrupt_record_playback example from the SDK, but I've encountered several issues. Despite trying to route signals via FLEXCOMM to each I2S port, even a simple reassignment of an audio output to a port other than J4 hasn’t worked. It seems that the input on J55 can’t be redirected to any output other than J4, or at least it isn’t behaving as expected.

Here’s a simple diagram to illustrate the intended setup:

[Microphone Input] ---->| [J55] --> ____  --> [J4]  |----> [Low frequencies] --> Amp
[Bluetooth Input] ------>| [J56] --> | DSP | --> [J50] |----> [Mid frequencies] --> Amp
[Wired Input] ---------->| [J57] --> ------  --> [J51]  |----> [High frequencies] --> Amp

Has anyone successfully implemented a similar setup on this board? Is it even possible to use this hardware to achieve a 3-way active crossover with outputs on different I2S ports? Any advice or guidance on the configurations or setup would be greatly appreciated!

Thank you in advance for your help.

 

#MIMXRT685 #NXP #3WayCrossover #AudioProcessing #I2S #FLEXCOMM #EmbeddedAudio #DSP #InterruptRecordPlayback

Labels (1)
0 Kudos
Reply
4 Replies

426 Views
M_Wisniewski
Contributor I

Hi, @Pablo_Ramos 

Thank you for your suggestion. I understand how the data is arranged in Time Division Multiplexing (TDM) based on the provided scheme. However, the changes I made to the code to adapt it to my requirements are not functioning as expected.

Currently, when I disable the secondary channels (SecondaryChannel 1-3) for the input ports, the single input (Line in J55) is successfully replicated across all outputs (J4, J50, J51). So, this part works as intended.

The issue is that the signal is heavily distorted because the samples from one input are being split across the four TDM slots. I couldn’t identify where in the code the TDM mechanism processes the samples. Ideally, I need to modify the implementation to duplicate the input signal samples across all TDM slots (i.e., copy the same samples four times for each frame).

From my understanding, the main loop in the code interacts with pointers to the DMA buffer where the samples are written, but I cannot locate the exact part of the code that handles TDM distribution. Could you help clarify where this logic resides and how I can adjust it to properly replicate the input signal across all outputs without distortion?

How TDM Buffer looks now (one cycle):
([L1D1][R1D1][L1D2][R1D2][L1D3][R1D3][L1D4][R1D4]) --(receive)--> Ch1:[L1D1][R1D1], Ch2:[L1D2][R1D2], Ch3:[L1D3][R1D3], Ch4:[L1D4][R1D4]

How TDM Buffer I think should looks (one cycle):
([L1D1][R1D1][L1D1][R1D1][L1D1][R1D1][L1D1][R1D1]) --(receive)--> Ch1:[L1D1][R1D1], Ch2:[L1D1][R1D1], Ch3:[L1D1][R1D1], Ch4:[L1D1][R1D1]

*Where L1 and R1 mean left channel (AIN1) and right channel (AIN2) of the input (J55) and Dx means the signal sample.

Please correct me if I described something incorrectly

Best regards

0 Kudos
Reply

466 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @M_Wisniewski,

I recommend you take a look to the mimxrt685audevk_i2s_dma_tdm_record_playback SDK example, that uses 3 input and 3 output.

In the example the inputs/ouputs are the following:

Line in J55 -> Line out J4
Line in J56 -> Line out J50
Line in J57 -> Line out J51

If you check the CODEC datasheet you will see that the Time Division Multiplexed (TDM) bus type, use the following format:

Pablo_Ramos_0-1731090295505.png

Knowing this you can select the input and the output by changing the position of the I2S

Let me know your results.

0 Kudos
Reply

369 Views
M_Wisniewski
Contributor I

Hi, @Pablo_Ramos 

Thank you for your suggestion. I understand how the data is arranged in Time Division Multiplexing (TDM) based on the provided scheme. However, the changes I made to the code to adapt it to my requirements are not functioning as expected.

Currently, when I disable the secondary channels (SecondaryChannel 1-3) for the input ports, the single input (Line in J55) is successfully replicated across all outputs (J4, J50, J51). So, this part works as intended.

The issue is that the signal is heavily distorted because the samples from one input are being split across the four TDM slots. I couldn’t identify where in the code the TDM mechanism processes the samples. Ideally, I need to modify the implementation to duplicate the input signal samples across all TDM slots (i.e., copy the same samples four times for each frame).

From my understanding, the main loop in the code interacts with pointers to the DMA buffer where the samples are written, but I cannot locate the exact part of the code that handles TDM distribution. Could you help clarify where this logic resides and how I can adjust it to properly replicate the input signal across all outputs without distortion?

How TDM Buffer looks now (one cycle):
([L1D1][R1D1][L1D2][R1D2][L1D3][R1D3][L1D4][R1D4])-(receive)->Ch1:[L1D1][R1D1], Ch2:[L1D2][R1D2], Ch3:[L1D3][R1D3], Ch4:[L1D4][R1D4]

How TDM Buffer I think should looks (one cycle):
([L1D1][R1D1][L1D1][R1D1][L1D1][R1D1][L1D1][R1D1])-(receive)->Ch1:[L1D1][R1D1], Ch2:[L1D1][R1D1], Ch3:[L1D1][R1D1], Ch4:[L1D1][R1D1]

*Where L1 and R1 mean left channel (AIN1) and right channel (AIN2) of the input (J55) and Dx means the signal sample.

Please correct me if I described something incorrectly.

Best regards

0 Kudos
Reply

238 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @M_Wisniewski,

Sorry for taking a while to get back to you.

I couldn't find a way for the codec to work as you expect, the TDM mode go through all the input/output in all cases.

Also, I don't have the required hardware in order to run some test, however, you could try the following.

When sending the data through the TX it uses an index that go through all the buffer, if what you are interest is only the first section of the buffer, which should be Input 1, you could modify the index in order to send the same data in each TX transmission.

0 Kudos
Reply