Continuous noise issue during VOIP call

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

Continuous noise issue during VOIP call

Jump to solution
6,792 Views
namanthaker
Contributor IV

Hello,

I'm working on IMX8M Mini EVK with Android Pie (p9.0.0_2.3.0) OS.


I have integrated CX9000 synaptics audio amplifier and CX20921 Dual MIC voice processor to the EVK.

There are two DMICs connected on the CX20921, one for capturing left channel data and other for capturing the right channel data. A 10W speaker is connected on the CX9000 speaker amplifier.

The connection between NXP processor, CX9000 and CX20921 are as shown in below diagram.
nxp_synatics_connection.png

The CX9000 and CX20291 are detected successfully on the EVK. I am also able to play and record audio on the device using tinycap and tinyplay commands.

Then I created a custom WebRTC based Android application to implement VoIP functionality. Using this app I can connect to other Android based device running the same application. When I tested the VoIP functionality, I hear a repetitive noise on the other end i.e. the other Android device.

I have tested the application with several Android devices like Samsung tablets, Google tablets, mobile phones, etc and the same issue is observed.

When I use the application between two mobile devices or tablets or a combination of those, the noise is not produced. Only when IMX8 EVK is connected to other Android device, the noise is produced.

I also tried using other applications from PlayStore like Linphone and Jitsi-Meet to test VoIP functionality, but the same noise is heard on them too.

For reference I have attached a recording file containing the noise that is heard on the other end.

Audio capture and playback using the default recorder and music applications in Android works fine. No noise is observed while using them. Similarly, no noise is observed during playback/capture through tinycap and tinyplay.

I tested the same use-case on a Qualcomm EVM with Snapdragon 625 processor, but in that device the noise is not observed during VoIP. In this case, the HW connections, Codec drivers and the Android applications used were same as that were used in IMX8MM.

From the above observations, it seems the issue is introduced in the Android framework.

How can I go about to remove the noise during VoIP call ?

0 Kudos
Reply
1 Solution
6,245 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker,

From the table#3, the playback clock is provided by Host, the capture clock is provided by CX20921.

From the below image, the playback clock is provided by CX9000, the capture clock is hard to say provided by whom.

I don't know which one is the correct one.

 

From my experience, to make AEC work, capture and playback clocks need to be synced. But in either case, it can not be ensured that the clocks are synced. The best way to be sure is to measure the clock signal while running VoIP...

pastedImage_1.png

Best Regards,

Suresh

View solution in original post

0 Kudos
Reply
14 Replies
6,245 Views
jimmychan
NXP TechSupport
NXP TechSupport

If local audio playback and record has no issue, then low level driver should be OK. For VOIP use case, I think you should check the echo cancellation solution.

Another thing should be checked is the playback + record working at the same time. You can measure the bit clock and frame clock to check are they correct at that time.

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello,

Thanks for your inputs !

In our system the AEC is controlled by CX20921. We in contact with Synaptics for disabling the AEC and checking the use-case to see the impact it has and see if tuning can be performed on it.

 

1.       NXP Host side issue probability reason :  

Host Processor

Audio Play Mechanism

Audio Record Mechanism

Test Case: Both Audio Out (play) & In (Record) use case

NXP i.MX8M Mini EVM

Synaptic CX9000

Synaptic CX20921

Periodic Noise Issue is present

NXP i.MX8M Mini EVM

Synaptic CX9000

NXP PDM Direct Input

Periodic Noise Issue is NOT present

NXP i.MX8M Mini EVM

NXP Default Headphone WM5424

NXP PDM Direct Input

Periodic Noise Issue is NOT present

NXP i.MX8M Mini EVM

Bluetooth Speaker

Synaptic CX20921

Periodic Noise Issue is NOT present

QCOM 620 EVM

Synaptic CX9000

Synaptic CX20921

Noise is not present

            Table #1

 

2.       Tinycap is working, Where-as VoIP has issue ruled out :
[Test recording is attached here]

Test setup : NXP i.MX8M Mini EVM + Synaptic CX9000 (Speaker) + Synaptic CX20921(Mic)

Test timeline

Actions other than tinycap recording

Add on action

Test Results

00-05 Seconds

No tinyplay

Quiet environment

Periodic noise not observed

06-10 Seconds

tinyplay for 5 sec

Speak 1, 2, 3 (for initial 3 seconds), last 2 secs quite

Periodic noise observed

11-15 Seconds

No tinyplay

Speak 1, 2, 3 (for initial 3 seconds), last 2 secs quite

Periodic noise not observed

16-20 Seconds

tinyplay for 5 sec

Speak 1, 2, 3 (for initial 3 seconds), last 2 secs quite

Periodic noise observed

            Table #2

 

3.       B CLK & WS_CLK summary for setup:

Codec

Use-Case

Signal

PAD

Qualcomm Setup

NXP Setup

Clock Source

CX9000

Playback

BCLK

I2S_RX_CLK

3.075 MHz

3.075 MHz

Host

WS_CLK

I2S_RX_LRCK

48 KHz

48 KHz

Host

VoIP

BCLK

I2S_RX_CLK

3.075 MHz

3.075 MHz

Host

WS_CLK

I2S_RX_LRCK

48 KHz

48 KHz

Host

CX20921

Recording

BCLK

I2S_TX_CLK

3.075 MHz

3.075 MHz

Self

WS_CLK

I2S_TX_LRCK

48 KHz

48 KHz

Self

VoIP

BCLK

I2S_TX_CLK

3.075 MHz

3.075 MHz

Self

