RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1)

    Scheduled Pinned Locked Moved Help and Support
    audioforcemuntoutput
    18 Posts 2 Posters 2.8k Views
    Loading More Posts
    • 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.
    • mituM
      mitu Global Moderator
      last edited by

      If you already have the sound - by default - going over Headphones, then there's no need to add a specific sound device when you start Munt, just run it without the -d parameter.
      To see a list of available devices in your system, run aplay -L and it should list all of them.

      W 1 Reply Last reply Reply Quote 0
      • W
        Whirlinurd @mitu
        last edited by Whirlinurd

        @mitu

        Not really sure what you mean. This is my aplay output:

        **** List of PLAYBACK Hardware Devices ****
        card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
        Subdevices: 3/4
        Subdevice #0: subdevice #0
        Subdevice #1: subdevice #1
        Subdevice #2: subdevice #2
        Subdevice #3: subdevice #3
        card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
        Subdevices: 4/4
        Subdevice #0: subdevice #0
        Subdevice #1: subdevice #1
        Subdevice #2: subdevice #2
        Subdevice #3: subdevice #3

        So I only have to remove the -d paramenter and it becomes this:\

        ./mt32d -i 12 dmix:CARD=Headphones,DEV=0

        I am also not sure how to use aplay to see the correct device to use in the string. It says subdevices and stuff. Not sure.

        I will try the new string some time later...

        Ok, tried it out. This time when the log was flying by I noticed an error message. It seems that the mt32d service is not starting anymore with those parameters.

        I see something like failed... /etc/rc.local Compatibility error. When I set it back I get the normal MT-32 emulator start setting everything up.

        I am at a loss. It seems when parameters are used the rc.local startup is corrupted. Just like parameters can not be used in an rc.local file. Very strange everything.

        Still hoping that works out eventually. Also posted a question in the support that Munt developers suggest at Vogons. Maybe they now some other solution that I have not think of yet.

        Haven't got a reply at Vogons yet. Still waiting...

        Thanks.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @Whirlinurd
          last edited by mitu

          @whirlinurd said in Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1):

          Not really sure what you mean. This is my aplay output:

          You're posting the output of aplay -l, not aplay -L.

          So I only have to remove the -d paramenter and it becomes this:\

          ./mt32d -i 12 dmix:CARD=Headphones,DEV=0

          No, removing the parameter means:

          mt32d -i 12
          
          W 1 Reply Last reply Reply Quote 0
          • W
            Whirlinurd @mitu
            last edited by Whirlinurd

            @mitu

            Ok, removed the parameter and made it like this:

            /usr/local/bin/mt32d -i 12

            only removing the '&' of the end. This resulted again into the startup of Retropie hanging at boot.

            Sorry, this is aplay -L

            null
            Discard all samples (playback) or generate zero samples (capture)
            default
            output
            sysdefault:CARD=b1
            bcm2835 HDMI 1, bcm2835 HDMI 1
            Default Audio Device
            dmix:CARD=b1,DEV=0
            bcm2835 HDMI 1, bcm2835 HDMI 1
            Direct sample mixing device
            dsnoop:CARD=b1,DEV=0
            bcm2835 HDMI 1, bcm2835 HDMI 1
            Direct sample snooping device
            hw:CARD=b1,DEV=0
            bcm2835 HDMI 1, bcm2835 HDMI 1
            Direct hardware device without any conversions
            plughw:CARD=b1,DEV=0
            bcm2835 HDMI 1, bcm2835 HDMI 1
            Hardware device with all software conversions
            sysdefault:CARD=Headphones
            bcm2835 Headphones, bcm2835 Headphones
            Default Audio Device
            dmix:CARD=Headphones,DEV=0
            bcm2835 Headphones, bcm2835 Headphones
            Direct sample mixing device
            dsnoop:CARD=Headphones,DEV=0
            bcm2835 Headphones, bcm2835 Headphones
            Direct sample snooping device
            hw:CARD=Headphones,DEV=0
            bcm2835 Headphones, bcm2835 Headphones
            Direct hardware device without any conversions
            plughw:CARD=Headphones,DEV=0
            bcm2835 Headphones, bcm2835 Headphones
            Hardware device with all software conversions

            Some in the top of the list says HDMI and the bottom ones says Headphones. The Retropie audio is set to Headphones so they are probably the bottom ones. The top ones are probably the raspi-config audio. I have selected Headphones there at first setup but it always stays on HDMI 1.

            Several versions of Retropie the mixer have changed and since then I haven't been able to change this to Headphones. Last time is probably in 4.2 or maybe 4.5. Don't know exactly. Maybe Munt is using the default raspi-config audio and that is why it stays on HDMI 1.

            The only thing I can think of is manually finding out where the raspi-config audio is located and manually changing this and then test it out to see if it will work.

            When I terminal to Retropie and sudo raspi-config trying to change to Headphone it is still not changing...

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @Whirlinurd
              last edited by mitu

              @whirlinurd said in Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1):

              only removing the '&' of the end. This resulted again into the startup of Retropie hanging at boot.

              Don't remove the & if you add the command in /etc/rc.local, that's why the system hangs on boot.

              W 1 Reply Last reply Reply Quote 0
              • W
                Whirlinurd @mitu
                last edited by

                @mitu

                That's fine. Everything is still the same as I installed it this morning.

                What where your thoughts about the raspi-config output since I can not change it to Headphones. As I understand raspi-config is the default setup program for debian for audio through the system mixer.

                Maybe it was the intention by the Retropie developer to lock this to HDMI since it is not needed or it is a bug. If Munt uses the raspi-config mixer it will not work if I can not change it.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @Whirlinurd
                  last edited by

                  @whirlinurd said in Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1):

                  What where your thoughts about the raspi-config output since I can not change it to Headphones. As I understand raspi-config is the default setup program for debian for audio through the system mixer.

                  Both raspi-config and the Audio menu in RetroPie use the system's provided audio outputs (whatever is listed by aplay -l), there's no default raspi-config audio. There have been some changed (in Raspbian) between 4.2. and 4.7, so the options might look different, but I haven't had any issues with raspi-config w.r.t. audio settings in recent versions (i.e. last 2 years).

                  Based on the aplay -l output you posted, you're using a recent enough Raspbian version (one that includes the changes referenced in https://retropie.org.uk/forum/topic/26628), so that should be ok. Just make sure your RetroPie version is up to date and the Audio options should be similar, whether you're using raspi-config or the Audio settings from RetroPie.

                  I'd try removing the /etc/rc.local line for starting munt and just use SSH to start a new login session on the PI to start manually mt32 and look at the output. Check by running

                  aconnect -o
                  

                  that the 128:0port is created and it's handled by mt32 before starting a Dosbox game. The output should look similar to the one I posted a few posts back.

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    Whirlinurd @mitu
                    last edited by Whirlinurd

                    @mitu

                    Tried your suggestion of manually starting the mt32 runtime. Starting all the way back with the first try.

                    /usr/local/bin/mt32d -i 12 -d dmix:CARD=Headphones,DEV=0

                    When running this the first time it gave a PCM device fault. Then I ran the mt32 file on its own and I saw all the parameters that are possible including the -d for default. Normally it accepts the DMIX line perfectly fine so I found it strange it gave an error this time.

                    I rebooted an tried the same line a second time. Expecting the same error. This time no error came up. The device line is completely valid and it is perfectly accepted it just give no output.

                    After this I just pulled up the device list with aplay -L and going over them one by one. Just grabbed the first line in the list and hoping that it would do something else or also some kind of error.

                    The first Headphone line became this:

                    /usr/local/bin/mt32d -i 12 -d sysdefault:CARD=Headphones

                    I started it in the terminal and started a game and what the heck it gives Midi over the Headphone output. It works. I was so focused on the DMIX line that I was going all over the place.

                    Now we know that is was just a device that did not output in the case of Retropie. Just changing it was the solution.

                    Great, thanks for your help. I really need to learn a bit more about the ins and outs of linux.

                    Thanks again.

                    W 1 Reply Last reply Reply Quote 0
                    • W
                      Whirlinurd @Whirlinurd
                      last edited by Whirlinurd

                      Not working just right yet. I added the same line to the /etc/rc.local file to start it up with Retropie and it hangs again with boot. Since it works when running it in a ssh terminal when Retropie is already running.

                      Oops I found it... Original line had a '&' at the end. Seems to be some process thing so it runs in the background or something. Adding it back like this and Retropie started properly.

                      /usr/local/bin/mt32d -i 12 -d sysdefault:CARD=Headphones&

                      Did not know that.

                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @Whirlinurd
                        last edited by

                        @whirlinurd Post the contents of your /etc/rc.local file, maybe we can figure out why it's not working.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          Whirlinurd @mitu
                          last edited by Whirlinurd

                          @mitu

                          Great thanks. It is ok. As I said forgot the '&' at the end. Still do not know why 'DMIX' option gives no sound and the 'Sysdefault' option does.

                          Took some time and feels that it was a lot easier in the end. That's always when you find out how it works properly.

                          Finally have some results...

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.