Amp HAT (miniamp) - how to set volume?

Hi,

Surprisingly I wasn’t able to find anything about support for amp HATs, so here goes. I had the idea of repurposing an old radio - it has very reasonable sound quality, looks rustic and old-fashioned, but only provides an aux input that requires a headphone signal level and doesn’t do much with a line level. I considered using the on-board headphone output of the Pi 3B+ I had left over from other projects - but I discovered that Ropieee doesn’t support that. Pity, if you ask me - since it’s all Alsa, that should be technically simple! I guess it’s not possible because it’s not regarded high-end enough? Well… I’d still like the option, but perhaps that just me.

Never mind, so I thought I’d use a simple amp HAT. Obviously I need only very little power for the purpose, and I found the Hifiberry Miniamp (https://www.hifiberry.com/shop/boards/miniamp/) that looks like it should do fine. Apparently it uses the same kernel support as other Hifiberry DACs, so I assume it would work with Ropieee.

But that brings me to the main question I have at this point: when using an amp HAT without an external volume knob, how does one set the volume through alsa? I would just need to set it statically, similar to the “forced volume” setting I see in the UI for a USB DAC (though I may be misunderstanding that - I don’t use that setting on a Pi 4 with a Hugo 2 DAC). But the UI does not seem to support a similar setting for HAT-based outputs. SSH access is not an option anymore with latest versions, so… are amp HATs basically not supported?

Thanks
Oli

I’m not sure what you mean by that. If you look at RoPieee’s supported hardware list you see that there’s a large list of supported amp HAT’s. Agreed, the miniamp is not on that list, but I’ll add it for the next release.

Volume control is done by Roon. So either you have hardware control available on the HAT side, in which case you can select ‘device volume’ in Roon’s settings, or you can use software volume control from Roon.

The miniamp has no hardware volume control, so you need to use software volume control from Roon.

I see… my apologies for asking a dumb question then. I never guessed that amp HATs would be supported this (excellent!) way, and I didn’t see mention of it anywhere I looked.

Thinking it through, there’s probably another reason why I didn’t come up with this answer: I was looking for a place where the output volume of the amp HAT can be set and fixed one time, since I don’t need or want it changing afterwards. I don’t know whether Roon allows me to do that and it’s not a big deal either way, but that’s why I was imagining a setting in a different place.

Thanks!

I use IQAudIO amp hats all over the house and they just work seamlessly with Roon and Ropieee - as a 7" display and you have control interface in the room too.

One issue with software volume controls is that it is not always obvious what the setting is. The first time I tried using an AMP HAT with Ropieee via Airplay (direct from my Mac) I didn’t realise that the volume was set to maximum…

So ensure you check that before pressing Play in Roon and set the maximum volume to something sensible first.

You could always use any other RPi OS, additionally install Roon bridge and use the headphone output as desired.
Piece of cake, really!

It gets a little more involved if you’ve got the desire for local control and display, though, but that’s possible also using Diet-Pi, extension manager, extension snapshots and web controller.

Been there, done that…

RPi headphone out is really only beeps and buzzer quality but it’s your ears :hear_no_evil:

Well, exactly - it’s almost automatic on a Linux system. Seems a bit strange that Ropieee would not support it. I like Ropieee and I don’t want to start fiddling with different installations of Roon Bridge around the house - already have enough computers to maintain.

Hm… I used that output for a while in a car - this is a few years ago though. True, it wasn’t great and I ended up using a DAC HAT instead, but for the sort of audio environment in the car (i.e. loud and imperfect in more ways than one) it was really not the biggest issue. My current project is inherently low-fi, so I would have given the headphone output a chance…

Not a huge issue to me that it doesn’t work this way - I’m ready to use an amp HAT, especially now I know that this works so well. As a side note, it took quite some searching to turn up a forum thread that stated clearly that the headphone output is not supported - the “getting started” guide goes on about HATs and USB DACs, but never clearly says that the headphone is not an option. And then I thought “it’s clearly possible to NOT select a HAT in the UI, and to NOT attach a USB DAC - surely that means that the headphone output will then be used, because what else?” - it’s a bit confusing that instead the Pi simply doesn’t appear in Roon, until you figure out by yourself what the problem is… I think for future users this situation could be improved a bit by adding a line in the docs, and a warning in the UI that unless either a HAT is selected or USB is active, nothing at all will happen.

Thanks for your replies, everyone - I’ll get the miniamp and I’m sure it’ll be great!

Nothing ‘strange’ about it. It’s a deliberate choice.

Yes, exactly - I mean it seems strange because that choice is not obvious in the UI, or even documented (outside of forum discussions). I’m not sure if I’m expressing myself well enough here, but my point is that I totally understand that decision and it crossed my mind early on: “who knows, maybe they deliberately deactivated the headphone output because it’s really not a good idea to use it”. What kept me looking around for it was only that this information was not confirmed clearly anywhere I checked (for a while at least).

  • The UI could display a warning if I don’t select a HAT and also uncheck USB - I did that, and no error was displayed, so I assumed that this combination of settings must serve a purpose
  • The “audio hardware” page (RoPieee | Audio Hardware) could point out specifically that the headphone output does not work
  • Same for the getting started guide.

Anyway, enough said - this is only meant to be friendly feedback and I don’t want to tick anybody off by harping on about it.

That’s a valid point. And a good idea.

Thanks

2 Likes

Hello again,

I have now put together my setup with the Miniamp and that Pi 3b+. Unfortunately it doesn’t work very well - I don’t quite understand the reason right now, just thought I should mention it in case interested parties read this thread now or later :slight_smile:

The problem I have is that the signal level is somehow insufficient. I set volume control to DSP in Roon (device volume is available in the list, but it seems to revert to “fixed” automatically?), and then I need to fine-tune the volume so that the connected radio accepts the signal. At 0dB there is nothing but noise to be heard, and with trial and error I arrived at a level of around -38dB where the audio is clean - any louder than that, and there are short buzzing noises interrupting the music, and this gets worse until any meaningful music content is gone by the time I reach -25dB. So far so good - but the problem is that this level of input signal does not allow the radio to reach a useful output volume. For comparison, when I hook up a phone via the same (jack) connector, I can adjust the phone headphone output to its loudest settings without causing any distortion, and then the volume output by the radio is several orders of magnitude louder than with the Miniamp connected - and the audio still clean as well.

I’m pretty sure these issues I’m seeing are not related to RoPieee, so please forgive the off-topic follow-up. In case anybody has ideas, I’d certainly be interested to hear them - meanwhile this may serve as a warning to others planning similar setups.

Thanks
Oli

I think the amp hat is designed to drive speakers - and on careful reading I think you’re driving some sort of line input (although given your comments it might be a very insensitive one).

From your comments it sounds like something is being overloaded (either the input stage of the radio, or the output stage of the hat).

Is there any way to get more info on the specification of the radio aux input?

I think you said you’d tried driving it with a conventional line level signal - and it didn’t produce much output.

When using DSP volume 0db is full output of the device which in the case of these devices will distort quite considerably my hifiberry amp is unlistenable at anything over 60 as it starts to distort.

Are you using the amp connected to the Radios speaker? When using DSP Volume into any amplifier your essentially using two volume controls. You need to adjust the amp/radio to the loudest you ever want it with DSP set at 0db which is outputting its highest and then use DSP volume to lower or raise it to the desired listening level. You can’t use the amp hat to input into a line input as the levels are way higher and will overload and clip.

Hi,

I’m trying to drive the Aux In on a Tivoli Model One. I tested this input before I made the decision to go with the Miniamp because I didn’t know whether it required a line-level input or a headphone level input - I found that the headphone level was required, and as I described, it works fine when I connect it to the headphone out on an iPhone.

Now I was expecting to use the Miniamp to produce whatever signal level is suitable for the input - i.e. loud enough, but not too loud - and I was expecting to fiddle around a bit to achieve this by trial and error. As far as I know, the max output power of the Miniamp is 3W - for comparison I don’t know what output power the iPhone headphone output produces, but I didn’t really expect these 3W to be vastly over the top. Admittedly, until I started playing around with the Miniamp today, I didn’t really consider the meaning of the previous statement that the Miniamp does not have hardware volume control - I assumed that the Miniamp would obviously be able to control the power it outputs. Anyway, so I chose the DSP setting and expected things to work out somehow…

Now, fiddling is what I did - and the result is what I described previously: I need to back off very far from the 0dB setting in the DSP volume control (which I find surprising, because again, I didn’t think that 3W would be way too much for the Aux In to accept), and while I can then achieve clean sound, the input level is at the same time so much lower than that generated by the iPhone headphone output that the Tivoli runs at a very low volume altogether.

I might not have spent enough time thinking about things, perhaps there is something to my setup that I’m misjudging entirely… right now I’m at a loss to understand the way the DSP volume control works… for instance, it appears to me that these loud buzzing sounds I get when I go louder than -38dB are not generated by the radio. What I mean is that they don’t sound like “analog” distortion of some kind, they sound as if they are digitally inserted into the audio. Why would this happen? I have no clue. It has crossed my mind to check other digital processing settings available in Roon, but I have no experience doing this because I’ve avoided activating any such features in the past.

Thanks for the hint of investigating the electric capabilities of the Aux In - I’ll see if Tivoli has any docs on that, then perhaps I’ll be able to judge whether my assessment “3W can’t be way too much” is completely wrong or not.

Cheers
Oli

You cannot use a speaker level output into line or headphone input it’s just the wrong signal levels completely. Your overloading the signal this is why its not behaving. Headphones operate in mV and vary in what they produce dependant on the impedance of what’s connected. Also the amp will be expecting impedance of anything from 4-8 ohm on the speaker outputs which you not doing going this way. If you want to use the Tivoli’s input then you need a DAC hat not an amp hat and one that Roon can control the output volume of.

1 Like

As @CrystalGipsy says the Tivoli has a line level input on a stereo mini jack.

It then sums the left and right together to get a mono signal.

The mini-amp will be expecting to drive a low impedance device, so so just isn’t compatable.

So you need a DAC HAT (Hi Fi Berry make several), and a “two phono to stereo mini jack” connector.

You said you’d had problem driving the Tivoli with a line level device - although not sure why this would be.

Hi,

Some news here. Thanks for your help, @CrystalGipsy and @GregD !

First - it appears you are correct that the Tivoli can accept line level input. And no, I never tested with a line-level input device - I tested with my phone, which I believe delivers headphone level output, i.e. something way louder than line level, and worked just fine. I guess there’s a snag in my logic somewhere around here, but I assumed if the Tivoli works with the high-level output provided by the phone to drive headphones, it will not also be able to work with the much lower line signal. When I set out to test this, I even considered the two options I thought I had - connect a line-level input and see if that works, or connect a headphone level input… went for the latter, clearly making some invalid assumptions.

Now I’m still seeing some odd behavior, but there is probably a completely different reason for this. First, I got it working by using a USB-connected Arcam DAC I had around. I rigged a cable with the required phono to jack connectors, hooked it up and it works fine (btw, for future readers, make sure you have ground connected through that cable - otherwise there will be bad buzzing!), so loud in fact that it becomes difficult to control the volume with the knob on the Tivoli.

The odd thing I still see is that absolutely nothing happens when I use a Hifiberry DAC HAT instead. I hadn’t used this HAT in a while but it was previously removed from an old in-car installation where it had been working fine. I believe it’s intact, it’s certainly recognized correctly, I can try to play music… but there’s no hint whatsoever that any signal makes it into the Tivoli. This is with the same cable connection that works perfectly with the Arcam DAC. I don’t know if the DAC HAT could be broken in some subtle way that would affect only its output stage… maybe I’ll see about a replacement and then I’ll see if that works.

Again, thanks for pointing out the mistake I was making with the level on that Aux In - never crossed my mind after the test with the phone that my understanding of that part was completely wrong for some reason.

Oli

Great you got it working. Headphones are somewhere between speakers and line inputs in impedance.

But sometimes headphone outs are designed to work as high quality line outs anyway. My guess is your phone is an example.

My hope is that you haven’t quite configured the DAC Hat correctly - or one of the volumes is turned down or muted (it’s very easily done - and has caught me out before - I have a feeling that it can sometimes default to muted 0 volume).

Now you have a working example you’re in a good place to experiment some more!

One last update to complete the story - I ordered a new DAC HAT to replace the potentially broken Hifiberry one, and I found this: Audio DAC SHIM (Line-Out) - Pimoroni - the tiniest Pi DAC ever, I guess :wink: I got one while I was ordering anyway, and this turns out to work great with the Tivoli. Surely not the same quality some other HATs deliver, but for the purpose it sounds very good. I did use DSP volume to reduce output by 18dB (I think - played around a bit) so that the volume knob on the Tivoli can be used without going way too loud too quickly.

So I still don’t know whether the Hifiberry DAC was broken or not, will check with the next project!

1 Like