Scratching noise during audio playback

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

Scratching noise during audio playback

Jump to solution
2,994 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. The speaker amplifier supports two word size, 16-bit and 32-bit.

I am observing a kind of scratching noise either continuously or only at beginning of the playback on the speaker in various use-cases as mentioned below.

Use-case16 Bit Setting32 Bit Setting
DMICBeginningBeginning
Text-to-speech (TTS)ContinuousBeginning

For DMIC use-case, the audio is captured from the 2 DMICs on the system (refer dmic_noise.mp3 for the noise at beginning right before 'hello' is said). For TTS use-case, an online generated text to speech audio file is played on the speaker. During a VoIP call on the system, the noise is heard same as during TTS use-case (refer voip_noise.mp3 for the continuous noise).

Several points of observations:

  1. The noise is present while playing through Tinyplay and in other Android music app in GUI also.
  2. Noise is present for .wav and .mp3 also.
  3. When a longer message is played of 1 min 30 sec length, then also noise is heard only in starting.
  4. The noise is not present when playing a song/music file.
  5. The noise is not present when the same audio file is played on PC on VLC or other music player applications.
  6. The noise is not present when the TTS converted audio or recorded audio file is played on Bluetooth speaker or headphones connected to NXP.

Please help to debug the issue.

0 Kudos
Reply
1 Solution
2,777 Views
namanthaker
Contributor IV

Hello,

The problem was with the wiring connection between IMX8MM and CX9000 module. In the newly fabricated boards this issue is not observed.

Regards,

Naman

View solution in original post

0 Kudos
Reply
6 Replies
2,778 Views
namanthaker
Contributor IV

Hello,

The problem was with the wiring connection between IMX8MM and CX9000 module. In the newly fabricated boards this issue is not observed.

Regards,

Naman

0 Kudos
Reply
2,790 Views
namanthaker
Contributor IV

Hello,

Some further observations made during debugging:

8. We tested using CX9000 with Qualcomm based chip-set, but in that case noise is not produced.

9. We tested with a song which had no noise earlier and trimmed the beginning portion to start position with sound. In this case, noise is observed.
See "song.mp3" in which noise is not observed and "trimmed_song.wav" in which noise is observed, in the attached test_9.7z.

The trimming of back portion of the song is done to reduce the size of the audio file.

10. Test while speaker is kept on lower volume / Mute while playing song.
       16-bit: Continuous noise is observed at lower volume in which continuous noise was previously not observed at higher volume. Mute to un-mute has no impact on noise i.e. no noise is observed.
       32-bit: No noise at low volume. Mute to un-mute has no impact on noise i.e. no noise is observed.

11. Playing a TTS message with 1 second silence in beginning has noise. This 1 second silence is auto-generated by the online TTS message generator.
When a 160 ms silence is added to this TTS message using audacity, then noise is not observed.  Adding silence less than 160ms produces noise.
See "1s_tts_msg.wav" and "1s_tts_msg_160ms_silence_added.wav" in test_11.7z for the audio files used to test.

12. When we save a song with audacity without editing the file (i.e without trimming or adding anything) in which noise is not observed previously and playing it on speaker, noise is observed.
This song file is the same one used in observation point 9 which itself has a 600 ms silence in the beginning.
Now when a 160 ms silence is added to this file using audacity, noise is not observed.  Adding silence less than 160ms produces noise.
See "song.mp3" in test_9.zip, "song_saved.wav" and "song_saved_160ms_silence_added.wav" in test_12.7z.

Based on point 11 and 12, we can conclude that when a silence of 160ms is added at the beginning of audio files, then noise is not observed.

Summary of observations in point 11 and 12:

Detail of audio file playedAudio fileNoise StatusZip name
TTS with 1s silence by default1s_tts_msg.wavNoisetest_11.7z
Adding 160ms silence in beginning with audacity to "TTS with 1s silence"1s_tts_msg_160ms_silence_added.wavNo Noisetest_11.7z
Songsong.mp3No Noisetest_9.7z
Just saving the song.mp3 using audacitysong_saved.wavNoisetest_12.7z
Adding 160ms silence to saved song.mp3song_saved_160ms_silence_added.wavNo noisetest_12.7z

Regards,

Naman

0 Kudos
Reply
2,790 Views
sureshrao
NXP Employee
NXP Employee

Hello namanthaker‌,

Below point 2 & 3 are relevant to earlier statements.

> 2. Noise is present for .wav and .mp3 also.

These .wav or .mp3 files are of TTS messages converted audio data.

> 4. The noise is not present when playing a song/music file.

Here we have checked few format (.wav or MP3) files.

 

From the mentioned, since playback is no problem, whether the noise (bad data) is produced by the convert tool? 

Best Regards,

Suresh

0 Kudos
Reply
2,790 Views
namanthaker
Contributor IV

Hello sureshrao‌,

Regarding point 2:
We are refering to TTS messages. We have not observed noise in songs as mentioned in point 4. The TTS message format can be MP3 or WAV and in both cases noise is observed.
For MP3 TTS message we are using online tool at https://ttsmp3.com/ for generating the TTS message audio file.
For WAV format TTS message we are using http://open-jtalk.sp.nitech.ac.jp/ to generate TTS message audio file.
These files are not converted in any way. They are simply downloaded from the above mentioned sites. Moreover, playing these files on PC or Same Synaptics setup with QCOM as host machine (with same Android 9 OS), does not produce noise.

Regarding point 4:
The noise is not present when playing a song. But when the song file is saved using Audacity tool, the noise is present.
But when we add 160ms delay in the song using the same Audacity tool, the noise is gone. Which suggests that the noise is not due to the tool or else the noise should have been present in the file with the added delay.

Another thing, as mentioned in main query, when we capture the audio from DMIC connected on i.MX8MM using tinycap and play that audio on the speaker using tinyplay, the noise is observed in the beginning. In this case, the tool is completely out of the picture.
Playing the same DMIC captured file, on PC does not produce noise.

Based on this observations we do not feel that the noise is not produced/introduced by the conversion tool.

Regards,

Naman

0 Kudos
Reply
2,790 Views
namanthaker
Contributor IV

Hello,

One more observations made during debugging:
7. Playing a silent file does not produce the noise. If a 5 second silence is added in the TTS message audio file, noise is not observed.

The Synaptics team supporting us tested the same audio file on their setup with Synaptics SOC + CX9000 and they did not observe any such noise. Based on the observations, they suspect that the issue lies in IMX8MM.

Regards,

Naman

0 Kudos
Reply
2,790 Views
namanthaker
Contributor IV

Hello,

Attaching the logs that are captured during playback of TTS audio file (also attached) for reference, which might help with debugging.

1. voice_audio.wav: The audio file containing TTS message played on speaker while capturing the logs.

2. dmesg_with_tinyplay.txt : Kernel Dmesg logs captured when the audio file is played using tinyplay utility.

3. dmesg_with_GUI_playback.txt : Kernel Dmesg logs captured when the audio file is played from GUI.

4. logcat_with_GUI_playback.txt : Logcat logs captured when the audio file is played from GUI.

Regards,
Naman

0 Kudos
Reply