Picade X HAT sound volume too high

I have the nice picade x hat USB C connected to a R Pi 4B.
It is in that nice Cabinet with the 10" screen.

I am running Raspbian GNU/Linux 10, fully updated.
Retropi fully updated (now will work from console and not just from the desktop).

I have reinstalled the picade script with the curl command.
My /etc/asound.conf is the one the picade script installed.

The sound works, but it is too loud.

I see errors about
lv:10: Volume control::init() - Failed to find mixer elements!

alsamixer shows the sound device as
snd_rpi_hifiberry_dac

This sound device does not have any controls.

i2s is disabled in /boot/config.txt
and there are no dtoverlay= and dacs
only
dtoverlay=picade

I can turn the audio off with dtoverlay=picade,noaudio

But I would like to be able to change the volume someother way, preferably to reduce it.
Could just stuff something over it to muffle it but that seems crude!

I have read around and am confused about the different versions of the hats etc.

Can anyone confirm that they have some sort of volume control with this hat?

Thanks

Obvious question first, have you tried changing the volume using the ‘Sound settings’ in the Emulation Station menu?

Yes.

No change there.

Tried all the different settings.

Strange though the volume always shows up as 0% no matter what I set it to the last time I changed it and the speaker will belt out at full volume no matter what the setting in the emulation station sound settings.

The retro pi audio setting throws up alsamixer with the no controls message in my post.

I’m using the previous version of the XHAT, but I think the driver is the same.

All the settings that you mention are the same on my setup - alsamixer shows snd_rpi_hifiberry_dac; in config.txt the i2s lines are commented out, and the only dtoverlay line is the picade one.

I have a line in config.txt that you don’t mention: dtparam=audio=off. This gets added by the picade xhat script, so it should be there.

Try running the picade script using the automatic method (details on the github site https://github.com/pimoroni/picade-hat). This shows you on screen what it does, so it should show you any installation errors.

FYI, in the sounds settings in Emulation Station, the Audio Card should be Default, and the Audio Device shpuld be PCM.

Yes I have dtparam=audio=off

I did the GitHub download and sudo ./install.sh
No errors.

Reboot

Tried with those settings in Emulation station sound menu.

Same result volume always on at full.
When I go back to the es sound settings the volume is always 0 no matter what I set it to the last time.

I see the same error about
lv:10: Volume control::init() - Failed to find mixer elements!

Flash on screen when I start a game.

Are you using a pi 4 with the usb C powered picade xhat? Are you using retro pi on raspbian buster?

I’m using a Pi 3 with a micro USB powered XHAT, and I installed RetroPie 4.5.1 using the pre-made image.

I guess you’re using RetroPie v4.6, but are you using the pre-made image, or installing Raspbian first, then RetroPie manually?

I installed retro pie manually on top of raspbian. That was the only hack to get it running on the pi 4 prior to the recent release of retro pie.

I guess the only thing left to try is the retro pie image install.

Thanks for your suggestions. I will post back when I have tried with the retro pie image. To be honest I am not optimistic :-)

Yippee.
Works with retro pie image. But not with manual install of retro pie on buster.

Now I can reduce volume with Audio menu in emulation station. Wonder what the problem is. Some software issue.

Mark this as mostly solved. Many thanks.

Our of curiosity, have you done an update of the system after this installation using the retropie image?