WS_CLK

I2S_TX_LRCK

48 KHz

48 KHz

Self

Table#3

 

Summary :

1.     As per above Table#1, ROW #1, 2, 3, 4   && Tabel#2, Row#1, 2, 3, 4
It has been evident that noise is present when Synaptic chip AEC feature has been used
.

2.    However when we compare Tabel#1: ROW#1 & 5, NXP host side issue probability is evident
Please note that Qualcomm based board setup and NXP host based setup has used same Synaptic unit (HW, Firmware and all setting including test environment used, refer below Table#3 for details)
Infect recording using tinycap as well as VoIP call has very good Quality with long range.

3.     Due to lockdown we can’t check these clock, whether they are very perfect with more calibrated CROs without going to office labs
To confirm whether the QCOM Vs NXP host provided clocks are perfectly same (i.e. glitches or noise free or not).
Hence does your team can share experience, whether NXP i.MX8M Mini chipset checked/ used with any other ODM with any external Audio CODEC based on I2S data and I2C programming Like Synaptic is being used in our case (Connection being show below, where Voice processor is CX20921).
pastedImage_1.png

Indeed, Once we hear inputs from Synaptic, we will let you know the result with AEC disabled.

Meantime can you please check above points.
Regards,
Naman
0 Kudos
Reply
6,246 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker,

From the table#3, the playback clock is provided by Host, the capture clock is provided by CX20921.

From the below image, the playback clock is provided by CX9000, the capture clock is hard to say provided by whom.

I don't know which one is the correct one.

 

From my experience, to make AEC work, capture and playback clocks need to be synced. But in either case, it can not be ensured that the clocks are synced. The best way to be sure is to measure the clock signal while running VoIP...

pastedImage_1.png

Best Regards,

Suresh

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello Suresh,

Thank you for the continued support!

We successfully managed to remove the continuous noise in the VoIP call. As per your suggestion regarding clock synchronisation, we made changes in the kernel, to use i.MX8MM as master and configured CX20921 in slave mode.

Previous Configurations:
IMX8 as Master and CX9000 as Slave
IMX8 as Slave and CX20291 as Master

New Configurations:

IMX8 as Master and CX9000 as Slave
IMX8 as Master and CX20291 as Slave

We have below queries based on the issue:
Q1. What could be the reason for the noise to be absent when IMX8MM is made master and CX20921 is used in slave mode ? Because, such issue is not observed when in Qualcomm EVM which has the same configurations as our previous configurations i.e. CX20921 as master.

Q2. In our system, we are using 2 individual I2S master for CX20921 and CX9000 respectively. But we plan to connect a single I2S from i.MX8 to both CX20921 and CX9000 with i.MX8 as master. Do you see any issues/ problems or challenges that may arise while using the same I2S ? Are there any restrictions in using the same I2S on IMX8MM?


Regards,
Naman

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello sureshrao,

Any update on the above queries?

Regards,

Naman

0 Kudos
Reply
6,245 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker‌,

For Q1, the reason is also unclear to me.

For Q2, There are no restrictions in using the same I2S. One need to ensure I2S modes and parameters set in CPU side should align to CX20921 firmware.

Best Regards,

Suresh

0 Kudos
Reply
6,245 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker‌,

Since no noise is observed during the playback/capture with tinyplay/tinycap, I would also suspect issue with mixer settings.  Maybe you can check the logcat, it can provide some hints, also dumping the CXxxx registers may help.

Best Regards,

Suresh

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello Suresh,

Any updated on the this ?

Can you please confirm that you have noticed the noise in the shared audio file "VoIP_noise.m4a" ?

Regards,

Naman

0 Kudos
Reply
6,245 Views
sureshrao
NXP Employee
NXP Employee

Hi namanthaker‌,

Can you dump the codec configurations for both VoIP, tinyplay?

Best Regards,

Suresh

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV
Hi Suresh,
Please find attached 'tinyplay_registers.txt' and 'VoIP_registers.txt' files for register dump of CX9000 during tinyplay and VoIP call respectively.
For reference, please refer attached screenshot of I2S registers set from datasheet.
Regards,
Naman
0 Kudos
Reply
6,245 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker‌,

Can you try with the default micfil in i.MX8MM?

Best Regards,

Suresh

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello Suresh,

We tried to connect a DMIC directly to the micfil lines on IMX8MM EVK, but the audio captured does not contain any sound. Please refer attached wav file for the captured audio data.
We connected DMIC clk line on J1003.40 pin and DMIC data line on J1003.35 on the IMX8MM EVK for data capture. We also tried to capture audio after connecting DMIC data line on pin 36, 37 and 38 of J1003 at a time, but none of them worked.

The command used to capture audio:

tinycap file.wav -D 2 -d 0 -b 16 -r 48000 -c 1

We have flashed the default android Pie image 'android_p9.0.0_2.3.0_image_8mmevk' supplied by NXP for this testing.
Please let me know what can be done to capture audio directly using micfil.

Regards,
Naman

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello Suresh,

I looked through the logcat but did not find any useful hint.
The logs are attached, can you please give it a once-over and see that I have not missed anything ?

Is the VoIP use-case using MIC, tested with IMX8MM design ? If yes, please provide information about the how the test was performed, what setup was used, commands/application used etc.

Regards,

Naman

0 Kudos
Reply
6,245 Views
namanthaker
Contributor IV

Hello Suresh,

Thank you for your answer.
I will check the logcat and dump the registers to see if it helps.

Regards,
Naman

0 Kudos
Reply