Thank you for your donation!


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


dtparm=audio=off in file 'config.txt'
#1
Dear all!

To get my system to have a sound output, I manually had to edit the 'config.txt' file to commend out the parameter 'dtparam=audio=off'.

This procedure is in accordance with the set-up guide from the HiFiBerry.
https://www.hifiberry.com/docs/software/...ux-3-18-x/

I like to ask, if someone also had the need to do so for this kind of sound-card?

My current config.txt looks:

Code:
disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
#hdmi_group=0
dtparam=i2c_arm=on
dtparam=i2s=on
#dtparam=audio=off
#######################################
#  Display
#  Waveshare 7inch HDMI LCD
max_usb_current=1
hdmi_force_hotplug=1
config_hdmi_boost=10
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
#
#######################################
dtoverlay=hifiberry-dacplus
#dtoverlay=disable-wifi
dtoverlay=disable-bt

So as you can see, due to the connected display, I had to edit the 'config.txt' anyway.  Wink

But maybe this could be respected in the scrips, in case this is a common issue.

Best Regards.

------------------------------------------------------------------------------------
Board:          Raspberry Pi3B+
Soundcard:   HiFi-Berry Amp2
OS:              moOde audio player 7.0.1, installed as iso
Set-up date: 2021-01-04
Reply
#2
@JuramemO 

I don't understand the behavior you report.

First, here's what the HiFiBerry site actually says


Quote:Remove the driver for the onboard sound

Remove the line

dtparam=audio=on

from /boot/config.txt if it exists.

That's "...=on" not "...=off". I'm not sure what the default for onboard sound is in Raspberry Pi OS these days but certainly moOde's choice of "dtparam=audio=off" will disable it even if "on" is the default.

Second, here's what the HiFiBerry site says about the HiFiBerry Amp2


Quote:If the software you’re using doesn’t provide the Amp2 as an output option, you should use the HiFiBerry DAC+ driver as the Amp2 is basically a DAC+ with an integrated power stage.


So although I don't have a HiFiBerry Amp2 board, I do have a HiFiBerry Dac+ Pro, and I can test on an RPi3B+ whether it works with the settings chosen by moOde.

Here's my /boot/config.txt file after choosing the HiFiBerry DAC+ Pro as the I2S Device in moOde's Audio config panel


Code:
$ more /boot/config.txt
disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
hdmi_group=0
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=off
dtoverlay=hifiberry-dacplus
#dtoverlay=disable-wifi
#dtoverlay=disable-bt

I'm now playing a track through this DAC to my downstream audio system. No problems here. I don't believe there would be a different result if I tried a plain HiFiBerry DAC+ or a HiFiBerry Amp2.

Regards,
Kent
Reply
#3
(01-06-2021, 11:30 AM)JuramemO Wrote: Dear all!

To get my system to have a sound output, I manually had to edit the 'config.txt' file to commend out the parameter 'dtparam=audio=off'.

This procedure is in accordance with the set-up guide from the HiFiBerry.
https://www.hifiberry.com/docs/software/...ux-3-18-x/

I like to ask, if someone also had the need to do so for this kind of sound-card?

My current config.txt looks:

Code:
disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
#hdmi_group=0
dtparam=i2c_arm=on
dtparam=i2s=on
#dtparam=audio=off
#######################################
#  Display
#  Waveshare 7inch HDMI LCD
max_usb_current=1
hdmi_force_hotplug=1
config_hdmi_boost=10
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
#
#######################################
dtoverlay=hifiberry-dacplus
#dtoverlay=disable-wifi
dtoverlay=disable-bt

So as you can see, due to the connected display, I had to edit the 'config.txt' anyway.  Wink

But maybe this could be respected in the scrips, in case this is a common issue.

Best Regards.

------------------------------------------------------------------------------------
Board:          Raspberry Pi3B+
Soundcard:   HiFi-Berry Amp2
OS:              moOde audio player 7.0.1, installed as iso
Set-up date: 2021-01-04

