Lineout from SGTL5000 getting clipped how to fix these?

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

Lineout from SGTL5000 getting clipped how to fix these?

965 Views
karthikpoojary
Contributor III

On our development we are using i.Mx6q processor we have used SGTL5000 as the audio codec. Our schematic is similar to that of sgtl5000 evaluation kit. On playing any sine wave tone with amptitude greater than 0.6 the the audio is getting clipped in Lineout pin of the codec.

Only difference is that we can  are feeding 19.0 Mhz clock to the code what can be the reason for this?

Labels (2)
0 Kudos
4 Replies

659 Views
art
NXP Employee
NXP Employee

The possible cause of the issue is too high DAC gain. Check the DAC gain control settings first.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

659 Views
karthikpoojary
Contributor III

Hi Artur,

I am using the Linux OS i have already tried to change Volume level in alsamixer. Its not solving the issue.In the driver the default values for various registers are these 

{ SGTL5000_CHIP_CLK_CTRL,  0x0008 },
{ SGTL5000_CHIP_I2S_CTRL, 0x0010 },
{ SGTL5000_CHIP_SSS_CTRL, 0x0010 },
{ SGTL5000_CHIP_DAC_VOL, 0x3c3c },
{ SGTL5000_CHIP_PAD_STRENGTH, 0x015f },
{ SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 },
{ SGTL5000_CHIP_ANA_CTRL, 0x0111 },
{ },
{ SGTL5000_CHIP_ANA_POWER, 0x7060 },
{ SGTL5000_CHIP_PLL_CTRL, 0x5000 },
{ SGTL5000_DAP_BASS_ENHANCE, 0x0040 },
{ SGTL5000_DAP_BASS_ENHANCE_CTRL, 0x051f },
{ SGTL5000_DAP_SURROUND, 0x0040 },
{ SGTL5000_DAP_EQ_BASS_BAND0, 0x002f },
{ SGTL5000_DAP_EQ_BASS_BAND1, 0x002f },
{ SGTL5000_DAP_EQ_BASS_BAND2, 0x002f },
{ SGTL5000_DAP_EQ_BASS_BAND3, 0x002f },
{ SGTL5000_DAP_EQ_BASS_BAND4, 0x002f },
{ SGTL5000_DAP_MAIN_CHAN, 0x8000 },
{ SGTL5000_DAP_AVC_CTRL, 0x0510 },
{ SGTL5000_DAP_AVC_THRESHOLD, 0x1473 },
{ SGTL5000_DAP_AVC_ATTACK, 0x0028 },
{ SGTL5000_DAP_AVC_DECAY, 0x0050 }, 

Which register value should be changed to control DAC gain ?

0 Kudos

659 Views
art
NXP Employee
NXP Employee

The DAC gain is controlled by the CHIP_DAC_VOL register. For more information, please refer to the Table 22 of the SGTL5000 Data Sheet Rev.6 document, available on the codec's Documentation web page:

http://www.nxp.com/products/media-and-audio-processing/data-converters/audio-converters/audio-codec/...

Also, try to change the line output volume by changing the CHIP_LINE_OUT_VOL register. For more details, refer to the Table 31 of the document above.

You can directly access the SGTL5000 registers using the low-level I2C driver, included in the BSP.

Best Regards,

Artur

0 Kudos

659 Views
karthikpoojary
Contributor III

Hi Artur 

How to change High DAC gain setting ? Should I do it directly in the Driver or is there any tool ?

0 Kudos