Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. No sound from raspi3 3.5jack, using QtMediaPlayer
Forum Updated to NodeBB v4.3 + New Features

No sound from raspi3 3.5jack, using QtMediaPlayer

Scheduled Pinned Locked Moved Solved QtonPi
11 Posts 8 Posters 4.2k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KachorazaK Offline
    KachorazaK Offline
    Kachoraza
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      Is there any error coming from the QMediaPlayer? Anything being output to the console on the pi? Anything in the dmesg log 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 amixer or alsamixer due to lack of info. :)

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      2
      • KachorazaK Offline
        KachorazaK Offline
        Kachoraza
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Try to run your application with the QT_DEBUG_PLUGINS environment variable set to one, just to see if there's any hint coming from it.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • KachorazaK Offline
            KachorazaK Offline
            Kachoraza
            wrote on last edited by
            #5

            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. RoginaP L 2 Replies Last reply
            1
            • KachorazaK Kachoraza

              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. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @Kachoraza thank you for sharing the solution. Please don't forget to mark your post as solved!

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Kernel KIM
                wrote on last edited by
                #7

                Dear Kachoraza,

                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?

                M 1 Reply Last reply
                0
                • KachorazaK Offline
                  KachorazaK Offline
                  Kachoraza
                  wrote on last edited by
                  #8

                  I hope you have figured it out by now. But in case not, please follow the instructions in this article explaining the method.

                  1 Reply Last reply
                  1
                  • K Kernel KIM

                    Dear Kachoraza,

                    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?

                    M Offline
                    M Offline
                    MisterX
                    wrote on last edited by
                    #9

                    @Kernel-KIM You need to install pulseaudio and enable it

                    sudo apt-get install pulseaudio
                    
                    1 Reply Last reply
                    0
                    • KachorazaK Kachoraza

                      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

                      L Offline
                      L Offline
                      loading...
                      wrote on last edited by
                      #10

                      @Kachoraza Hi!
                      I got the same issue, but when I disabled pulseaudio as you did, I got an other error: PulseAudioService: pa_context_connect() failed. And when I enabled pulseaudio again, that error's gone but I couldn't get qtmediaplayer working (no sound from anysource). So I am in the loop now. Do you have any other suggestions? Thanks a lot!

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        Stevenm
                        wrote on last edited by
                        #11

                        Hi, just found something that worked for me : https://raspberrypi.stackexchange.com/a/98952

                        Installing gstreamer1.0-pulseaudio did the trick.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved