Volume control not working HiFiBerry MINI-AMP + Retropi 4.4 + RaspberryPi 3B - lvl0: Volume control::inint() - Failed to find mixer elements
-
Dear people,
So, I built a while back a "tablet" made of a rapsberry Pi 3B using a HifiBerry MINI-AMP hat and installed retropi 4.4 on it last week.
I got sound to work perfectly, but no volume controls. So when I play something it is at volume 100% and therefore extremelyyyyyyyyy lound
The error stays: lvl0: Volume control::inint() - Failed to find mixer elementsI tried all these manuals:
https://www.hifiberry.com/build/documentation/configuring-linux-3-18-x/
https://retropie.org.uk/docs/Sound-Issues/#adding-custom-audio-card-audio-device-or-omx-player-audio-deviceThen I changed the asaound.conf values to these two versions:
https://retropie.org.uk/forum/topic/4417/volume-control-for-dac-hifiberry-devices-i2s-devicesStill no luck....
Then also tried to modify audio_device = "" in /opt/retropie/configs/all/retroarch.cfg, still no luck
https://retropie.org.uk/forum/topic/6230/solved-usb-audio-dongle-have-no-sound-in-emulators/6So far my search then when without any new info, both here, google, anywhere...
Is there anybody with this similar Amp and problems? What am I missing?
Thanks so much in advance!
-
If you use the
alsamixer
audio mixer (from the command line), does it work to set the volume ? -
Dear Mitu,
Thank you for your reply.
I'm not that sure what you mean, since all settings are made so it's handled by Alsa?
Sorry, I'm actually quite new to linux command line, but I try to find as much as possible on my own.At the moment I changed the etc/alsoun.conf from:
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}to
pcm.hifiberry {
type softvol
slave.pcm "plughw:0"
control.name "PCM"
control.card 0
}pcm.!default {
type plug
slave.pcm "hifiberry"
}ctl.!default {
type hw
card 0
}Now, when i go to retropi -> audio -> mixer
I now can set the PCM volume and its finally manageble.Still, the settings wont stick in the main menu when I hit the start button on the controller and then move to sound.
There the volume is still 0%, audiocard is set to default, audio device to PCM, OMX player to Alsa:HW:0,0.The error message lvl0: Volume control::inint() - Failed to find mixer elements still pops up in command line. Also ingame sound of N64 is not working (only tested mariokart 64)
Is this problem because retropie 4.4 is too new??
-
-
@cyperghost , tnx, looks like the same kind of project. Did you do it with the 4.3 or 4.4 version of the image? In 4.3 it was for example easy to make it work with Xbox one wireless controllers, now I have to remove xpad and install a different driver... Not sure what is new/the problem/what I'm doing wrong...
-
@Dutch87 I think it was 4.2 or maybe 4.3 of RetroPie .... 100% a Jessie build.
Maybe this will help you ....
https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/raspberry-pi-usageThe setup instructions from adafruit had massivly changed.
-
@cyperghost Well will you look at that! Nothing to be found on the origional hifiberry site. Thanks! Im going to test is later tomorrow :D
-
Thanks so much!
So now in retropie the sound AND the volume work perfect after this setup script!!!
Playing Quake 3 Arena and using steamLink work perfect with the lower sound volume.Also no error message anymore.
But.... No sound in N64 emulator. Other emulators not tried yet.
Any ideas on this???
-
@cyperghost Did you got it to work also with nintendo 64?
Here all sound works except with nintendo 64 :(....
Anybody? Searching and trying for a while without succes. THanks!
-
For future internet reference........
That 'lv10 Volume Control: Failed to find mixer" error is the cryptic message that Emulationstation gives when it cannot find the Audio Mixer on the selected Audio Card. You can find more information about that in the Sound Troubleshooting instructions I wrote on the Retropie website
To solve this, we need to figure out what the name of the Audio Card is, and the name of the Audio Mixer on the Audio Card, so that we're able to correctly reference them from within Emulationstation.
Firstly, you can run
aplay -l
to get a list of the Audio Cards that ALSA recognises. You should get something like this (this is for an ODROID):odroid@odroid64:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S.27 dit-hifi-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0
(You may have different results, just take note of the the HDMI audio card name and keep it for later.)
In our example we have an Audio Card named 'ODROIDHDMI', which is not an Audio Card type that is in the built-in list of Audio Cards in Emulationstation.
The second thing we need to do is figure out what the audio mixers are available on the audio card. For my example I run the
amixer scontrols -D ODROIDHDMI
command, which will show you the names of the audio mixers on the ODROIDHDMI audio card. Replace the ODROIDHDMI name with the name of your Audio Card you just got above. Based on my research you should see something similar to this:Simple mixer control 'Analogue',0 Simple mixer control 'Deemphasis',0 Simple mixer control 'Digital',0
(Again, you may have different results, just take note of them and modify the command below as needed.)
Take a note of the names of the all the Audio mixers on that Audio Card as we'll need them later.
The next step is figuring out which audio mixer from that list actually controls the volume. On my Rpi Justboom DAC HAT, its the 'Digital' mixer. You will need to experiment to see what works for you. To test the audio mixer, you need to first make a noise out the HDMI, and then second use amixer to adjust the various mixers until you figure out which one changes the volume of the HDMI.
- To make a sound out the audio device you can use
speaker-test -D ODROIDHDMI -t wav -l 20 &
to run the speaker test 20 times in a loop (and go into the background) (replace ODROIDHDMI with the name of your Audio Card you got in step 1). - You quickly then run
alsamixer
to get a nice GUI for the ALSA mixer, which you can then use to adjust the various audio mixer devices on the audio card
At the end of that testing you should know the Audio Card name, and the Audio Mixer name on that card that controls the volume.
For our example, lets say the 'Digital' mixer on the ODROIDHDMI is the one that controls the volume.
So now we need to tell emulationstation how to use these new cards.
As mentioned earlier 'ODROIDHDMI' is not an Audio Card type that is in the built-in list of Audio Cards in Emulationstation. Luckily this isn't an issue for us, as the patch I added to emulationstation last year allows you to add a Custom Audio Card, and a Custom Audio Mixer (the audio mixer is called an 'Audio Device' in emulationstation).
To add a Custom Audio Card just follow these instructions and replace the
<string name="AudioCard" value="default" />
line in the es_settings.cfg file with<string name="AudioCard" value="ODROIDHDMI" />
. This should allow emulationstation to successfully look for an use the ODROIDHDMI Audio Card.To add a Custom Audio Mixer just follow these other instructions and modify the
<string name="AudioDevice" value="Digital" />
line in the es_settings.cfg file so that Digital is changed to the Audio Mixer name you discovered above with your alsamixer testing.Please note that if you change the Audio Card or Audio Device settings from within the Emulationstation GUI at any stage, you will lose your custom settings, and you will need to readd them in es_settings.cfg again as described above.
With the combination of settings above you should be getting sound when you go into emulationstation.
Hope that helps people avoid these problems again!
Cheers
Tminit - To make a sound out the audio device you can use
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.