Can you get a dump of the SGTL5000 codec registers?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can you get a dump of the SGTL5000 codec registers?

ソリューションへジャンプ
4,652件の閲覧回数
IanCraig
Contributor II

Hi

On my new iMX6Quad board I'm having issues getting the SGTL5000 audio codec to work. What is happening is the codec is getting initialised and the I2S clock is getting turned on at the end of initialisation but the clock turns off a few milliseconds later. I want to try and get a dump of the code registers after this point to see if the chip has been reset for some reason (supplies are fine),

I have taken a trace of the I2C traffic and this looks ok. The only thing I have noticed is if you run aplay once the system is up the top two bits of register CHIP_ADCDAC_CTRL are set. These indicate "Volume Busy DAC Right & Left". I have a reference working system and these bits are never set.

I have tried "cat /sys/devices/soc0/sound.17/HiFi/codec_reg" but get nothing back. I have also tried this via debugFS with the same result. Is there any other way to dump these registers?

Thanks

ラベル(3)
1 解決策
3,864件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Ian,

You can use regmap for such purpose.

These are the commands I do on a mx53qsb running kernel 4.0:

root@freescale /$ mount -t debugfs none /sys/kernel/debug/              
root@freescale /$ cat /sys/kernel/debug/regmap/1-000a/registers           
000: a011                                                                 
002: 0060                                                                 
004: 0008                                                                 
006: 0080                                                                 
00a: 0010                                                                 
00e: 020c                                                                 
010: 3c3c                                                                 
014: 015f                                                                 
020: 0000                                                                 
022: 1818                                                                 
024: 0022                                                                 
026: 0068                                                                 
028: 01f0                                                                 
02a: 0000                                                                 
02c: 0320                                                                 
02e: 0e0e                                                                 
030: 5260                                                                 
032: 5000                                                                 
034: 0000                                                                 
036: 0017                                                                 
03a: 0000                                                                 
03c: 0000                                                                 
100: 0000                                                                 
102: 0000                                                                 
104: 0040                                                                 
106: 051f                                                                 
108: 0000                                                                 
10a: 0040                                                                 
10c: 0000                                                                 
10e: 0000                                                                 
110: 0000                                                                 
116: 002f                                                                 
118: 002f                                                                 
11a: 002f                                                                 
11c: 002f                                                                 
11e: 002f                                                                 
120: 8000                                                                 
122: 0000                                                                 
124: 0510                                                                 
126: 1473                                                                 
128: 0028                                                                 
12a: 0050                                                                 
12c: 0000                                                                 
12e: 0000                                                                 
130: 0000                                                                 
132: 0000                                                                 
134: 0000                                                                 
136: 0000                                                                 
138: 0000                                                                 

13a: 0000

元の投稿で解決策を見る

5 返答(返信)
3,865件の閲覧回数
abhijeet_ghodga
Contributor III

Hi,

I am at a similar problem and want to modify the I2C registers of SGTL.

I have seen the initialized values using the registers file in regmap, but I want to change the value of one of the register.

The Linux OS, I am working on, does not have i2c-tools, hence no command like i2cset which can do this job. Any alternative way of setting the registers of SGTL5000?

Best,

Abhijeet

0 件の賞賛
返信
3,865件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Ian,

You can use regmap for such purpose.

These are the commands I do on a mx53qsb running kernel 4.0:

root@freescale /$ mount -t debugfs none /sys/kernel/debug/              
root@freescale /$ cat /sys/kernel/debug/regmap/1-000a/registers           
000: a011                                                                 
002: 0060                                                                 
004: 0008                                                                 
006: 0080                                                                 
00a: 0010                                                                 
00e: 020c                                                                 
010: 3c3c                                                                 
014: 015f                                                                 
020: 0000                                                                 
022: 1818                                                                 
024: 0022                                                                 
026: 0068                                                                 
028: 01f0                                                                 
02a: 0000                                                                 
02c: 0320                                                                 
02e: 0e0e                                                                 
030: 5260                                                                 
032: 5000                                                                 
034: 0000                                                                 
036: 0017                                                                 
03a: 0000                                                                 
03c: 0000                                                                 
100: 0000                                                                 
102: 0000                                                                 
104: 0040                                                                 
106: 051f                                                                 
108: 0000                                                                 
10a: 0040                                                                 
10c: 0000                                                                 
10e: 0000                                                                 
110: 0000                                                                 
116: 002f                                                                 
118: 002f                                                                 
11a: 002f                                                                 
11c: 002f                                                                 
11e: 002f                                                                 
120: 8000                                                                 
122: 0000                                                                 
124: 0510                                                                 
126: 1473                                                                 
128: 0028                                                                 
12a: 0050                                                                 
12c: 0000                                                                 
12e: 0000                                                                 
130: 0000                                                                 
132: 0000                                                                 
134: 0000                                                                 
136: 0000                                                                 
138: 0000                                                                 

13a: 0000

3,865件の閲覧回数
IanCraig
Contributor II

Hi guys

Thanks fro the help. Managed to get the registers using regmap. Now to see if this helps in debugging my problem.

cheers

Ian

0 件の賞賛
返信
3,865件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Ian,

Thanks for the feedback.

Could you please mark the answer as 'correct answer'?

Thanks

0 件の賞賛
返信
3,865件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi,

You can use the -f option in i2cdump, i2cset to bypass the check on whether the device is in use by the kernel if you are running with root permissions.  For example:

'i2cdump -f -y -r 0-0xff 0 {your_device_address}'

Best Regards,

Alejandro