DietPi: creating a lean-and-mean Roon Bridge

Dan, from a software point of view, everything seemed to work out.
I installed the equalizer by: sudo apt-get install -y libasound2-plugin-equal
I ran dietpi-justboom, enabled the EQ in global options and went into EQ config. Changed something drastic (1k and 2k band drop to 0%), just to find out if it works, save with F10 and confirmed that the config was saved.

I restarted roonbridge and went into the EQ config again. Still the right EQ config loaded, however, no change in sound, as if the EQ is not being applied. I did not choose my HIFIBerry soundcard in the eq setup, since that gave me access to HIFIBerry settings that are non-EQ (analog and digital gain etc.). These do work in realtime.

Any idea?

Strange, i’ll run some tests here and see if we can replicate.

It appears Roon Bridge is bypassing the system default ALSA device with EQ map completely.
When EQ is enabled, DietPi modifies /etc/asound.conf to map the default sound card on system through EQ.

Usually, we’d expect audio programs that use ALSA, to use the default system configuration, but Roon Bridge does not appear to be doing this.
Regardless of what is contained in /etc/asound.conf, Roon Bridge still manages to output sound, so it must be picking a hw:x,x card on run and using that directly.

I’ll need to ask the Roon devs on this one, see if there is a way we can allow use of system default sound card, or specify one.

Here is the /etc/asound.conf we generate, creates a default sound card with EQ map:

ctl.eq {
    type equal
    controls "/root/.alsaequal.bin"
}

pcm.plugequal {
    type equal
    slave.pcm "plughw:0,0"
    controls "/root/.alsaequal.bin"
}

pcm.!default {
    type plug
    slave.pcm plugequal
    slave.channels 2
}

ctl.!default {
    type hw
    card 0
    device 0
}

That explains it. I noticed that when I open the EQ interface, there is no hw soundcard selected.

Choosing the HifiBerry soundcard only shows the earlier mentioned direct HifiBerry controls like gain, etc.
Choosing the default device is not possible.
There seems to be a way to select another sound device, but the name should be known (Roon’s software soundcard?). Or is this an empty place holder?
The screen shots:


1 Like

OK I have RoonBridge running and music is playing at least as far as Roon is concerned to the IQAudio DigiAMP+ board.

but the board emits nothing…and the MUTE LED is lit so I am guessing this is the issue…at least in part.

how or where do I find a way to turn off the MUTE on the IQAudio AMP I have pretty much given up.

alsamixer is not functional for all PCM512x chip based soundcards i’ve tried. However, you can get a full list of the available mixer controls and their current values with
amixer -c0

Try running a speaker test and see if the device is still muted:
speaker-test -c2

Failing that, lets check mixer controls for any ‘Mute’ options that may be enabled:
amixer -c0
or if your sound card has a card index of 1
amixer -c1

thanks for the help…no cigars yet

zip … led still lit, no tones … it did give an error while roon was playing but once I stopped roon the speaker-test -c2 ran ok…I had to CTRL-C as it ran on and on with no unmute or sounds

a mixer -c0 yields the following output

Simple mixer control 'DSP Program',0
  Capabilities: enum
  Items: 'FIR interpolation with de-emphasis' 'Low latency IIR with de-emphasis' 'High attenuation with de-emphasis' 'Fixed process flow' 'Ringing-less low latency FIR'
  Item0: 'FIR interpolation with de-emphasis'
Simple mixer control 'Analogue',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 1
  Mono:
  Front Left: Playback 1 [100%] [0.00dB]
  Front Right: Playback 1 [100%] [0.00dB]
Simple mixer control 'Analogue Playback Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 1
  Front Left: 1 [100%] [0.80dB]
  Front Right: 1 [100%] [0.80dB]
Simple mixer control 'Auto Mute',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Auto Mute Mono',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Auto Mute Time Left',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Auto Mute Time Right',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Clock Missing Period',0
  Capabilities: enum
  Items: '1s' '2s' '3s' '4s' '5s' '6s' '7s' '8s'
  Item0: '1s'
Simple mixer control 'Deemphasis',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Digital',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 207
  Mono:
  Front Left: Playback 171 [83%] [-18.00dB] [on]
  Front Right: Playback 171 [83%] [-18.00dB] [on]
Simple mixer control 'Max Overclock DAC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 20 [50%]
Simple mixer control 'Max Overclock DSP',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 19 [48%]
Simple mixer control 'Max Overclock PLL',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 20
  Mono: 0 [0%]
Simple mixer control 'Volume Ramp Down Emergency Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Emergency Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '4dB/step'
Simple mixer control 'Volume Ramp Down Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
Simple mixer control 'Volume Ramp Up Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Up Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
root@DietPi93:~#

Thanks, looks like auto mute is disabled: (mine, allo piano 2.1 on left) https://www.diffchecker.com/Tx4l6syQ

Lets try a few options:

Enable auto mute
amixer -c 0 sset 'Auto Mute' on amixer -c 0 sset 'Auto Mute Mono' on

Bring volume up to -0.5db
amixer -c 0 sset 'Digital' 206

Disable Max overclock
amixer -c 0 sset 'Max Overclock DAC' 0 amixer -c 0 sset 'Max Overclock DSP' 0

If problems persist:
Lets check an ALSA stream is being activated. Play something on Roon using the Roon Bridge, then run:
cat /proc/asound/card*/pcm0p/sub0/hw_params

Its 2am here and my brain is not at its best so I have shutdown for the night and will kick off again in the morning.

