Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Hardware Volume on RPi DigiAMP+ and DAC Pro
#1
Hello,

I'm trying to get the hardware volume to work on my Raspberry Pi 3 with the DigiAMP+. For one, the old IQaudIO guide states that I should use hardware volume. But also I need it for multiroom.

However, when switching to hardware volume, I experience a strange behavior:
  • Volume 0-49 results in -6dB
  • Volume 50 and up results in 0dB
So basically always extremely loud.

When I export the moOde settings with moodeutl I see that the amixname is set to Analogue.

When I run the alsamixer -c 1 (1 is the DigiAMP+ card), I see the Analogue mixer behaves exactly as described above: jumping only between -6dB and 0dB. However, there is also a Digital mixer which behaves very nicely.

This brings me to my question: How can I switch the mixer?

I experience the exact same behavior with the DAC Pro.

Here is the output of moodeutl -l:


Code:
20250201 205854 worker: --
20250201 205854 worker: -- Start moOde 9 series
20250201 205854 worker: --
20250201 205854 worker: Daemonize:     complete
20250201 205854 worker: Linux startup: complete
20250201 205854 worker: Boot config:   ok
20250201 205854 worker: Boot folder:   ok
20250201 205854 worker: Radio table:   ok
20250201 205856 worker: PHP session:   cleaned
20250201 205856 worker: PHP session:   loaded
20250201 205900 worker: Package locks: applied
20250201 205902 worker: File check:    complete
20250201 205902 worker: Log to RAM:    on
20250201 205902 worker: Debug logging: off
20250201 205902 worker: --
20250201 205902 worker: -- System
20250201 205902 worker: --
20250201 205905 worker: Host name:     [removed]
20250201 205905 worker: RPi model:     Pi-3A+ 1.1 512MB
20250201 205905 worker: moOde release: 9.2.3 2025-01-21
20250201 205905 worker: RaspiOS:       12.9 Bookworm 64-bit
20250201 205905 worker: Linux Kernel:  6.6.62 64-bit
20250201 205905 worker: MPD version:   0.23.14
20250201 205905 worker: User id:       [removed]
20250201 205905 worker: Home folder:   [removed]
20250201 205905 worker: Time zone:     Europe/Vienna
20250201 205905 worker: Kbd layout:    de
20250201 205905 worker: HDMI ports(s): on
20250201 205905 worker: HDMI-CEC:      off
20250201 205905 worker: Sys LED0:      on
20250201 205905 worker: Sys LED1:      on
20250201 205905 worker: Reduce power:  n/a
20250201 205905 worker: Fan control:   n/a
20250201 205905 worker: CPU governor:  ondemand
20250201 205905 worker: Integ audio:   vc4-kms-v3d
20250201 205905 worker: --
20250201 205905 worker: -- Network
20250201 205905 worker: --
20250201 205905 worker: Eth0
20250201 205905 worker: Ethernet: adapter does not exist
20250201 205905 worker: Wlan0
20250201 205905 worker: Wireless: adapter exists
20250201 205905 worker: Wireless: country AT
20250201 205905 worker: Wireless: SSID    [removed]
20250201 205905 worker: Wireless: other   None
20250201 205905 worker: Wireless: timeout up to 90 secs
20250201 205906 worker: Wireless: connect to [removed]
20250201 205906 worker: Wireless: method  dhcp
20250201 205906 worker: Wireless: address 192.168.1.33
20250201 205906 worker: Wireless: netmask 255.255.255.0
20250201 205906 worker: Wireless: gateway 192.168.1.1
20250201 205906 worker: Wireless: pri DNS 192.168.1.10
20250201 205906 worker: Wireless: domain  [removed]
20250201 205906 worker: --
20250201 205906 worker: -- File sharing
20250201 205906 worker: --
20250201 205906 worker: SMB file sharing:  off
20250201 205906 worker: SMB password:      none
20250201 205906 worker: NFS file sharing:  off
20250201 205906 worker: DLNA file sharing: off
20250201 205906 worker: --
20250201 205906 worker: -- Special configs
20250201 205906 worker: --
20250201 205906 worker: Plexamp:          not installed
20250201 205906 worker: RoonBridge:       not installed
20250201 205906 worker: Allo Boss 2:      not detected, OLED script ok
20250201 205906 worker: Allo Piano 2.1:   not detected
20250201 205906 worker: IQaudIO AMP*:     not detected
20250201 205906 worker: Bluetooth:        session vars ok
20250201 205906 worker: --
20250201 205906 worker: -- ALSA debug
20250201 205906 worker: --
20250201 205906 worker: Cards:  0:vc4hdmi         1:DigiAMP         2:empty           3:empty           
20250201 205906 worker:         4:empty           5:empty           6:empty           7:empty           
20250201 205906 worker: Mixers: 0:none            1:(Digital)       2:none            3:none            
20250201 205906 worker:         4:none            5:none            6:none            7:none            
20250201 205906 worker: --
20250201 205906 worker: -- Audio configuration
20250201 205906 worker: --
20250201 205906 worker: Audio device:  1:RPi DigiAMP+
20250201 205906 worker: ALSA card:     has not been reassigned
20250201 205906 worker: MPD config:    update not needed
20250201 205907 worker: ALSA output:   USB
20250201 205907 worker: ALSA mode:     Default (plughw)
20250201 205907 worker: ALSA mixer:    Analogue
20250201 205907 worker: ALSA volume:   100% (0.00dB)
20250201 205907 worker: ALSA maxvol:   20%
20250201 205907 worker: ALSA loopback: off
20250201 205907 worker: MPD mixer      Hardware
20250201 205907 worker: Audio formats: S16_LE, S24_LE, S32_LE
20250201 205907 worker: CamillaDSP:    off
20250201 205907 worker: CDSP volume:   0dB
20250201 205907 worker: CDSP volrange: 60dB
20250201 205907 worker: --
20250201 205907 worker: -- MPD startup
20250201 205907 worker: --
20250201 205908 worker: MPD service:        started
20250201 205908 worker: MPD port 6600:      accepting connections
20250201 205908 worker: MPD ALSA Default:   on
20250201 205908 worker: MPD ALSA Bluetooth: off
20250201 205908 worker: MPD HTTP Server:    off
20250201 205908 worker: MPD volume:         64
20250201 205908 worker: Saved MPD vol:      -1
20250201 205908 worker: Saved SRC vol:      0
20250201 205908 worker: MPD crossfade:      off
20250201 205908 worker: MPD ignore CUE:     no
20250201 205908 worker: MPD CDSP volsync:   off
20250201 205908 worker: --
20250201 205908 worker: -- Music sources
20250201 205908 worker: --
20250201 205908 worker: USB drives:     none
20250201 205908 worker: NVMe drives:    none
20250201 205908 worker: SATA drives:    none
20250201 205908 worker: NAS sources:    none
20250201 205908 worker: --
20250201 205908 worker: -- Feature availability
20250201 205908 worker: --
20250201 205908 worker: Input select:    available, Source: MPD, Output: RPi DigiAMP+
20250201 205908 worker: Bluetooth:       available, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20250201 205908 worker: AirPlay:         available
20250201 205908 worker: Spotify Connect: started
20250201 205908 worker: Deezer Connect:  available
20250201 205908 worker: Squeezelite:     available
20250201 205908 worker: UPnP client:     available
20250201 205908 worker: Plexamp:         not installed, ALSA maxvol: 100%
20250201 205908 worker: RoonBridge:      not installed
20250201 205908 worker: Multiroom:       available
20250201 205908 worker: GPIO buttons:    available
20250201 205908 worker: Stream recorder: n/a
20250201 205908 worker: --
20250201 205908 worker: -- Security
20250201 205908 worker: --
20250201 205908 worker: Web SSH server:    off
20250201 205908 worker: XSS detection:     off
20250201 205908 worker: HTTPS mode:        available
20250201 205908 worker: --
20250201 205908 worker: -- Peripherals
20250201 205908 worker: --
20250201 205927 worker: Local display:   off
20250201 205927 worker: Chromium ver:    126.0.6478.164-rpt1
20250201 205927 worker: Chromium cfg:    directory ok
20250201 205927 worker: Screen blank     600
20250201 205927 worker: On-screen kbd:   off
20250201 205927 worker: Disable GPU:     off
20250201 205927 worker: HDMI orient:     landscape
20250201 205927 worker: HDMI 4K 60Hz:    off
20250201 205927 worker: DSI scn type:    none
20250201 205927 worker: DSI port:        1
20250201 205927 worker: DSI brightness:  255
20250201 205927 worker: DSI rotate:      0
20250201 205927 worker: Rotary encoder:  off
20250201 205927 worker: USB volume knob: off
20250201 205927 worker: LCD updater:     off
20250201 205927 worker: --
20250201 205927 worker: -- Miscellaneous
20250201 205927 worker: --
20250201 205927 worker: Software update:   Automatic check on
20250201 205927 worker: Software update:   Checking for available update...
20250201 205928 worker: Software update:   Software is up to date
20250201 205928 worker: Auto-CoverView:    off
20250201 205928 worker: CoverView timeout: Never
20250201 205928 worker: Auto-shuffle:      off
20250201 205928 worker: Auto-play:         off
20250201 205928 worker: Maintenance task:  360 mins
20250201 205928 worker: Current view:      reset to Playback
20250201 205928 worker: Active flags:      all false
20250201 205928 worker: Reset flags:       skipped
20250201 205929 worker: Session check:     ok
20250201 205929 worker: --
20250201 205929 worker: -- Startup complete
20250201 205929 worker: --
20250201 205929 worker: Mount monitor:    started
20250201 205929 worker: Radio monitor:    off
20250201 205929 worker: Watchdog monitor: started
20250201 205929 worker: Responsiveness:   Default
20250201 205929 worker: Ready
20250201 210936 worker: Job mpdcfg
Reply
#2
This section shows some breakage.

