SGTL5000: speaker noise

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SGTL5000: speaker noise

2,895 次查看
aut
Contributor I

Hello.

I'm having an issue with a SGTL5000 connected to a stm32mp157 MPU by means I2C and SAI interfaces.

The system is managed by an embedded openstlinux OS.

In the boot phase I hear some crackling from the speaker. When the system is completely started, the speaker emits a continuous noise (maybe it's a pink noise?) and does not allow to reproduce any other sound. Initially I used the internal LDO regulator to power the VDDD pin (pin 20). Then I read the SGTL5000 datasheet which indicated that the VDDD pin must be powered with an external voltage. Now I power the VDDD pin with an external 1.5V voltage regulator but the problem remains. The issue is not continuous. Sometimes, turning the power off and on again, the problem does not occur. Below the SGTL5000 connections

SGTL5000_connection.png

 

 

What can it be? Device tree configuration errors? Bad signal connections? 

Many thanks.
Regards

0 项奖励
16 回复数

2,770 次查看
aut
Contributor I

Hello David.

Thank you for your kind availability.

I followed your indication to ground the LINEIN_L, LINEIN_R and MIC inputs but never changed, the issue is still present.

Regard to inizialization and programming, this process is automatically done by the linux driver during boot phase, how can I intervene to modify it?

 

Attached you can find a document that shows the oscilloscope measures on the speaker pin when the problem occurs. The ALSA mixer settings I used are the following

·        'Capture' volume = 0%

·        'PCM' volume' = 100%

·        'Master' volume = 100%

·        'Headphone' volume = 70%

The global speaker signal measured shows a 72 kHz carrier waveform (looks like sine wave) modulated by an other (strange) 5kHz (more of less) signal.

I would like to highlight the fact that sometimes the problem doesn't occur

Any other useful indication would be greatly appreciated

 

Many thanks

0 项奖励

2,749 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut,

Once again, thank you for using the community. 

Did you measure LINE_OUT from SGTL5000? Whether it have same noise as HP_L which you measured? 

I think this should be caused by noise from the board. You need to check power supply or other noise source and how they couple to speaker. 

Regards,

David 

0 项奖励

2,705 次查看
aut
Contributor I

Hello David.

I made the measurements you asked me, you can find them in the attachment.

As you can see from the pictures, the LINEOUT_R, LINEOUT_L and HP_R signals do not change, whether noise is present or not.

The signal on the HP_L output in the presence of noise is now different from what I showed you in the previously post. It is now a triangular signal with a frequency of about 20kHz.

While I was doing the tests, turning the power off and on again, the noise disappeared. 

The noise doesn't disappear or comes while the card is powered on but only during startup and once the noise is present it doesn't go away. Do you think it's an initial configuration problem? Attached you can find the linux driver I'm using (SGTL5000.c and SGTL5000.h). Do you think they are fine or need to be modified with some patch?

Many thanks

Regards

 

0 项奖励

2,687 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut

Could you please confirm the noise is coupled from SGTL5000 HP_L output, but not from speaker side? You could remove the capacitor to measure each side on speaker and SGTL5000. This noise should not cause by SGTL5000 software initialization since HP_R is fine. 

Regards,

David

0 项奖励

2,647 次查看
aut
Contributor I

Hello David,

When the noise occurs, it exists both on the HP_L output (upstream of the capacitor) and on the speaker (downstream of the capacitor). The only difference is that on the HP_L output the signal has an average value of +1.65V (it is shifted by +1.65V with respect to 0V) while on the speaker output the signal has an average value of 0V.

The picture below shows the connections I'm using  

SGTL5000_speaker_connection.png

Many thanks

Regards

0 项奖励

2,594 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut, 

Please review the response from one of our specialist below:

When customer measure the waveform on HP_L and speaker, did they remove C31 or C32?
It is better to remove C32 or C32 then measure HP_L and speaker again to confirm where the noise is coupled. May be it is from speaker side.

Regards,

David 

0 项奖励

2,563 次查看
aut
Contributor I

Hello David.

Thank you for your availability

I removed C32 capacitor then I measured the signal on HP_L pin and on the speaker pin. In this condition the noise is present only on the HP_L pin. There is no noise on the speaker pin.

During the tests, it happened several times that by turning the power off and on again the problem did not occur. I tried to check the SGTL5000 registers configuration using the linux command "i2cget -f" but reading the same register many times I receive different values (maybe because the linux kernel doesn't allow to do reading operation).

Any other advice that can help me solve the problem would be greatly appreciated

Many thanks
Regards

0 项奖励

2,543 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut

As mentioned before, I do recommend using the following document as a reference for your initialization. You may review the linux driver. 

SGTL5000 Initialization and Programming

 

I may sound simple, but have you tried to add a RC filter between the SGTL5000 line out and the line in of the speaker?

Have you tried to decrease the DAC Digital Volume Control?

Regards,

David 

0 项奖励

2,514 次查看
aut
Contributor I

Hello, David.

I don't know how to change the linux driver, first because I don't know what is the cause of the problem and second because I'm not an expert on linux drivers.

I will try to add a low pass RC filter (i'll try 1.5 ohm - 10 uF) between C32 and the speaker. Now I'm on vacation. I will do it when I get back to work and that is August 22nd

Regard to the DAC volume, the volumes are managed by the linux driver and are:

"Capture"
"PCM"
"Headphone"
"Master"

I set

"Capture" = 0%
"PCM" = 100%
"Headphone" = 80%
"Master" = 100%

In your opinion how should I set them?

Many thanks
Regards

0 项奖励

2,439 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut,

Based on our specialist's advice, I recommend the following procedure:

Could customer remove all the SGTL5000 code in their Linux driver and try again to check whether noise is still existed? That may know whether noise is caused by SW or HW.

Regards,

David

0 项奖励

2,389 次查看
aut
Contributor I

Hello David,

ok, I will do it but I have to wait for August 22nd.

Many thanks

Regards

0 项奖励

2,209 次查看
aut
Contributor I

Hello David.

I have done the tests you asked me.

1)
I added an R-C filter (1.5 ohm - 10 uF) on the speaker output but the noise is still present

2)
I disabled both the I2C interface that programs the SGTL5000 and the SAI interface for sending the audio data. In this condition the noise never occurs

 

Have you any other suggestion?

Many thanks

Regards

0 项奖励

2,198 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut

Could you please remove all the SGTL5000 code in your Linux driver and try again to check whether noise is still existed?

That may know whether noise is caused by SW or HW.

Regards,

David 

0 项奖励

1,961 次查看
aut
Contributor I

Hello David.

I don't know how to make this change

Regards

0 项奖励

1,869 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut

I do recommend to submit a new case in order to request further information. 

Regards,

David 

0 项奖励

2,788 次查看
diazmarin09
NXP TechSupport
NXP TechSupport

Hello aut, 

I hope all is great with you. Thank you for using the NXP communities.

If noise disappears when Line In and Mic are grounded, then this proves that noise is not produced by SGTL500. Could you please test such condition?

Noise is produced from external source: mic or Line In and probably due to grounding/shielding issues. Also it may be useful to look at AN3663 SGTL5000 Initialization and Programming.

http://cache.nxp.com/files/analog/doc/app_note/AN3663.pdf

 

The following community post might be useful for you as well.

https://community.nxp.com/t5/Other-NXP-Products/SGTL5000-ADC-noise-L-ch-only/m-p/759264

I hope this information helps.

Regards,
David

0 项奖励