4

I installed my Pi 3B into a Pimoroni Picade a few months ago, and installed RetroPie from source (as a fresh install). After running the Pimoroni-supplied setup script, RetroPie, EmulationStation etc were all working fine. Many happy hours of nostalgia followed!

The Picade has its own HAT and physical speaker, and I could set the system volume from within EmulationStation, and also within each of the emulators. I had the volume set at 49%.

Fast forward a few months, and I decided to try playing around with a USB headset connected to the Pi, and using the “Desktop” environment included with RetroPie. I plugged in the headset - a fairly cheap-and-cheerful Creation gaming heading - configured the Desktop to use the USB headset, tested it all worked (which it did) and thought no more of it.

However, since disconnecting the headset and returning to using the Picade speakers, I’m unable to change the system volume. It sounds like it’s set to 100% volume - i.e. too loud - despite me changing the setting in the ES settings, alsamixer, RetroPie config, and even in the Desktop environment itself. Regardless of whether I set the volume to 1% or 100%, nothing actually changes the speaker volume. I can adjust the volume within RetroArch via hotkeys, but this isn’t ideal (especially for games that start noisy).

alsamixer and amixer output look OK, at least to my untrained eye:

enter image description here

pi@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: 124 [49%]
  Front Right: 124 [49%]

However, this output:

pi@retropie:~ $ amixer controls
numid=1,iface=MIXER,name='PCM'

compared to some others I've seen seems to be missing any mention of volume controls - is that perhaps the issue, and how can I restore the ability to set the volume?

EDIT: As requested:

$ cat /proc/asound/cards /proc/asound/devices /proc/asound/pcm /proc/asound/modules
 0 [sndrpihifiberry]: HifiberryDac - snd_rpi_hifiberry_dac
                      snd_rpi_hifiberry_dac
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 33:        : timer
00-00: HifiBerry DAC HiFi pcm5102a-hifi-0 :  : playback 1
 0 snd_soc_hifiberry_dac

EDIT2: Further info

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

Output is the same when ran without sudo.

$ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

EDIT3: The Picade install script outputs the following when it's rerun -

Checking hardware requirements...

Checking for packages required for GPIO control...
raspi-gpio is already installed

Checking for dependencies...
alsa-utils is already installed
lsb-release is already installed

Github repo already present. Updating...
Already up-to-date.

Finalising Install...

Picade HAT: Installer

Installed: /boot/overlays/picade.dtbo
Warning: /etc/udev/rules.d/10-picade.rules already exists, not replacing!
Warning: /etc/asound.conf already exists, not replacing!
Config: Skipped "dtoverlay=picade", already exists in /boot/config.txt
Config: Skipped "dtparam=audio=off", already exists in /boot/config.txt
Config: Skipped "hdmi_force_hotplug=1", already exists in /boot/config.txt
Installation finished. You must reboot for changes to take effect!
  • Can you run this command and show us what it says: cat /proc/asound/cards /proc/asound/devices /proc/asound/pcm /proc/asound/modules – Ronny Nilsson Jul 30 at 21:25
  • @RonnyNilsson: Yep, added above – KenD Jul 31 at 7:44
  • Have you read the instructions at: hifiberry.com/build/documentation/… – Dougie Aug 1 at 20:37
  • @Dougie: I have now - unfortunately nothing there has made any difference; the ALSA binaries were already installed, and the command lines don't seem to make any difference :( – KenD Aug 2 at 9:32
  • Try building a new Raspbian Buster SDCard and see if that makes anything better. – Dougie Aug 2 at 11:39
2
+25

Your DAC plays through the Digital channel. It looks like your mixer is setup to control the PCM output, not Digital. But because you have selected as your audio device, it still plays, but can't control the volume etc.

Might be easy as going into your OS desktop (Raspbian) -> Preferences -> Audio Device Settings, Select your DAC sound device from the Sound Card pulldown selector, then click Select Controls... Choose Digital or Master if available.

If that doesn't help then please read on...

Abstract: You will need to set the HAT device as default audio device in OS audio settings, and setup your ALSA mixer to control the digital.

The PCM is probably trying to mix the RPi audio 3.5 jack output, where you may need to have your mixer select which output to mix to, maybe Master or Digital perhaps.

Please have a look at this link provided that runs through various scenarios to RetroPi sound problems.

https://github.com/retropie/RetroPie-Setup/wiki/Sound-Issues

Once you verify your HAT's audio device is there and selected as default by your OS and ES sound settings, you may need to select which mixer to control your audio device. Make sure it's selected in your ES audio settings, if can.

You may need to edit your es_settings.cfg file...

If you want to try to select the DAC as default audio device in your OS, and try to add these changes to the existing settings (BACKUP your config first obviously),

 <string name="AudioCard" value="default" />
 <string name="AudioDevice" value="Digital" />

Give that a try and see if you gain control over the volume.

  • In the desktop, the only sound card available is snd_rpi_hifiberry_dac (Alsa_mixer). "Select Controls" only shows me PCM as an option (which is selected). Even within the desktop environment itself, I can't control the volume - e.g. when visiting YouTube via the web browser, the volume is 100% even though it's set to 40% via the control panel. I've tried editing es_settings.cfg too, to no avail :( – KenD Aug 1 at 10:49
  • Can you please list the complete output of aplay -l. What's your kernel version? What do the above outputs you posted return when done by root user vs regular user? – mrSidX Aug 2 at 7:47
  • more info added to OP. I also tried replugging the USB headset in, and volume controls work fine on that - it seems to be the Hifiberry "card" that I can't control any more. – KenD Aug 2 at 9:31
  • just curious if you followed the install steps for the hifiberry since after the issue? and the reverse of the install of headset? assuming there were manual changes made to config files etc... and just to clarify, the controls work WITH the USB headset when plugged its plugged in, but issue persists when USB headset is removed? – mrSidX Aug 2 at 9:39
  • I didn't have to explicitly install the hifiberry stuff; part of the Picade install involves downloading and running a script, which (I presume, as it was working before) installs the required drivers, binaries and config. And yes - with the headset plugged in, I can control the volume on the headset, but whether it's plugged in or not I can't control the volume on the hifiberry speaker. – KenD Aug 2 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.