You should ask Hifiberry on their forum why this param needs to be # commented out in config.txt for the Amp2 board while their other DAC+ based boards work perfectly fine with dtparam=audio=off.

If we have to comment it out for this particular board instead of just setting the param to off then I'll add it to the TODO list.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
So, if other users, using a HiFiBerry Amp2 can confirm such a behavior, it should be added to the Todo-list.

According my experiences, this is a requirement of the Pi.
To use a HiFiBerry Amp2 the 'config.txt' shall not include an active 'dtparm=audio=...' line or no sound output will be given.

This is in compliance with the information of the HiFiBerry site saying:
Quote:Remove the driver for the onboard sound

Remove the line
dtparam=audio=on
from /boot/config.txt if it exists.

'Remove' the line, not 'set the dtparam=audio to off'.

I can reproduce this behavior on all of my three Pi's (on Ras.Pi3B+, two Ras.Pi4 2GB), using this kind of sound card, by using blank and fresh RasperryOS light or using RaspberryOS with desktop (either LXDE or xfce).

I'm asking for confirmation from other users.
It would be worth to think about it, to respect this in moOde audio.

Best Regards.
Reply
#5
(01-07-2021, 08:41 AM)JuramemO Wrote: So, if other users, using a HiFiBerry Amp2 can confirm such a behavior, it should be added to the Todo-list.

According my experiences, this is a requirement of the Pi.
To use a HiFiBerry Amp2 the 'config.txt' shall not include an active 'dtparm=audio=...' line or no sound output will be given.

This is in compliance with the information of the HiFiBerry site saying:
Quote:Remove the driver for the onboard sound

Remove the line
dtparam=audio=on
from /boot/config.txt if it exists.

'Remove' the line, not 'set the dtparam=audio to off'.

I can reproduce this behavior on all of my three Pi's (on Ras.Pi3B+, two Ras.Pi4 2GB), using this kind of sound card, by using blank and fresh RasperryOS light or using RaspberryOS with desktop (either LXDE or xfce).

I'm asking for confirmation from other users.
It would be worth to think about it, to respect this in moOde audio.

Best Regards.

These dtparam= and dtoverlay= lines in /boot/config.txt are telling a low-level bit of code in the bootup process how to modify the default device tree before other code in the bootup process uses the device tree to load modules into the kernel for the specific RPi model with specific added hardware.

I accept that you find this step necessary. It runs counter to my understanding of the Raspberry Pi Foundation's documentation but the documentation is spotty in many places and I don't have the board in my hands to test with.

I'd still like to find out what's going on. Searching for our version of the DaVinci Code keeps me out of bars.

Regards,
Kent
Reply
#6
Okay, so here's my take based on the Raspberry Pi OS repo and a test with a HiFiBerry DAC+ Pro on an RPi4B running moOde 7.0.1.

FIrst, quoting from the README for the current Raspberry Pi OS overlays source directory (this directory contains more than 2000 files!)


Code:
Name:   <The base DTB>
Info:   Configures the base Raspberry Pi hardware
Load:   <loaded automatically>
Params:
       ...

       audio                   Set to "on" to enable the onboard ALSA audio
                               interface (default "off")


This would seem to be confirmed empirically on my system. With moOde configured for my HiFiBerry DAC+ Pro, whether my /boot/config.txt contains the line 'dtparam=audio=off' or no 'dtparam=audio...' line at all, I get exactly the same list of loaded modules ('lsmod' command), albeit in differing order, and exactly the same output for 'aplay -l' and 'aplay -L'. Either way, my downstream audio system is receiving audio from the DAC. 

So, like I said, I don't understand the behavior you report. One can only hope some other HiFiBerry Amp2 owners will answer your request for confirmation.

Regards,
Kent

PS - I think early versions of Raspbian defaulted the onboard audio interface to "on". I don't know when the default was changed officially to "off" but there's old chatter about it in the repo issues log. That moOde explicitly adds "dtparam=audio=off" to /boot/config.txt when an I2S device is activated may be a hold-over from the earlier times.
Reply


Forum Jump: