SGTL5000 with i.MX6

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

SGTL5000 with i.MX6

4,193 Views
peterhygren
Contributor III

Hi,

I've started a design with an i.MX6D and an SGTL5000 and have two questions:

1. Is this a recommended solution or would you recommend another audio chip? Requirements are line-in, line-out and headphone.

2. If the SGTL5000 is a good choice, then how do I connect it? There is no I2S category in the iomux application.

Thanks,

Peter Hygren

Labels (1)
Tags (3)
0 Kudos
8 Replies

983 Views
fabio_estevam
NXP Employee
NXP Employee

You can refer to mx6qsabrelite schematics, as it has a sgtl5000.

983 Views
PaulDeMetrotion
Senior Contributor I

We also have a design using the SGTL5000 and have referenced the Sabre-Lite schematics. We are using the Line-In and Line-Out functions also. Do you know if the custom software files need to be appended with addtional data for the line-in and line-out functions? Currently we can hear audio from our speakers but the volume is very low. Didn't know if something in the software has to be configured to enable these functions. This is our current data structure:

static struct mxc_audio_platform_data mx6_board_audio_data = {

.ssi_num = 1,

.src_port = 2,

.ext_port = 5,

.init = mx6_board_sgtl5000_init,

.hp_gpio = -1,

};

Thanks.

0 Kudos

983 Views
fabio_estevam
NXP Employee
NXP Employee

You can try to run the 'alsamixer' utility.

It allows you to change volume and switch the input sources and outputs.

0 Kudos

983 Views
Ramtry
Contributor III

Hi

I found that the SGTL5000 is having only 45mW max in output. So, if i want to connect the loud speaker then SGTL5000 is not giving very good sound. Do you have anyother IC recommend to give more watts of audio output.

Thanks & Regards,

RAM

0 Kudos

983 Views
PaulDeMetrotion
Senior Contributor I

I can do all that now. The problem is that the initial volume is too low so even if I turn the volume all the way up, the levels are very low. It appears that the volume configuration registers are being set up too low at boot up. If I intercept the set volume functions with an emulator and overwrite the calculated values, the volume levels are then proper. I believe there may be some config data within the kernel source code but I do not know where. Anybody have any suggestions?

0 Kudos

983 Views
ieio
Contributor IV

Hi Paul,

give a look into sound/soc/codecs/sgtl5000.c.

[SGTL5000_CHIP_LINE_OUT_VOL] = 0x0404 imho should be modified accordingly to your VDDA, VAG_VAL, VDDIO values as described in the sgtl5000 maual.

You should also modify dac_get_volsw, dac_put_volsw in order to have alsamixer working properly.

i.

0 Kudos

983 Views
PaulDeMetrotion
Senior Contributor I

Already did this with the following line in sgtl5000.c:

snd_soc_write(codec, SGTL5000_CHIP_LINE_OUT_VOL,

(0x0f << SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT) | (0x0f << SGTL5000_LINE_OUT_VOL_LEFT_SHIFT));

This fixed the volume issue very nicely.

0 Kudos

983 Views
luarch
Contributor II

Hi Paul,

where do I need to add this line in the sgtl5000.c file? In which function?

Many Thanks in advance

0 Kudos