Skip to main content
Graduate II
August 8, 2025
Solved

CS42L51 Sound card, of custom board stm32mp255DAK3.

  • August 8, 2025
  • 1 reply
  • 1079 views

Hi ST,


I am successfully enabled the Audio through the SAI channel I am  able to detect the card for our custom board. and using gst-play-1.0 this play the video and sound very well , also with aplay command. 

But the thing is , whenever i use qtmultimedia, it's playing video very well , but sound not come.
when i connect the HDMI , then sound works through the card cs42l51. but when i disconnected the HDMI , and reboot the custom board , then i again i try to play video through the qtmultimedia with screenoff command then it play only video , but not given the audio output. Then i plugin the HDMI , then reboot the custom board , and i try to play the video through the  qtmultimedia with screenoff command then sound works very well, 
so i think the issues comes from the HDMI and cs42l51 card.


is something i am doing wrong from initialization and configuration

root@stm32mp255-customedsce-9b-60-e5-21-77:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: STM32MP25DK [STM32MP25-DK], device 0: 40290004.audio-controller-cs42l51-hifi cs42l51-hifi-0 [40290004.audio-controller-cs42l51-hifi cs42l51-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: STM32MP25DK [STM32MP25-DK], device 2: 400b0000.audio-controller-i2s-hifi i2s-hifi-2 [400b0000.audio-controller-i2s-hifi i2s-hifi-2]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@stm32mp255-customedsce-9b-60-e5-21-77:~#

    This topic has been closed for replies.
    Best answer by Erwan SZYMANSKI

    @asadullah4571 ,
    Can you please just make the following test after the boot, and before your Qt application launch ?

    MP2 $> systemd-run --collect -E XDG_SESSION_TYPE=wayland --uid=1000 -p PAMName=login -p TTYPath=/dev/tty7 sleep 1d

    MP2 $> su -l weston -c "systemctl --user start pipewire"

    MP2 $> su -l weston -c "systemctl --user start pipewire-pulse"

    MP2 $> su -l weston -c "systemctl --user start wireplumber"

    I do not know if all is needed, this is just to understand if we can configure manually something before your application launch.

    Kind regards,
    Erwan.

    1 reply

    Technical Moderator
    August 8, 2025

    Hello @asadullah4571 ,
    Would it be possible for you to share your complete DTS, as well as you pin configuration ?

    If I well understand, it does work well with HDMI but not without, what is your display in the case where you do not have HDMI linked ? DSI / LVDS / RGB panel ? 

    Kind regards,
    Erwan.

    Graduate II
    August 8, 2025

    Hi @Erwan SZYMANSKI ,

    Thank you for your quick response.

    I have attached all the relevant DTS files for your reference.

    To answer your question:

    "What is your display in the case where you do not have HDMI linked? DSI / LVDS / RGB panel?"

    We are not using any display in the production setup. The HDMI output was only used during development for verification purposes—to visually confirm that the Qt-based application UI is functioning as expected.

    Our actual application is headless. Once validated, we run the Qt application using the screenoff command, and in the final production environment, neither HDMI nor any other display interface (DSI, LVDS, RGB) will be used.

    Application summary.

    • The application receives video and image data over TCP.

    • It processes this data (splits it into multiple parts) and sends it out via TCP.

    • There is no need for any graphical display output.

    • However, audio output is required and critical to the application.

    Currently, the application functions correctly without HDMI connected, and the TCP data processing and transmission work as expected.
    The only remaining issue is that audio does not play when HDMI is disconnected.

    Please let me know if there is anything specific that needs to be configured in the DTS or audio routing settings to enable audio output in a headless environment.

    Technical Moderator
    August 8, 2025

    Hello @asadullah4571 ,
    Thank you for the very complete summary, very clear.

    As I thought that you had another display when not using HDMI, I wanted to double check that there was no pin conflict in one configuration, and not in the HDMI one, but this theory is now completely out of scope.

    Anyway, let's continue on it.

    I do not know the way you "launch" your video (that is in fact here just for the audio stream), but do you have some proof that the video is well launched and in a playback state ? Do you have some logs, portion of code to share or highlight ?

    I just want to be sure that we really face an audio issue instead of a more general "video playback" issue without screen. I am not so familiar with Qt screenless to be completely transparent.

    Kind regards,
    Erwan.