SGTL5000 with i.MX6

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

SGTL5000 with i.MX6

4,224 次查看
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

标签 (1)
标记 (3)
0 项奖励
8 回复数

1,014 次查看
fabio_estevam
NXP Employee
NXP Employee

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

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励

1,014 次查看
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 项奖励