No sound from raspi3 3.5jack, using QtMediaPlayer
HI, I am trying to play music on a rpi3. I am cross compiling from ubuntu. Qt version is 5.10. I made use of QtMediaPlayer in QtQuick(qml) program. When I compile and run the program on host computer I can get sound from headphone jack and bluetooth speaker and built-in speaker. But when I deploy on rpi the audio file plays but there is no sound from any source. On the rpi omxplayer works fine. I have sound from jack and over bluetooth running mp3 files with omxplayer.
What needs to be done to direct the qtmediaplayer output to 3.5 jack in rpi?
Is there any error coming from the QMediaPlayer? Anything being output to the console on the pi? Anything in the
dmesglog that would help figure this out?
Without further information my guess and it's a complete guess but something I see in linux a lot .. I'm thinking that your mixer for that audio source is set to a low or muted volume. Check that and see if it's muted or off. Without know what sound back end you are using I don't know which mixer to have you check, I'll just start with
alsamixerdue to lack of info. :)
Thanks for your response ambershark. There is no error message from QMediaPlayer. as I have mentioned the app works perfect on a linux machine, but when ported to raspberry pi 3 it does not work.
I have checked the volume levels and other general reasons, but to no avail.
Try to run your application with the
QT_DEBUG_PLUGINSenvironment variable set to one, just to see if there's any hint coming from it.
I have solved the problem. the culprit is pulseaudio. you have to disable pulseaudio for user or globally and then everything works perfectly.
Do not uninstall pulseaudio, because a lot of other stuff depends on it. I tried to remove pulseaudio and all hell broke loose.
I disabled pulseaudio according to the instructions here https://kodi.wiki/view/PulseAudio/HOW-TO:Disable_PulseAudio_and_use_ALSA(without_removing_PulseAudio)_for_Ubuntu
Pablo J. Rogina
@Kachoraza thank you for sharing the solution. Please don't forget to mark your post as solved!
I met a same problem. I can't solve it but I turned off PulseAudio as you said.
I am used QT3.7.1 on RPI 3.
Now I am just testing using a meida player example of QT(http://doc.qt.io/qt-5.6/qtmultimedia-multimediawidgets-player-example.html).
Would you open more information for solving it?