I might even start with with a fresh dietpi build and double check the config.txt downloaded etc…

What did surprise me was the wifi being built in on the pi 3b that’s a winner :sunglasses:

Thanks again Dan…great support and a great product too

I just spotted this before my heads hit the hay on the iqaudio downloads

Welcome to the pre-configured SD card images / tools for IQaudIO products.

The following files exist:

IQ_0_quicktestDAC_DigiAMP_AMP.zip
This is a basic quick test SD card image.(Jessie-lite based)
On startup the amp is un-muted
On startup volume is set to 30%
Plays a set mp3 file at startup (see /etc/rc.local)
Useful to check that you have installed the IQaudio hardware correctly.
Supports Pi-DACZero / Pi-DAC+ / Pi-DigiAMP+ and Pi-AMP+
Suitable for Raspberry Pi Zero / A+ / B+ / RPi2 / RPi3
NOT SUITABLE FOR THE Pi-DIGI+ (Digital output card)

Might try this too

1 Like

Ah yes, think we both found the solution/manual at the same time lol.

In /DietPi/config.txt change the following line:
dtoverlay=iqaudio-dacplus
to
dtoverlay=iqaudio-dacplus,auto_mute_amp

Then reboot.

As per manual Manual, this will:
This will unmute the amp when ALSA device opened by a client. Mute, with 5 second delay
_ when ALSA device closed. (Re-opening the device within the 5 second close_
_ window, will cancel mute.)_

Failing that:
dtoverlay=iqaudio-dacplus,unmute_amp
This will give a “one-shot” unmute when kernel module loads.

And disable AutoMute:
amixer -c 0 sset 'Auto Mute' off amixer -c 0 sset 'Auto Mute Mono' off

1 Like

Bingo and it’s explained under troubleshooting section later too with some other options for driving the gpio pins on page 31

Maybe this can be put in the diy guide too

A plug for the old adage RTFM :wink:

1 Like

Lmao, yep, that is, once we are able to find it :smile:

@Paul_Chatfield

I’ve added support for those additional AMP dtoverlay options in dietpi-config. Will be available in the next DietPi update (v140), hopefully before xmas :slight_smile: :

v140 status: https://github.com/Fourdee/DietPi/milestone/42

3 Likes

Some more investigation is required… the /DietPi/config.txt edit with

dtoverlay=iqaudio-dacplus,auto_mute_amp

this worked and the Mute light is now off…now to find my speakers

root@DietPi93:~# sudo sh -c "echo 22 > /sys/class/gpio/export"
root@DietPi93:~# sudo sh -c "echo out >/sys/class/gpio/gpio22/direction"
root@DietPi93:~# sudo sh -c "echo 1 >/sys/class/gpio/gpio22/value"
root@DietPi93:~#

The above also worked…happy bunny

1 Like

So some additional info…I had some tweaked settings in the audio setup…mute went off but still no audio…yes the speakers are now connected.

I selected restore defaults in the 2 audio table and its now working…now to find what works for getting the DSD bit going.

:smile:

And it MUTES again when play stops after about 6-8 seconds…Thanks Dan…and the IQAudIO guys too…great little amp…now need to find some better speakers to try this on…YAY

1 Like

A post was split to a new topic: Raspberry Pi with IQAudio HAT; Case, PS and Speaker Lugs

Ok well DSD -DoP doesnt work even for DSD64 despite it showing as green…Roon plays, and its all good but no audio… maybe something for the IQAidIO boys to comment on.

Trying to install the RoonBridge package using Dietpi, and I’m getting the following:

Get:3 http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ jessie/main alsa-utils armhf 1.0.28-1 [960 kB]
Err http://archive.raspberrypi.org/debian/ jessie/main libasound2-data all 1.0.28-1+rpi1
  500  Internal Server Error [IP: 2a00:1098:0:82:1000:13:0:5 80]
Err http://archive.raspberrypi.org/debian/ jessie/main libasound2 armhf 1.0.28-1+rpi1
  500  Internal Server Error [IP: 2a00:1098:0:82:1000:13:0:5 80]
Fetched 1,954 kB in 60s (32.1 kB/s)
E: Failed to fetch http://archive.raspberrypi.org/debian/pool/main/a/alsa-lib/libasound2-data_1.0.28-1+rpi1_all.deb  500  Internal Server Error [IP: 2a00:1098:0:82:1000:13:0:5 80]

E: Failed to fetch http://archive.raspberrypi.org/debian/pool/main/a/alsa-lib/libasound2_1.0.28-1+rpi1_armhf.deb  500  Internal Server Error [IP: 2a00:1098:0:82:1000:13:0:5 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
 [Failed] The apt cache may be corrupt, apt mirror offline, or you have held broken pacakages. DietPi-Software will now exit.

 [Info] Please try:
 [Info] - Fixing apt package errors with 'apt-get install -f'
 [Info] - Change apt mirror: 'dietpi-config' > 'Networking: NAS/MISC' > 'Apt Mirror'
 [Info] - Clear and refresh apt 'apt-get update'
 [Info] - If problems persist, please create a Git ticket so DietPi can investigate the issue:
 - https://github.com/Fourdee/DietPi/issues

I tried the above, and then Dietpi was convinced it had no internet connection (despite the fact that I was connected via Wi-Fi, with an internet connection).

Gave up. Will try another image.

Geoff, you’ve probably already done it, but if not maybe try pinging a server to check the internet connection?