Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1)
-
Then I do not know anymore. I used a clean install with everything. All audio goes to the output set in the Retropie menu except Munt-32. Normal Dosbox sounds like Soundblaster or Speaker do go to default audio. Whatever I try it Munt-32 stays on the HDMI output.
I thought about several things. Maybe the Munt Alsa driver has separate configuration or some kind of pass through directly to the audio device.
So reverting all modifications and using the audio menu as it should sets everything back to default. If I do that then I am back where I started and I know that did not work. You say it should work so I have no idea what could be different.
Then I will keep it as it is now using a setup in a sound issues topic that did work since it was the only way I could force the output. I also understand that Munt-32 is not officially supported by the Retropie team.
Ah well...
Thanks again.
-
@whirlinurd said in Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1):
Then I will keep it as it is now using a setup in a sound issues topic that did work since it was the only way I could force the output. I also understand that Munt-32 is not officially supported by the Retropie team.
If the sound works everywhere except Munt, then the problem is not the sound/ALSA configuration - it might be a Munt/Dosbox configuration. How are you testing Munt ?
-
****@mitu
The only way I know. installing the games that I have into dosbox. After installing them on the mounted drive and setting up a game sound config to Roland or compatible for midi and Soundblaster 16 for digital. When I start the game the midi goes to the HDMI output and the soundblaster digital goes to the headphone jack as set in the Retropie menu.
The only Dosbox output I know of is in a config file. This is the '.conf' file that Dosbox uses when started.
The midi segment says:
mpu401 = intelligent
mididevice = alsa
midiconfig = 128:0I see now that the midiconfig is the output to the alsa driver. I thought that all output in Dosbox automatically was redirected to the main alsa driver and also the audio settings Retropie uses. The tutorial for Munt-32 says the output should contain '128:0'. This was already set to the same device as default.
The description in the config says:
Special configuration options for the device driver. This is usually the id or part of the name of the device you want to use (find the id/name with mixer/listmidi).
I know I tried 'mixer /listmidi before in the terminal to find devices but the mixer command is not found. I also tried changing the '128:0' to something like '128:1' because the headphone uses card id 1 but that did not change anything.
The only other command I know is 'aplay -l' to give a report of devices.
As I have it now:
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/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: 3/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3I can see that HDMI uses 'card 0' and the headphones uses 'card 1'. That is why I do not understand why changing the midiconfig to '128:1' did not do anything. I probably have to change the midiconfig to something else but I have no idea what it should be.
-
@whirlinurd said in Change audio output (Dosbox) Munt to 3.5mm jack (v4.7.1):
mpu401 = intelligent
mididevice = alsa
midiconfig = 128:0
I know I tried 'mixer /listmidi before in the terminal to find devices but the mixer command is not found. I also tried changing the '128:0' to something like '128:1' because the headphone uses card id 1 but that did not change anything.By default, RetroPie starts TiMidity before Dosbox (for MIDI support) and it uses the 128:0 to 128:3 range in DosBox. If you start
mt32
as a service or before Dosbox, this range is switched to 129:1 to 128:1. Here's what it looks like with both Munt and TiMidity started (Munt started before Dosbox):aconnect -o client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 128: 'MT-32' [type=user,pid=24249] 0 'Standard ' 1 'GM Emulation ' client 129: 'TiMidity' [type=user,pid=24736] 0 'TiMidity port 0 ' 1 'TiMidity port 1 ' 2 'TiMidity port 2 ' 3 'TiMidity port 3 '
Port
128:1
is not choosing the Headphone card, it's the GM emulation port for Munt.
If you want to choose a different device to output the sound for Munt, it has a-d
parameter to choose the ALSA device name (note:aplay -l
lists the audio cards, not the devices).Try to start Munt with
./mt32d -i 12 -d dmix:CARD=Headphones,DEV=0
and then test the MT32 output from Dosbox.
-
Hi, back again. Made a fresh install with al changes back to default. Changed to Headphones and also raspi-config to Headphone. Put the alsamixer back up to over 80 volume output. It defaults on 40 seems a bit low. Also this time the volume stayed up in Retropie menu. Most of the time it gives the 0% mixer bug. Everything back up and running.
I tried to start Munt:
./mt32d -i 12 -d dmix:CARD=Headphones,DEV=0
This did not work.
./mt32d -i 12% -d dmix:CARD=Headphones,DEV=0
With extra '%' like in tutorial. Also nothing
Did also this. Trying full path:
/usr/local/bin/mt32d -i 12 -d dmix:CARD=Headphones,DEV=0
This hangs startup.
Tried putting the extra '%' back:
/usr/local/bin/mt32d -i 12% -d dmix:CARD=Headphones,DEV=0
The same no startup on boot.
Maybe I have to use something with: bcm2835 Headphones. Like it is in aplay devices. Not sure.
No, seems it isn't just right yet. Tried some searching on 'dmix:CARD' but came up short. Surely it is in the right direction.
Thanks.
-
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, runaplay -L
and it should list all of them. -
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 #3So 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.
-
@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
, notaplay -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
-
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 conversionsSome 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...
-
@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. -
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.
-
@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 byaplay -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 withraspi-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 usingraspi-config
or the Audio settings from RetroPie.I'd try removing the
/etc/rc.local
line for startingmunt
and just use SSH to start a new login session on the PI to start manuallymt32
and look at the output. Check by runningaconnect -o
that the
128:0
port is created and it's handled bymt32
before starting a Dosbox game. The output should look similar to the one I posted a few posts back. -
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.
-
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.
-
@whirlinurd Post the contents of your
/etc/rc.local
file, maybe we can figure out why it's not working. -
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...
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.