Audio driver sgtl5000.c

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

Audio driver sgtl5000.c

Jump to solution
1,872 Views
dauphinalexandr
Contributor II

Hello everyone,

I'm currently working on a wandbord dl and i'm trying to use the audio codec SGTL5000 for some applications.

I'm looking for a way to modify the SGTL5000 registers from user side and didn't modify the driver sgtl5000.c

Is it possible to have access to the registers by using some structure defined in the driver sgtl5000.c in user or the only way is via i2c control?

i tried with i2c but i have some issues  :

I can make a dump and read the registers with a dump like it's explained in this  topic :

Can you get a dump of the SGTL5000 codec registers?

root@freescale /$ cat /sys/kernel/debug/regmap/1-000a/registers           
000: a011                                                                 
002: 0060                                                                 
004: 0008                                                                 

i can find my i2c devices by using the package i2c-tools:

root@debian-armhf:/# i2cdetect -l

i2c-0   i2c             21a0000.i2c                             I2C adapter

i2c-1   i2c             21a4000.i2c                             I2C adapter

sgtl5000 is present at the address x0a :

root@debian-armhf:/# i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- UU -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -

But when i read and tried to set some values i always have zero :

root@debian-armhf:/# i2cdump -f -y -r 0-0xff 1 0x0a

No size specified (using byte-data access)

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef

00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

does anyone know why I do not ais access to these registers by i2c?

and what is the best way to change them?

Thanks a lot,

Alex

Labels (1)
1 Solution
1,042 Views
weidong_sun
NXP TechSupport
NXP TechSupport

View solution in original post

2 Replies
1,042 Views
stevenriedl
Contributor III

Sorry to add to this old thread, but I have the same issue. Actually I think modifying the driver to add the DAP MIXER to allow both I2S and Mic/ADC to be fed to the DAC (and set the DAC to DAP) Not 100% sure I can figure that one out on my own. Looked over the control interface (didn't see or grep any Kcontrols? so I could try and reset it myself. As the original post I'm locked out and even if I force I get garbage data back.

Any ideas on this? BTW, using the Fe-Pi board on a Raspberry Pi. (3+, Zero W)

0 Kudos
1,043 Views
weidong_sun
NXP TechSupport
NXP TechSupport