Sound playback has crackling artifacts on HDMI output of Apalis i.MX6

Hi there,

as mentioned above I am using a Boot2Qt image, which in contrast to the Angstrom image does not use pulse but purely ALSA.

When I try to play alarm sounds via the HDMI interface there is a crackling artifact in the first part (<1s) of the playback. This does not occur when I play the sound via the line out.

Previously, I used the Angstrom image with pulse audio and experienced something similar: In that case the first few hundred milliseconds of a file played via HDMI where suppressed which also did not occur via the line out.

Is there an explanation for this? Are there any configuration settings that I could adjust to avoid the artifacts?

Thanks in advance for any hints!

Dear @magra

I will try to reproduce the behaviour you mentioned. But in the meantime could you answer me following questions:

  1. Which carrier-board are you using?
  2. Could you provide the code you are using?
  3. Could you make a short video or audio record of the result?

Thank you and best regards

Thank you for your reply Diego,

1.) I am using the Apalis evaluation board

2.) I cannot share my source code directly, but I created a minimum audio playback example that is using the same command i.e. is based on Qt/QML and uses QML’s SoundEffect function play() to playback the audio file Alarm.wav that I provided with the sources

3.) I also attached the audio recording of both my application and the minimum example each played via the touch display speakers, that is connected via HDMI to the Apalis evaluation board. Interestingly the recordings differ: The minimal example shows the effect that I had previously observed with my application on the Angstrom image i.e. the first two tones of the alarm sound are omitted. The application exhibits the crackling I described above. Nevertheless both artifacts only in the audio output via HDMI.

I appreciate your help, kind regards,


hi @magra
Thanks for the answers and the files. @diego_b.tx will answer you tomorrow about this issue.

Hi @magra

Thank you for the provided information. If you are using the Apalis evaluation board, how did you connect HMDI then (which is not available on the eval board)? Did you mix up the Ixora with the Eval Board, or do you use any adapter?
And did you change anything on the configuration of the module to have the HDMI as a default audio output? Your mini application is just using void QSound::play() and with this the system default audio output, in my case the audio jack.

Thank you for the feedback and best regards

Hello Diego,

Thanks for your reply. Sorry I forgot to mention that I indeed configured ALSA to use the HDMI as default and that we are using the DVI/HDMI adapter to connect the display to the Apalis evaluation board.
To change the audio output configuration I did use pacmd set-default-sink on the Angstrom image and for the Boot2Qt image (where there this not available) I modified replaced all hw:0,0 occurences in asound.conf with hw:2,0.

Please let me know if you need additional information.


Hi @magra

Thank you for this clarification. I had some trouble to get your mini-application running properly and playing a sound, but I did not change the whole asound.conf in my case, instead I changed the default device to hw:2;0. Anyway, I was able to play the video in the Qt Multimedia demonstration, without any crackling artifacts. But let me test a few more things and your mini application as well.

We will get back to you soon.

Best regards, Diego

Hi Diego,

Thank you for your efforts. I am not sure which Qt Multimedia demo you are referring to. Generally, it is possible that the artifact occurs only within the first second and depending on the video that you played might not occur at all. Can you play the audio file that I provided in this Qt Multimedia demo? I would also be interested in how you set the default device.

I appreciate your help!

Hi @magra

I meant the Qt Multimedia Demo you have on the Toradex Easy Installer - Qt Demo Image called “Boot to Qt Software Stack”. If you start the demo, you can test their media player with given videos. And in my case I just changed the pcm.!default and ctl.!default nodes, but not the full asound.conf. Now after I replaced all hw:0;0 to hw:2;0 I also was able to test your application.

Finally I think this behaviour depends on the HDMI output and the monitor connected to it. Common Monitors are doing a fading, which is implemented by the manufacturer. Normal computers can handle that with applications like pulse audio, but in the embedded area you have to pay respect to this fading when you want to play a sound with HDMI. Since your audio file is playing an aggressiv alarm sound directly at the beginning of the file, the perception of the crackling is quite good. Hence I would recommend to adjust the audio file according to its application.

You can see the same effect if you play the different video files in the mentioned Qt media player demo. Two of three videos are starting slowly with it’s music, but one has an aggressive start. The aggressive one is also crackling at the start.

Best regards