Audio through Qt multimedia not working on the imx8mqevk

Fixed

Description

Hi,

I created Qt/Qml application for playing .mp3 files. Added, a multimedia module for the project .pro file and included the <Audio> qml element to play audio files. The problem is I can't able to hear a sound while trying to play .mp3 files from my application.

local.conf added the following line for GStreamer support, but after that also no sound,
PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer"

Any other packages need to include Qt multimedia enabling GStreamer support? or Suggest some other ways to play audio files from the AGL Qml application.

Help me! How to play sample audio files from the AGL application?

Thank you.

Environment

None

Activity

Show:

George Kiagiadakis 
June 21, 2021 at 12:35 PM

Looking at this, I realized that alsasrc / alsasink in gstreamer (and in general, playback using the alsalib API) is broken in current master. It seems that this can be fixed if we symlink the pipewire files from /usr/share/alsa/alsa.conf.d into /etc/alsa/conf.d, like other distributions are doing.

This is on my debian system, for instance:

> ls /etc/alsa/conf.d -la |grep pipewire
lrwxrwxrwx 1 root root 44 May 22 17:19 50-pipewire.conf -> /usr/share/alsa/alsa.conf.d/50-pipewire.conf

 I tested a manual symlink on AGL and it works with aplay. I believe this would also fix QtMultimedia and any other high level APIs that use ALSA or GStreamer to play or capture audio.

Note: for GStreamer there's also pipewiresrc/pipewiresink, but these are not autoselected as audio elements and QtMultimedia has no way to customize the underlying pipelines, iirc. These elements may change in the future, but the current upstream policy on desktop systems is to keep using the pulseaudio API on all applications (i.e. pulsesrc/pulsesink in gstreamer). Since we don't distribute libpulse in AGL, the next best thing is to use the ALSA compatibility layer, which is actually better imho (it avoids round-trips to the pipewire-pulse daemon and some unnecessary buffer copies)

Manikandan 
February 26, 2021 at 5:20 AM

Hi Scott,

Thanks for your reply.

Scott Murray 
February 25, 2021 at 9:37 PM

We've not supported QtMultimedia in the AGL demos for several years at this point.  It is likely that either it would need a customized output plugin or you would need some form of PipeWire/Wireplumber configuration customization to work with it.  I've reassigned to George for input.

Details

Assignee

Reporter

Hardware Platform(s) Affected

NXP i.MX6

Affects versions

Priority

Created February 24, 2021 at 7:41 AM
Updated June 21, 2023 at 8:09 PM
Resolved June 21, 2023 at 8:09 PM

Flag notifications