# Setting the max volume of the HiFiBerry

**URL:** <https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761>\
**Category:** Using Zynthian\
**Created:** [June 6, 2017, 7:38pm UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761 "2017-06-06T19:38:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![john](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@john](https://discourse.zynthian.org/u/john)\
**Post date:** [June 6, 2017, 7:38pm UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/1 "2017-06-06T19:38:04Z")

</div>

Not sure if this is hardware or software.

Is it possible to set the max volume of the HIFIBerry? Running it directly into my Focusrite interface the signal is very hot.  
is there a config file some where that it can be set to either +4 dBu or -10 dBV?

Thanks

John

---

<div class="post-metadata">

**Author:** ![rod\_amaral](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/rod_amaral/32/466_2.png) [@rod\_amaral](https://discourse.zynthian.org/u/rod_amaral)\
**Post date:** [June 6, 2017, 8:02pm UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/2 "2017-06-06T20:02:00Z")

</div>

Hi @john

Have you tried using alsamixer?  
I use it to configure the audioinjector.

 ![](https://discourse.zynthian.org/uploads/default/original/1X/cfab7aba2a8f5de5c4fe0d7345781e7db04fa61f.png)

Regards!

---

<div class="post-metadata">

**Author:** ![john](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@john](https://discourse.zynthian.org/u/john)\
**Post date:** [June 6, 2017, 8:18pm UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/3 "2017-06-06T20:18:00Z")

</div>

ok, that helped thanks.  
now what I set does it stay that way on reboot?

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 7, 2017, 8:38am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/4 "2017-06-07T08:38:55Z")

</div>

Yes, changes in alsamixer will be saved and restore after reboot.  
In the other hand, should we add a configuration option for this in the webconf tool, @mheidt ? 😉

Regards!

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 7, 2017, 8:52am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/5 "2017-06-07T08:52:00Z")

</div>

Within the Audio-pane?  
The challenge will be to enhance the generic config\_block.html with a slider input.  
I will check…

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 7, 2017, 9:12am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/6 "2017-06-07T09:12:14Z")

</div>

like this?

 ![](https://discourse.zynthian.org/uploads/default/original/1X/6679e5621e9a33fd1d40bfcdbf2c659c350771f8.png)

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [June 7, 2017, 9:28am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/7 "2017-06-07T09:28:00Z")

</div>

Yessss!

If a slider input is too complex to have, we could live with a select box 😉

Regards!

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 7, 2017, 9:29am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/8 "2017-06-07T09:29:19Z")

</div>

it’s checked into my branch.  
The varname is ALSA\_MASTER\_VOLUME

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 11, 2017, 12:23am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/9 "2017-06-11T00:23:54Z")

</div>

We might have an issue. I mean challenge.  
I tried to make it work and used amixer to get and set the volume.  
I checked something in, which works for my Dac+Pro.  
But other soundcards might have differently named mixer controls.  
So I guess, I need to iterate over all Playback pvolume pswitch mixer controls and provide n sliders?  
Or do you have a better idea?

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 11, 2017, 7:31pm UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/10 "2017-06-11T19:31:17Z")

</div>

Now with a picture:

 ![](https://discourse.zynthian.org/uploads/default/original/1X/420c36b15c8c725ffb478690c7752c775195f86a.png)

Not all of those playback sliders are really adjustable. not even in alsamixer.  
Some are 0-1 but i use 0-100%  
Analogue f.e.: if i set it to 30, it will save as 0.  
My proposal is to define filters for each soundcard.  
In my case (DAC+) it’s only “Digital”, that i need.  
Now we need to collect the mixer control names of the other cards.

---

<div class="post-metadata">

**Author:** ![beckdac](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/beckdac/32/519_2.png) [@beckdac](https://discourse.zynthian.org/u/beckdac)\
**Post date:** [June 12, 2017, 2:57am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/11 "2017-06-12T02:57:41Z")

</div>

Edit: After I posted this, I realized we are basically identical.

```
root@zynthian:~# amixer scontrols
Simple mixer control 'DSP Program',0
Simple mixer control 'Analogue',0
Simple mixer control 'Analogue Playback Boost',0
Simple mixer control 'Auto Mute',0
Simple mixer control 'Auto Mute Mono',0
Simple mixer control 'Auto Mute Time Left',0
Simple mixer control 'Auto Mute Time Right',0
Simple mixer control 'Clock Missing Period',0
Simple mixer control 'Deemphasis',0
Simple mixer control 'Digital',0
Simple mixer control 'Max Overclock DAC',0
Simple mixer control 'Max Overclock DSP',0
Simple mixer control 'Max Overclock PLL',0
Simple mixer control 'Volume Ramp Down Emergency Rate',0
Simple mixer control 'Volume Ramp Down Emergency Step',0
Simple mixer control 'Volume Ramp Down Rate',0
Simple mixer control 'Volume Ramp Down Step',0
Simple mixer control 'Volume Ramp Up Rate',0
Simple mixer control 'Volume Ramp Up Step',0

```

My `/boot/config` has these lines:

```
# Soundcard Config
dtoverlay=hifiberry-dacplus

```

My webconf for audio looks like this (which I think is pretty standard):

 ![](https://discourse.zynthian.org/uploads/default/original/1X/f612691052050c4ca8785ec99b9262df7a034bf9.png)

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 12, 2017, 11:03am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/12 "2017-06-12T11:03:41Z")

</div>

The changes are not in the master branch yet.  
You need to checkout mheidt.  
Or you wait, until it is merged.  
But I could use more results of “amixer scontrols” of people with other soundcards.

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [June 12, 2017, 5:37am UTC](https://discourse.zynthian.org/t/setting-the-max-volume-of-the-hifiberry/761/13 "2017-06-12T05:37:07Z")

</div>

Yes. My code is not in the master branch yet. Did you checkout the branch mheidt? Montag, 12 Juni 2017, 04:58vorm. +02:00 von beckdac [discourse@zynthian.org](mailto:discourse@zynthian.org) :

> beckdac  
> June 12  
> root@zynthian:~# amixer scontrols  
> Simple mixer control ‘DSP Program’,0  
> Simple mixer control ‘Analogue’,0  
> Simple mixer control ‘Analogue Playback Boost’,0  
> Simple mixer control ‘Auto Mute’,0  
> Simple mixer control ‘Auto Mute Mono’,0  
> Simple mixer control ‘Auto Mute Time Left’,0  
> Simple mixer control ‘Auto Mute Time Right’,0  
> Simple mixer control ‘Clock Missing Period’,0  
> Simple mixer control ‘Deemphasis’,0  
> Simple mixer control ‘Digital’,0  
> Simple mixer control ‘Max Overclock DAC’,0  
> Simple mixer control ‘Max Overclock DSP’,0  
> Simple mixer control ‘Max Overclock PLL’,0  
> Simple mixer control ‘Volume Ramp Down Emergency Rate’,0  
> Simple mixer control ‘Volume Ramp Down Emergency Step’,0  
> Simple mixer control ‘Volume Ramp Down Rate’,0  
> Simple mixer control ‘Volume Ramp Down Step’,0  
> Simple mixer control ‘Volume Ramp Up Rate’,0  
> Simple mixer control ‘Volume Ramp Up Step’,0  
> My /boot/config has these lines:
> 
> # Soundcard Config

dtoverlay=hifiberry-dacplus