20250201 205906 worker: Audio device:  1:RPi DigiAMP+
20250201 205906 worker: ALSA card:     has not been reassigned
20250201 205906 worker: MPD config:    update not needed
20250201 205907 worker: ALSA output:   USB

In Audio Config did you set "Named I2S device" to "Raspberry Pi DigiAMP+" ??
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(02-01-2025, 09:52 PM)Tim Curtis Wrote: In Audio Config did you set "Named I2S device" to "Raspberry Pi DigiAMP+" ??

No, I did not set "Named I2S device" (see first screenshot). Everything was working fine with software volume but not hardware volume (as explained above).

I tried setting  "Named I2S device" to "Raspberry Pi DigiAMP+"  (see second screenshot). Now I don't have any audio output at all.

Again, I attach the log for after setting the I2S device:


Code:
20250202 120543 worker: --
20250202 120544 worker: -- Start moOde 9 series
20250202 120544 worker: --
20250202 120544 worker: Daemonize:     complete
20250202 120550 worker: Linux startup: complete
20250202 120550 worker: Boot config:   ok
20250202 120550 worker: Boot folder:   ok
20250202 120550 worker: Radio table:   ok
20250202 120552 worker: PHP session:   cleaned
20250202 120552 worker: PHP session:   loaded
20250202 120557 worker: Package locks: applied
20250202 120558 worker: File check:    complete
20250202 120558 worker: Log to RAM:    on
20250202 120558 worker: Debug logging: off
20250202 120558 worker: --
20250202 120558 worker: -- System
20250202 120558 worker: --
20250202 120600 worker: Host name:     [removed]
20250202 120600 worker: RPi model:     Pi-3A+ 1.1 512MB
20250202 120601 worker: moOde release: 9.2.3 2025-01-21
20250202 120601 worker: RaspiOS:       12.9 Bookworm 64-bit
20250202 120601 worker: Linux Kernel:  6.6.62 64-bit
20250202 120601 worker: MPD version:   0.23.14
20250202 120601 worker: User id:       [removed]
20250202 120601 worker: Home folder:   [removed]
20250202 120601 worker: Time zone:     Europe/Vienna
20250202 120601 worker: Kbd layout:    de
20250202 120601 worker: HDMI ports(s): on
20250202 120601 worker: HDMI-CEC:      off
20250202 120601 worker: Sys LED0:      on
20250202 120601 worker: Sys LED1:      on
20250202 120601 worker: Reduce power:  n/a
20250202 120601 worker: Fan control:   n/a
20250202 120601 worker: CPU governor:  ondemand
20250202 120601 worker: Integ audio:   vc4-kms-v3d
20250202 120601 worker: --
20250202 120601 worker: -- Network
20250202 120601 worker: --
20250202 120601 worker: Eth0
20250202 120601 worker: Ethernet: adapter does not exist
20250202 120601 worker: Wlan0
20250202 120601 worker: Wireless: adapter exists
20250202 120601 worker: Wireless: country AT
20250202 120601 worker: Wireless: SSID    [removed]
20250202 120601 worker: Wireless: other   None
20250202 120601 worker: Wireless: timeout up to 90 secs
20250202 120602 worker: Wireless: connect to [removed]
20250202 120602 worker: Wireless: method  dhcp
20250202 120602 worker: Wireless: address 192.168.1.33
20250202 120602 worker: Wireless: netmask 255.255.255.0
20250202 120602 worker: Wireless: gateway 192.168.1.1
20250202 120602 worker: Wireless: pri DNS 192.168.1.10
20250202 120602 worker: Wireless: domain  [removed]
20250202 120602 worker: --
20250202 120602 worker: -- File sharing
20250202 120602 worker: --
20250202 120602 worker: SMB file sharing:  off
20250202 120602 worker: SMB password:      none
20250202 120602 worker: NFS file sharing:  off
20250202 120602 worker: DLNA file sharing: off
20250202 120602 worker: --
20250202 120602 worker: -- Special configs
20250202 120602 worker: --
20250202 120602 worker: Plexamp:          not installed
20250202 120602 worker: RoonBridge:       not installed
20250202 120602 worker: Allo Boss 2:      not detected, OLED script ok
20250202 120602 worker: Allo Piano 2.1:   not detected
20250202 120602 worker: IQaudIO AMP*:     not detected
20250202 120602 worker: Bluetooth:        session vars ok
20250202 120602 worker: --
20250202 120602 worker: -- ALSA debug
20250202 120602 worker: --
20250202 120602 worker: Cards:  0:vc4hdmi         1:DigiAMP         2:empty           3:empty          
20250202 120602 worker:         4:empty           5:empty           6:empty           7:empty          
20250202 120602 worker: Mixers: 0:none            1:(Digital)       2:none            3:none            
20250202 120602 worker:         4:none            5:none            6:none            7:none            
20250202 120602 worker: --
20250202 120602 worker: -- Audio configuration
20250202 120602 worker: --
20250202 120602 worker: Audio device:  1:Raspberry Pi DigiAMP+
20250202 120602 worker: ALSA card:     has not been reassigned
20250202 120602 worker: MPD config:    update not needed
20250202 120603 worker: ALSA output:   I2S
20250202 120603 worker: ALSA mode:     Default (plughw)
20250202 120603 worker: ALSA mixer:    Digital
20250202 120615 worker: ALSA volume:   100% (0.00dB)
20250202 120615 worker: ALSA maxvol:   100%
20250202 120615 worker: ALSA loopback: off
20250202 120615 worker: MPD mixer      Software
20250202 120616 worker: Audio formats: S16_LE, S24_LE, S32_LE
20250202 120616 worker: CamillaDSP:    off
20250202 120616 worker: CDSP volume:   0dB
20250202 120616 worker: CDSP volrange: 60dB
20250202 120616 worker: --
20250202 120616 worker: -- MPD startup
20250202 120616 worker: --
20250202 120616 worker: MPD service:        started
20250202 120616 worker: MPD port 6600:      accepting connections
20250202 120617 worker: MPD ALSA Default:   on
20250202 120617 worker: MPD ALSA Bluetooth: off
20250202 120617 worker: MPD HTTP Server:    off
20250202 120617 worker: MPD volume:         34
20250202 120617 worker: Saved MPD vol:      -1
20250202 120617 worker: Saved SRC vol:      0
20250202 120617 worker: MPD crossfade:      off
20250202 120617 worker: MPD ignore CUE:     no
20250202 120617 worker: MPD CDSP volsync:   off
20250202 120617 worker: --
20250202 120617 worker: -- Music sources
20250202 120617 worker: --
20250202 120617 worker: USB drives:     none
20250202 120617 worker: NVMe drives:    none
20250202 120617 worker: SATA drives:    none
20250202 120617 worker: NAS sources:    none
20250202 120617 worker: --
20250202 120617 worker: -- Feature availability
20250202 120617 worker: --
20250202 120617 worker: Input select:    available, Source: MPD, Output: Raspberry Pi DigiAMP+
20250202 120617 worker: Bluetooth:       available, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20250202 120617 worker: AirPlay:         available
20250202 120617 worker: Spotify Connect: started
20250202 120617 worker: Deezer Connect:  available
20250202 120617 worker: Squeezelite:     available
20250202 120617 worker: UPnP client:     available
20250202 120617 worker: Plexamp:         not installed, ALSA maxvol: 100%
20250202 120617 worker: RoonBridge:      not installed
20250202 120617 worker: Multiroom:       available
20250202 120617 worker: GPIO buttons:    available
20250202 120617 worker: Stream recorder: n/a
20250202 120617 worker: --
20250202 120617 worker: -- Security
20250202 120617 worker: --
20250202 120617 worker: Web SSH server:    off
20250202 120617 worker: XSS detection:     off
20250202 120617 worker: HTTPS mode:        available
20250202 120617 worker: --
20250202 120617 worker: -- Peripherals
20250202 120617 worker: --
20250202 120624 worker: Local display:   off
20250202 120624 worker: Chromium ver:    126.0.6478.164-rpt1
20250202 120624 worker: Chromium cfg:    directory ok
20250202 120624 worker: Screen blank     600
20250202 120624 worker: On-screen kbd:   off
20250202 120624 worker: Disable GPU:     off
20250202 120624 worker: HDMI orient:     landscape
20250202 120624 worker: HDMI 4K 60Hz:    off
20250202 120624 worker: DSI scn type:    none
20250202 120624 worker: DSI port:        1
20250202 120624 worker: DSI brightness:  255
20250202 120624 worker: DSI rotate:      0
20250202 120624 worker: Rotary encoder:  off
20250202 120624 worker: USB volume knob: off
20250202 120624 worker: LCD updater:     off
20250202 120624 worker: --
20250202 120624 worker: -- Miscellaneous
20250202 120624 worker: --
20250202 120624 worker: Software update:   Automatic check on
20250202 120624 worker: Software update:   Checking for available update...
20250202 120625 worker: Software update:   Software is up to date
20250202 120625 worker: Auto-CoverView:    off
20250202 120625 worker: CoverView timeout: Never
20250202 120625 worker: Auto-shuffle:      off
20250202 120625 worker: Auto-play:         off
20250202 120625 worker: Maintenance task:  360 mins
20250202 120625 worker: Current view:      reset to Playback
20250202 120625 worker: Active flags:      at least one true
20250202 120625 worker: Reset flags:       all reset to false
20250202 120625 worker: MPD volume:        set to 0
20250202 120625 worker: Session check:     ok
20250202 120625 worker: --
20250202 120625 worker: -- Startup complete
20250202 120625 worker: --
20250202 120625 worker: Mount monitor:    started
20250202 120625 worker: Radio monitor:    off
20250202 120626 worker: Watchdog monitor: started
20250202 120626 worker: Responsiveness:   Default
20250202 120626 worker: Ready
20250202 120705 worker: Job spotifysvc


