Thank you for your donation!


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


Airplay and hardware volume
#11
I don't really understand your audio system or how you listen to it. Typically the listening position is fixed and there is a volume setting thats most often used when listening. Thats what system calibration is meant to address.

If you have active speakers they would have their own volume controls and that would fit right in with system calibration. Thats precisely how I've calibrated my Yamaha 2.1 Studio Monitor system.

I mentioned in an earlier post that moOde implements Airplay with software volume only but here is some more info on volume.

Firstly, moOde doesn't function as a general purpose pre-amp with a common volume control. Each audio renderer in moOde for example MPD, Bluetooth, Airplay, Spotify and Squeezelite has its own volume control. Note the UPnP renderer is really not an audio renderer, its a proxy service that queues tracks from a UPnP media server to MPD. It uses MPD's volume control.

Below are the volume options that moOde implements.

MPD
Disabled - output 100%/0dB volume
Software - control volume using MPD software volume algorithm (32-bit float w/dither)
Hardware - control volume using audio device hardware volume controller (Typically 16-20 bit max, no dither. Exception is ESS high res volume controller which is 32 bit http://www.esstech.com/files/3014/4095/4...ontrol.pdf)

Bluetooth, Airplay, and Spotify
Software volume only, 16-bit

Squeezelite
Software volume (default)
Hardware volume via specific options added to the "Other options" line in Squeezelite config.

You might be able to hack the shairport-sync.conf file and configure it to use your devices hardware volume controller but that will conflict with moOde setting hardware (ALSA) volume to 0dB when an Airplay session becomes active. Thats not something that would be trivial to hack.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
Thanks!

Could it be solved by just rebuild Shairport Sync with output_format = "S24";
I guess I am not that lucky but better ask

Since the Airplay softvolume sits in the Airplay renderer, and if understood the below correct (which may not be the case Smile ) Shairport Sync can be built to output 24bit audio, it could solve the problem depending on what data types where used when doing the volume multiplication before writing to the 24bit output ?


// These are parameters for the "alsa" audio back end.
// For this section to be operative, Shairport Sync must be built with the following configuration flag:
// --with-alsa
alsa =
{
// output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
// mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.
// mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this.
// can be 44100, 88200, 176400 or 352800, but the device must have the capability.
output_rate = 44100;
// can be "U8", "S8", "S16", "S24", "S24_3LE", "S24_3BE" or "S32", but the device must have the capability. Except where stated using (*LE or *BE), endianness matches that of the processor.
output_format = "S16";
Reply
#13
I forgot to mention that you can set the output bit depth in Airplay Config. The values are 16, 24, 243LE, 243BE, 32 but IIRC volume is computed in 16 bit then zero padded to the specified output bit depth.

You would need to look at the shairport-sync sources or post a question in the shairport-sync repo.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#14
But setting bit depth in Moode web UI->Audio->Airplay Config is a different thing right? It takes the output from the shairport-sync and runs through SOX which resamples or changes bit depth? In that case it is too late, the 24bit must never go to 16 in between. Maybe I missunderstand what setting you mean or how it operates?

Anyway: I did contact shairport-sync and here is the positive answer: https://github.com/mikebrady/shairport-sync/issues/1026

So how do I in practice get the 24bit output from the shairport, is there just a setting, or do someone need to compile it with output_format = "S24" and then what, just replace some files in the OS (which?)
Reply
#15
The bit depth setting in Airplay Config corresponds to the output_format parameter in shairport-sync.conf file. Its internal to shairport-sync and does not involve piping the output to a separate SoX resampler.

Based on Mike Brady's response volume calculations are done in 32 bit word length and then dithered and truncated down to the output size.

You should be all set.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#16
Excellent, will try it, thanks!
Reply


Forum Jump: