2022-07-11 02:25 AM
Dear community,
I need your help.
I'm using a ES8388 Codec on a custom board with STM32MP157 MPU. ES8388 codec connected on i2c1 and sai2. In the codec driver, ES8388 is in salve mode and MPU is in master mode. mclk cannot be obtained.
device tree:
kernel source:
boot log:
2022-07-11 11:13 PM
Hi @ZLiu.3 ,
I'm not an expert but by comparing provided dts with the example here
https://wiki.st.com/stm32mpu/wiki/Soundcard_configuration#Static_configuration_3
I didn't notice any evidence, but you didn't provide I2C1 node.
If not already done worth to double check at your end with all wiki examples provided.
With OpenSTLinux version are you using ?
Hope it help,
Olivier
2022-07-13 12:05 AM
Hi @ZLiu.3 ,
I suspect that using "MCLK" upper case in Sound card but "mclk" lower case in codec may explain your problem.
Can you check ?
Olivier
2022-07-21 07:28 PM
I'm sorry, I've been doing other work until today.
The OpenSTLinux version I downloaded is 5.4.
According to your suggestion, I modified the code, but the mclk still cannot be obtained in the code.
i2c1:
ZLiu
2022-07-22 12:29 AM
The rate of this sai2a_mclk is 0.
cat /sys/kernel/debug/clk/clk_summary:
2022-07-29 03:30 AM
Hello @ZLiu.3,
As you are using an old kernel version, I wanted to check if we saw this kind of error in the past.
Could you please put a trace in es8328_set_sysclk() function to check the clock_id that is passed in argument ?
Kind regards.
Erwan.
2022-07-30 12:07 AM
@Erwan SZYMANSKI I added the print code in es8328_set_sysclk()
The output is "es8328_set_sysclk==>clk_id:0, freq:4096000, dir:0".
Seeing the output, I have a doubt about how this 4096000 is generated.
Thank you for your reply.
2022-08-01 05:32 AM
@ZLiu.3,
Could you please explain me what are the symptoms that you can observe when you try to make the playback work ? Is the playback running but you do not hear anything ?
Moreover, with discussing with dev team, your boot logs concerning the sound card looks good. This is logical that your mclk rate is at 0 because your are not at run time. The clock will only be activated at run time. That is why it would be interesting to see your clk_summary when you try to play your playback.
Kind regards.
Erwan
2022-08-09 01:27 AM
Thank you so much for your support, my audio issue has been resolved.
2022-08-09 01:34 AM
hello @ZLiu.3 ,
Nice to see that your issue has been solved.
Have a nice day.
Erwan.