Attached Files Thumbnail(s)
       
Reply
#4
The audio configuration in the log looks ok. These AMP hats might be muted by default like the old IQaudIO units.

Try this command

Code:
sudo /var/www/util/sysutil.sh unmute-pi-digiampplus
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(Yesterday, 11:51 AM)Tim Curtis Wrote: These AMP hats might be muted by default like the old IQaudIO units.

Yes, you're right. The mute LED is on.


(Yesterday, 11:51 AM)Tim Curtis Wrote: Try this command

Code:
sudo /var/www/util/sysutil.sh unmute-pi-digiampplus

It returns
Code:
gpioset: error setting the GPIO line values: Device or resource busy


I also tried setting it RPi.GPIO library but it returns

Code:
lgpio.error: 'GPIO not allocated'

I found some info in IQaudIO's user guide (see attachment). But I'm not quite sure how to apply it.


Attached Files Thumbnail(s)
   
Reply
#6
According to the manufacturer its muted by default and GPIO22 controls the mute state, but it doesn't specify whether muted = 1 or 0. https://www.raspberrypi.com/documentatio...audio.html

This command for moode9 series "sudo /var/www/util/sysutil.sh unmute-pi-digiampplus" sets GPIO22 high (1) as can be seen below.

Code:
# Unmute IQaudIO Pi-AMP+, Pi-DigiAMP+
if [[ $1 = "unmute-pi-ampplus" || $1 = "unmute-pi-digiampplus" ]]; then
    CHIP=$(gpiodetect | grep pinctrl | awk 'NR==1 {print}' | cut -d " " -f1)
    gpioset $CHIP 22=1
    exit
fi

If I run the individual command to detect the chip it returns "gpiochip0". This can then be used to set a specific GPIO high (1) or low (0).

Code:
pi@moode9:~ $ CHIP=$(gpiodetect | grep pinctrl | awk 'NR==1 {print}' | cut -d " " -f1)
pi@moode9:~ $ echo $CHIP
gpiochip0

sudo gpioset $CHIP 22=1

You could also try setting the Named I2S device to "IQaudIO Pi-DigiAMP+" and then the unmute code will automatically run during moode startup.

If none of the above works its not obvious to me what might be happening on your end.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
I also ran the commands you mention directly. I get the same error, regardless of setting it to high or low:

Code:
gpioset: error setting the GPIO line values: Device or resource busy


I also tried changing the audio device to IQaudIO but still no luck.

What I noticed: The mute LED is on but as I soon as I start playing something, it turns off (both for IQaudIO and RPi). But still, no audio output.

Quote:If none of the above works its not obvious to me what might be happening on your end.

Well, same for me Huh 

I did a fresh install through RPi's imager. I only changed network, user, and audio config as posted in the screenshot and enabled Spotify renderer.
Reply
#8
Are you trying to play from Spotify or MPD?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
Tried both
Reply
#10
Information 
So, finally I got it to work!
What I did:
  1. First boot, select Named I2S device, restart
  2. Second boot, select Output device and Volume type, restart
I played around a bit and it seems, there is no audio output once I change the audio settings settings later on.
Reply


Forum Jump: