• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Squeezebox/LMS volume adjustment and sound quality question

sffrog

New Member
Joined
Oct 24, 2020
Messages
4
Likes
0
Hello to all!

I am new to the site and would like to submit a (perhaps silly) question to the community.
Background: I am a happy user of an Squeezebox/LMS-based system, powered by two Transporters and a couple of lower-end Squezzeboxes, but in the process of migrating my hardware to RPi-based hardware. I have a question about volume adjustment and the potential for sound quality deterioration. I want a headless system with the ability to control everything (including volume) from a web interface (or iPeng). That implies the volume is not done the way it is in most high end systems, i.e. with a pre-amp; instead, as I understand it, the volume adjustment will have to be done in the RPi itself? Does that necessarily degrade sound quality, no matter how good the DAC (and amp etc.). Is this a problem in your opinion? Are there system that deal with that better than others?
Thank you for considering my post!
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,740
Likes
3,026
If you use a DAC that has volume control and exposes it to the Pi then you can configure PiCorePlayer to use that volume control. If not the volume control will be done in software. See this study for a fairly in depth analysis of software volume control, including measurements, and a Squeezebox being one of the examples discussed. It's worth noting that in many DACs the hardware volume control is done digitally before conversion so essentially the same as software volume anyway.
 
OP
S

sffrog

New Member
Joined
Oct 24, 2020
Messages
4
Likes
0
Thank you. If the volume is done in the Pi itself, isn't it likely to meaningfully degrade sound quality? Esp given I typically listen at 20-50% of volume setting, the signal-to-noise ratio is likely to be quite bad? I do not know what bit depth the RPi is using... So what are the best DACs that can be controlled headlessly by the Pi, and are they a better solution (cost and quality-wise) than buying Transporters on eBay?
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,740
Likes
3,026
If you typically listen at the lower end of the volume scale you can put an attenuator between the DAC and the amp. This will preserve your signal to noise ratio, and limits the output if the volume is ever accidentally set to maximum. I haven't checked the internals of the squeezelite software volume implementation, but given the attention given to the resampling parts I expect the software volume to be well implemented.

Define 'best' - I think most of the Topping DACs do (the mixer control having a trailing space in its name came up recently) along with Soncoz and the Tone Board, and there will be others. Double check before buying - I may be wrong. They all outperform the Transporter I think (ref. these measurements) but it depends what's important to you, and how much you can find the Transporter for.
 
OP
S

sffrog

New Member
Joined
Oct 24, 2020
Messages
4
Likes
0
Thank you again for your response. In the case of a Topping DAC for instance, is the RPi controlling the attenuation within the DAC? In other words, I am understanding that the volume attenuation can be done in the software at the RPi level, or further downstream, by the DAC (in the case of the Topping which has a volume attenuation function), or even further downstream in the analog domain - let's leave that aside for now.
I presume it will sound better if the digital signal is fed un-attenuated by the server to the DAC (output set at 100% within Squeezebox), and then the advanced DAC chips do the attenuation job. I am assuming it is functionally what is happening inside the Transporter - I think I read something about that way back then.
You did answer that question in your first post by saying that if the DAC has a volume attenuation it can be controlled by PiCorePlayer - did I understand that correctly? If so, how do I configure that to happen?
 
Last edited:

escape2

Addicted to Fun and Learning
Joined
Mar 8, 2019
Messages
883
Likes
944
Location
USA
I can't see how adding a DAC to your RPi is going to do anything. LMS doesn't do any digital-to-analog conversion activity server side. Instead, it sends a stream to each individual Squeezebox player so that the DAC built into each player can do the conversion.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,740
Likes
3,026
Starting with PiCorePlayer, under 'Squeezelite Settings' you should find 'ALSA Volume Control' - if you hit the 'more' at the end of the line it will show a list of the available controls that could be used, although the user interface could certainly be improved to stop you entering an invalid string. This tells squeezelite to use this control when asked to change volume, instead of using the software volume, as documented in the squeezelite man page for the -V option. ALSA is the interface to the linux audio drivers. Exactly what the volume control actually does, or if it exists at all, will depend on the driver and the hardware. For most hat-style DACs like the ones from HifiBerry it will send commands to the DAC chip to set its internal volume control. You can find the details of the commands in the DAC chip's datasheet from the manufacturer, and in the corresponding linux driver source code if you're interested.

For USB it's a little more complicated - when you plug the USB DAC in there's a standardised exchange of data about device capabilities, including things like volume control if the DAC supports it. The linux driver will only show the controls that are announced, and that it knows how to deal with, which is one area compatibility issues can come in. In this case when you change the volume control the driver will send the standard commands over USB to the receiver in the DAC box, often an XMOS chip running a variation on their example firmware. Depending on the rest of the DAC hardware this chip will send commands to the DAC chip as described previously, to some other analog volume control hardware, or in some cases a bit of both. The first is most common (Tone Board etc.)

Sending unattenuated digital signals to the DAC may or may not be best, depending on signal and DAC implementation. See the bit in the previously linked archimago study about intersample overload for one reason why a bit of digital attenuation can improve performance. Another possible issue is increased distortion at full scale output - a few of the DACs tested here have performed better at slightly reduced volume due to issues in the analog stage after the DAC chip. The original version of the SMSL Su-8 had this on the balanced output IIRC, fixed in later board revisions. I don't think any of the USB DACs mentioned earlier suffer from this though.
 
OP
S

sffrog

New Member
Joined
Oct 24, 2020
Messages
4
Likes
0
Thank you so much, your post helps clarify the underlying technical issues for me, and lays out why it is more complicated than I thought (isn't it always?). Do you know of a DAC that can be driven by Squeezelite via USB, where volume control would benefit being done in the DAC (possibly after conversion)? Some of the DACs you mentionned above seem pretty impressive performance-wise, at least on paper (Topping, Tone Board)...
More profoundly perhaps, your point fundamentally challenges my initial assumption (based on reading too much junk audiophile literature surely) that volume attenuation is best performed in the analog side of things, by a quality pre-amp. It is entirely possible that the server being at 100% output and the DAC implementation introduce meaningful distorsion. Before reading your observations, I had thought perhaps I will have low-cost RPi-based servers for low-fi systems (e.g. bathroom), and have a high-end system, pre-amp and all, for proper listening. But now I really don't know if that will perform any better. Huh. Lovely ;-)
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,740
Likes
3,026
I don't think the tabulated summaries of the reviews include features like volume control, so you'll have to check the reviews or ask in the thread. I listed a few of the lower cost USB DACs with good performance that I think have volume control via USB, but I wouldn't swear to it and it may depend on firmware revision.

Do check the output level of the DAC and the input sensitivity of the power amp - you may still need a quality pre-amp to get some gain, or for convenience over a fixed attenuator.

If you're getting something Pi-based for the low-fi system you can always try it back to back with the Transporter - sync the players in LMS and have someone switch between them for you for some blind testing.

I just realised we haven't covered DSD yet - that won't work with software volume, and may not work with hardware volume depending on the DAC, unless it's transcoded to a PCM format.
 
Top Bottom