Strange issue with sound not working in DOSbox and also Ports
-
Hi there. My issue is with audio not working in DOSbox and Ports. The only thing that has changed is upgrading the software (Retropie and ES).
I use a USB soundcard purchased from Amazon which works perfectly fine with all other emulators except DOSbox and Ports (so basically PC software).
I'll say again the audio worked perfectly the last time I tried (which was a couple of months ago).
some further info:
Pi Model or other hardware: Raspberry Pi 400
Power Supply used: Official raspberry pi charger
RetroPie Version Used: 4.8
Built From: Pre made SD Image on RetroPie website
USB Devices connected: USB audio - port1, USB SD card adapter - port 2, Anker USB hub - port 3, mouse & joypad in usb hub
Controller used: Retroflag Classic USB SNES Controller
Error messages received: VolumeControl ::init() failed to find mixer elements
Verbose log (if relevant):
Guide used: (Mention if you followed a guide)
File: (File with issue - with FULL path)
Emulator: Happens with DOSbox and PORTS onlyI have set the usb-audio card as the default. Hope someone has an idea as I'm all out of them.
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
I have set the usb-audio card as the default. Hope someone has an idea as I'm all out of them.
How did you set it as default ? Can you post the configuration for it ?
A log (/dev/shm/runcommand.log
) from runningdosbox
/dosbox-staging
could be useful to see if any audio related errors occur. -
Hi mitu
I created a new config file with these settings:
sudo nano /etc/modprobe.d/alsa-base.conf
options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835I've also been looking at this page: https://retropie.org.uk/docs/Sound-Issues/
I've turned off the on-board sound chip by editing the boot config.txt file and commenting out the dtparam=audio=on and adding the following:
dtparam=audio=off
Of course, now I get no sound at all. Is the cable I'm using just a pass through? I thought it had an audio processor built in. It is a small red cable from Amazon with 'JSAUX' on the female 3.5mm connector end. I guess it's just passing the audio through to the speakers.
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
sudo nano /etc/modprobe.d/alsa-base.conf options snd_usb_audio index=0 options snd_bcm2835 index=1 options snd slots=snd-usb-audio,snd-bcm2835
The
snd_bcm2835
module doesn't support theindex
parameter.I've also been looking at this page: https://retropie.org.uk/docs/Sound-Issues/
I've turned off the on-board sound chip by editing the boot config.txt file and commenting out the dtparam=audio=on and adding the following:
dtparam=audio=off
That should work better than the
alsa
config.Of course, now I get no sound at all. Is the cable I'm using just a pass through? I thought it had an audio processor built in. It is a small red cable from Amazon with 'JSAUX' on the female 3.5mm connector end. I guess it's just passing the audio through to the speakers.
A link to the product page would be useful. Also, if you run
aplay -l
it should list the audio cards present in the system. If the list is empty, then the USB gadget you have is not an USB audio card.
-
running 'aplay -l' I get
**** List of PLAYBACK Hardware Devices ***
Card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0So I guess I just need to find the right settings in emulation station. No combination seems to work properly though.
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
**** List of PLAYBACK Hardware Devices ***
Card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0OK, so there's just one audio card present, so there's no additional settings needed for the emulators/ports (but see below).
So I guess I just need to find the right settings in emulation station. No combination seems to work properly though.
Settings in EmulationStation are only for the front-end itself, they don't set the audio/sound for emulators/ports/etc. Use the Audio menu in the RetroPie system and reset the audio settings to default, this should ensure any previous settings you had are no longer applied.
-
Hi thanks for the reply. So the Audio option in the Retropie menu doesn't work as I've disabled the on-board sound chip. I just get the following error:
On-board audio disabled or not present
Do I have to re-enable it?
I'm also noticing errors before this which show up quickly in the terminal screen:
June 20 16:30:59 lvl0: VolumeControl::Init() - Failed to Attach to default card!
June 20 16:31:00 lvl0: AudioManager error - Unable to open SDL audio: ALSA: Couldn't open audio device: No such file or directory -
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
Do I have to re-enable it?
No. Remove the user config file for ALSA (
$HOME/.asoundrc
) and see if you get proper audio in emulators/ports/etc. -
@mitu said in Strange issue with sound not working in DOSbox and also Ports:
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
Do I have to re-enable it?
No. Remove the user config file for ALSA (
$HOME/.asoundrc
) and see if you get proper audio in emulators/ports/etc.There doesn't seem to be any such file. I did find 'asound.conf' inside the 'etc' directory
Inside this there is:
defaults.pcm.card 1
defaults.ctl.card 1I also seem to have something called 'PulseAudio' installed. Not sure if that is the thing causing problems.
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
.
There doesn't seem to be any such file. I did find 'asound.conf' inside the 'etc' directory
[..]
There is no such file on a default RetroPie install - did you add it yourself ?
I also seem to have something called 'PulseAudio' installed. Not sure if that is the thing causing problems
Yeah, that can cause issues. Did you also installed it yourself ?
-
Yes I believe I installed the Pulse Audio myself a few months ago when I was getting the VolumeControl error then. I remember it did seem to fix the issue but I think I must have still been using the internal sound chip. Shall I remove these from my Retropie system?
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
Shall I remove these from my Retropie system?
Yes, you should. Both PulseAudio and the
.conf
file you mention earlier, it shouldn't be needed. After that, reboot and check that your sound works andalsamixer
can modify the volume. -
@mitu said in Strange issue with sound not working in DOSbox and also Ports:
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
Shall I remove these from my Retropie system?
Yes, you should. Both PulseAudio and the
.conf
file you mention earlier, it shouldn't be needed. After that, reboot and check that your sound works andalsamixer
can modify the volume.Okay I've removed the .conf file as well as the pulse folder from etc. I tried to remove the pulseaudio application but it said no such application was installed.
Still same VolumeControl errors in Retropie though.
-
@reaktor24 said in Strange issue with sound not working in DOSbox and also Ports:
Still same VolumeControl errors in Retropie though.
That's EmulationStation, not RetroPie. Do you have sound/audio in emulators/ports/Dosbox ?
For the error in EmulationStation, you need to set the right Audio settings
- Audio Card: set it to Default
- Audio Device: set it to PCM or Master and see if you still get the error.
If you still get the error, run
aplay -L
and post the output. -
output is as follows:
null
Discard all samples (playback) or generate zero samples (capture)
default
output
sysdefault:CARD=Audio
USB Audio, USB Audio
Default Audio Devicefront:CARD=Audio, DEV=0
USB Audio, USB Audio
Front Speakerssurround21:CARD=Audio, DEV=0
USB Audio, USB Audio
2.1 Surround output to Front and Subwoofer speakerssurround40:CARD=Audio, DEV=0
USB Audio, USB Audio
4.0 Surround output to Front and Rear speakerssurround41:CARD=Audio, DEV=0
USB Audio, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakerssurround50:CARD=Audio, DEV=0
USB Audio, USB Audio
5.0 Surround output to Front, Center and Rear speakerssurround51:CARD=Audio, DEV=0
USB Audio, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakerssurround71:CARD=Audio, DEV=0
USB Audio, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakersiec958:CARD=Audio, DEV=0
USB Audio, USB Audio
IEC958 (S/PDIF) Digital Audio Outputdmix:CARD=Audio, DEV=0
USB Audio, USB Audio
Direct sample mixing devicedsnoop:CARD=Audio, DEV=0
USB Audio, USB Audio
Direct sample snooping devicehw:CARD=Audio, DEV=0
USB Audio, USB Audio
Direct hardware device without any conversionsplughw:CARD=Audio, DEV=0
USB Audio, USB Audio
Hardware device with all software conversions -
You should change the Audio Device in EmulationStation's settings to one of the entries listed by
aplay
. If you the option doesn't show up in the menu, then edites_settings
directly and fill in theAudioDevice
there.front:CARD=Audio, DEV=0
USB Audio, USB Audio
Front Speakerssurround21:CARD=Audio, DEV=0
USB Audio, USB Audio
2.1 Surround output to Front and Subwoofer speakerssurround40:CARD=Audio, DEV=0
USB Audio, USB Audio
4.0 Surround output to Front and Rear speakers
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.