No update since I downloaded it yesterday. AFAIRecall
Download
Edit config.txt to put in HDMI hotplug.
Put in pi and, plug up and press power (I use pi power socket as the socket on the XHat had broken off before.
Booted up and did the resizing of the partition
Reboot with my keyboard attached
Set input or exit with F4 and use keyboard and console
Set network with sudo raspi-config
curl the picade installation script (it does some apt calls but I can’t remember what they were but there were no errors.)
Reboot
Set input with buttons on cabinet

Pew pew pew (with volume control via es sound menu)

I had the same problem, so I wanted to shed some light on how I fixed it. The culprit was this file:

/home/pi/.asoundrc

I just deleted the contents of the file (you can probably just delete the file altogether) and restarted alsa with this command:

/etc/init.d/alsa-utils restart

The reason why the volume control works perfectly after a fresh install and running the picade-hat script is because the asound.conf file isn’t being interfered by .asoundrc yet. While /etc/asound.conf is the global alsa confit file, /home/pi/.asoundrc is the local config file that is applied over the global config for each user. Somewhere down the line while using your raspberry pi, you create the .asoundrc file, which messed up the volume control on your Picade setup. I suspect using the pixel desktop introduced this problem, but I don’t know for certain. Like you, my volume was stuck at 100% as well, but now I can finally put this problem behind me.

Here are the resources that helped me with this issue (I had to do some deep digging to stumble upon these):



The github page for asound.conf “/fd0/ddc3ad21e1ae77242628” <- I cant post the link because new users can only post up to 2 links in a post at a time.
1 Like

I’m having the same issue here. I used Retropie 4.7.1, Raspberry Pi 4.

I’m assuming pimoroni has not yet tested their install scripts with Retropie 4.7.1, will try lower version of Retropie

I’m having this issue too - brand new 8-inch Picade with fresh ‘install’ of RetroPie 4.7.1 on a Raspberry Pi 3.

The audio settings in RetroPie say there is no card or it is disabled. As above, i’m seeing errors like “lv:10: Volume control::init() - Failed to find mixer elements!”.

I can’t use @porkyschmorky’s solution to delete /home/pi/.asoundrc as it doesn’t exist.

Did you get anywhere with resolving this @andrewmagerman?

Just adding to this, I have three Pi4s (2x4GB and 1x8GB) and three X HAT Usb-C units. With my older and heavily customized Virtualman and SupremeTeam RetroPie builds, I have the volume controls working perfectly from the Sound menu inside EmulationStation.

On a new Wolfanoz SupremeTeam build (Retropie 4.7.1/ Linux 5.4.72-v71+) The X hat software is installed correctly as per the other two Pis, my config.txt is spot on and identical. None of the audio adjustments work inside ES, the speaker in the Picade just blasts at maximum volume

When I close ES, I have at least 5-6 of the ““lv:10: Volume control::init() - Failed to find mixer elements!”” errors.

From some other threads on the Tinterweb, I have done the following checks to query the audio setup on the 4.7.1 build -

root@retropie:~# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pc                            m5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


root@retropie:~# amixer scontrols -D sndrpihifiberry

ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL sndrpihifiberry
amixer: Mixer attach sndrpihifiberry error: No such file or directory


root@retropie:~# amixer
root@retropie:~#


root@retropie:~# alsamixer

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq AlsaMixer v1.1.8 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Card: snd_rpi_hifiberry_dac                          F1:  Help               x
x Chip:                                                F2:  System information x
x View: F3: Playback  F4: Capture  F5: All             F6:  Select sound card  x
x Item:                                                Esc: Exit               x
x                                                                              x
x                                                                              x
x                                                                              x
x                This sound device does not have any controls.                 x

This does have me thinking that there is an issue with the software for the Picade Hat X and latest RetroPie/Linux build?

Hi @mrfootlong, thanks for that - i’ll try those commands on mine and see what output I get.

What version of RetroPie are your other two machines using btw? Does the output of the aplay and amixer commands look the same on those?

Same problem here - I bought usb-c hat months ago to upgrade my old one as I wanted to run on a pi4 and got around to installing this weekend, and seeing this problem - my teenage kids were not happy to hear pac man loud enough to wake the dead in the morning on Sunday!

I tried the earlier suggestions in this thread with no luck. Running Retropie image 4.7.1 burned using raspberry imager 1.3

I get the same output as @mrfootlong:
Last login: Mon Dec 7 23:41:08 2020

pi@picade4:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry         DAC HiFi pcm5102a-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@picade4:~ $ amixer scontrols -D sndrpihifiberry
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL sndrpihifiberry
amixer: Mixer attach sndrpihifiberry error: No such file or directory
pi@picade4:~ $

Fired up one of them, the RetroPie base under the SupremTeam/Virtualman mods is 4.6. Query results below -

root@retropie:~# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pc                          m5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


root@retropie:~# amixer scontrols -D sndrpihifiberry

ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL sndrpihifiberry
amixer: Mixer attach sndrpihifiberry error: No such file or directory


root@retropie:~# amixer

Simple mixer control 'PCM',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 79 [31%]
  Front Right: 79 [31%]


root@retropie:~# alsamixer

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq AlsaMixer v1.1.8 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Card: snd_rpi_hifiberry_dac                                                    F1:  Help               x
x Chip:                                                                          F2:  System information x
x View: F3:[Playback] F4: Capture  F5: All                                       F6:  Select sound card  x
x Item: PCM                                                                      Esc: Exit               x
x                                                                                                        x
x                                                                                                        x
x                                                                                                        x
x                                                                                                        x
x                                                  lqqk                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  x  x                                                  x
x                                                  xaax                                                  x
x                                                  xaax                                                  x
x                                                  xaax                                                  x
x                                                  xaax                                                  x
x                                                  xaax                                                  x
x                                                  xaax                                                  x
x                                                  mqqj                                                  x
x                                                 31<>31                                                 x
x                                               <  PCM   >                                               x
x                                                                                                        x
x                                                                                                        x
x                                                                                                        x
x                                                                                                        x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Haha - my problem too, but roles reversed; it’s the kids wanting to play it on a Sunday morning. 😁

Thanks - i’ll compare my output with this.

@newtonheath @mrfootlong

I’ve just come across this post on the RetroPie forum and am hoping there’s something useful in it: