Thank you for your donation!


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


Bad quality sound on MoodeAudio 6.x
#21
I'm able to repro. It appears that MPD software volume is much louder at the same MPD volume level as compared to Hardware volume. This is w/o EQ enabled and on a couple of different DAC's.

Alsamixer still shows 0dB gain at 100% volume which suggests there is no additional gain being added by ALSA. This in turn would suggest something possibly going on with MPD and the way it calculates/curves software volume ??

In my tests, reducing Max ALSA volume to 80 in Audio Config brought the level more or less in line with Hardware volume.

I don't see anything in the MPD documentation or change logs that would indicate a specific change to software volume that might be causing this.
https://www.musicpd.org/doc/html/user.ht...io-outputs
https://raw.githubusercontent.com/MusicP...21.24/NEWS
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#22
Hi Tim. Thanks for quick response!)

Yeah, really weird. So, what's your suggestion would be in this situation?

Option 1: use Disabled setting and refrain from using EQ.
Option 2: use Software volume and decrease it to a certain level, where it allows the EQ to be utilized without introducing audible distortion.

Any other idea?

Another question is why Max ALSA volume have no affect on reducing distortion when the volume control is set to Disabled, and the Max ALSA set to,say, 80 or less? Is that an expected behavior or I'm missing something here?

In any case, from all the variants I've tried so far, the only one that makes real difference (eliminates distortion) is the Software volume with the round slider set to about 70-80.
Reply
#23
The issue would need to be reproduced on stock Raspbian and MPD and then submitted to MPD maintainer.

The EQ wasn't a contributor to the volume loudness issue in my tests, and reducing Max ALSA volume worked with both Software and Disabled volume.

Not sure why Max ALSA volume is not being reduced on your end.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#24
(06-23-2020, 04:09 PM)Tim Curtis Wrote: The issue would need to be reproduced on stock Raspbian and MPD and then submitted to MPD maintainer.

The EQ wasn't a contributor to the volume loudness issue in my tests, and reducing Max ALSA volume worked with both Software and Disabled volume.

Not sure why Max ALSA volume is not being reduced on your end.

Hm, right now I'm on Software setting, and the Max ALSA set to 80, while the slider set to max, and I can definitely hear the sandy distortion sound on some fragments of the track. As soon as I decrease the slider, the distortion goes away. And yes, I increase the volume on my amplifier to be able to maintain same volume level and to hear the distortion, but there is 0 distortion in this case.
So, what's the difference between the Max ALSA volume setting and the general volume slider? Are they controlling different volumes? Maybe one controls the DAC digital part, while the other operates the output volume?

I'm not expert in those DAC things, just an assumption, but clearly there's something wrong on my side and I'd like to figure out what exactly. What's your DAC? If it's the one I'm using, maybe HW revisions also make difference? Mine is 2.6.
Reply
#25
Audio devices that include an on-chip or on-board Hardware volume controller expose an ALSA layer volume control via their device driver. This is separate from the Software volume control that is part of the Player application which in this case is MPD.

MPD volume control (the moOde knob) can be configured in 3 ways
1. Software - Use MPD internal Software volume control
2. Hardware -  Use the devices Hardware volume controller if one exists. This is the ALSA layer volume control.
3. Disabled - Output 100% (0dB) volume which bypasses internal Software volume control

ALSA layer volume is configured as follows depending on the MPD volume control setting
1. Software or Disabled - ALSA volume set to 100 (0dB) so the overall volume when Software = 100 is 0dB
2. Hardware - MPD volume setting controls ALSA volume (the devices Hardware volume controller)

I ran a quick test with MPD Software volume set to 100 and Max ALSA volume set to 85. Alsamixer showed level = 48, -19dB gain, amixer showed level = 85%, -19dB gain. Note that alsamixer and amixer report the same gain but alsamixer uses its weird cubic scale to report the level while amixer uses a straight percent scale.

Code:
pi@rp3:~ $ amixer
Simple mixer control 'Master',0
 Capabilities: pvolume pswitch pswitch-joined
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 255
 Mono:
 Front Left: Playback 217 [85%] [-19.00dB] [on]
 Front Right: Playback 217 [85%] [-19.00dB] [on]

I played a couple 16/44.1 FLAC tracks and I'm not hearing any distortion when my downstream Amp volume control was cranked up to loud volume levels. The DAC is an Allo Katana.

You are welcome to zip up the track and send me a download link and I'll see if I can repro.

You might also want to open alsamixer and see if it reports the same gain as the amixer command.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#26
(06-23-2020, 05:10 PM)Tim Curtis Wrote: You might also want to open alsamixer and see if it reports the same gain as the amixer command.

With MPD volume control set to Software, knob in GUI set to 100%, and Max ALSA volume set to 85% from settings menu, I can observe the following:

Code:
#amixer output

Simple mixer control 'Analogue',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 1
  Mono:
  Front Left: Playback 1 [100%] [0.00dB]
  Front Right: Playback 1 [100%] [0.00dB]

Simple mixer control 'Digital',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 207
 Mono:
 Front Left: Playback 176 [85%] [-15.50dB] [on]
 Front Right: Playback 176 [85%] [-15.50dB] [on]

Alsamixer reports 100<>100 for Analog (0dB), and 55<>55 (-15.5dB) for Digital. When I try to move the Analog slider in alsamixer, it moves between 100 and 0 (0 dB or -6 dB, only two possible positions).

               

So, I don't see the GUI knob's volume anywhere, but it actually does controls the volume, and as I said before, it really clears up the distortion, while the ALSA setting - doesn't.

With MPD volume control set to Disabled, I get absolutely same results, it is just that the knob is now gone from GUI, hence no way to remove distortion.

Hope, this helps.

[UPDATE] The knob volume can be checked and set by mpc command:

Code:
$ mpc
volume:100%   repeat: off   random: off   single: off   consume: off


I can control it via command line as well as from GUI

Code:
$ mpc volume 70
volume: 70%   repeat: off   random: off   single: off   consume: off


If I set the MPD volume control set to Disabled, then the mpс volume is n/a

Code:
$ mpc
volume: n/a   repeat: off   random: off   single: off   consume: off

And finally, with MPD volume control set to Hardware, I can control the volume via mpc, and GUI, but as you said, it effectively controls the ALSA volume (digital).
Reply
#27
Looks normal to me. Both alsamixer and amixer both report the same gain of -15.5dB for the devices main volume control named "Digital". The Analog volume and Analog Boost or whatever its called are not really relevent. They are just two tweaking volumes on the analog side of the PCM5XXX chip.

Since I'm unable to reproduce the distortion you are experiencing there is not much more I can do.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#28
(06-23-2020, 07:18 PM)Tim Curtis Wrote: Looks normal to me. Both alsamixer and amixer both report the same gain of -15.5dB for the devices main volume control named "Digital".  The Analog volume and Analog Boost or whatever its called are not really relevent. They are just two tweaking volumes on the analog side of the PCM5XXX chip.

Since I'm unable to reproduce the distortion you are experiencing there is not much more I can do.

Well, yes, they are reporting the same (why wouldn't they), but the main point is that the mpd volume (GUI knob) is controlling something else, which is not the same as the ALSA volume (digital). Check my updated post for more info.

Obviously, you can't reproduce it on your side, since you don't have the same setup. Maybe I can provide some logs, or some other commands' output, if you like?

From this article I understand, that the MPD internal volume control is basically a modified datastream, which is fed to DAC, right? When the volume set to hardware, then it is just an unmodified stream along with a value to tell the DAC the desired volume. But the EQ itself it also modifying the stream (otherwise it wound't have effect), and hence can mess up things.

Maybe we just need to adjust the EQ limits (like set a lower master gain for it)?
Reply
#29
moOde knob just sends MPD the volume level (0 - 100) same as if u used the mpc command. Then MPD either alters the samples with its own Software volume routine before sending them to ALSA or it sends the desired volume level to the DAC's Hardware volume controller and then sends the samples as-is to ALSA. The DAC's Hardware volume controller will alter the samples using it's own volume algorithm.

One of my first quick test this morning was Pi4, Hifiberry DAC+Pro, Software volume 100%, ALSA volume 80%, GEQ Vinyl Touch and some 16/4.1 FLAC tracks.

I did not experience any distortion whatsoever no matter how loud I set the downstream Amp volume. I then wanted to see if the Software volume loudness issue was present in my other configs so I tested with my Katana rig and indeed it was present. I also tested the GEQ and ALSA Max volume on this rig and again no distortion.

Based on my tests there is potential issue with MPD Software volume but the Graphic EQ, ALSA volume and Max ALSA volume worked perfectly.

The Graphic EQ doesn't have a master gain and thus there's nothing to adjust.

Unless you or someone else can provide a way to reproduce this distortion you are experiencing there's no way to troubleshoot.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#30
(06-23-2020, 08:57 PM)Tim Curtis Wrote: moOde knob just sends MPD the volume level (0 - 100) same as if u used the mpc command. Then MPD either alters the samples with its own Software volume routine before sending them to ALSA or it sends the desired volume level to the DAC's Hardware volume controller and then sends the samples as-is to ALSA. The DAC's Hardware volume controller will alter the samples using it's own volume algorithm.

One of my first quick test this morning was Pi4, Hifiberry DAC+Pro, Software volume 100%, ALSA volume 80%, GEQ Vinyl Touch and some 16/4.1 FLAC tracks.

I did not experience any distortion whatsoever no matter how loud I set the downstream Amp volume. I then wanted to see if the Software volume loudness issue was present in my other configs so I tested with my Katana rig and indeed it was present. I also tested the GEQ and ALSA Max volume on this rig and again no distortion.

Based on my tests there is potential issue with MPD Software volume but the Graphic EQ, ALSA volume and Max ALSA volume worked perfectly.

The Graphic EQ doesn't have a master gain and thus there's nothing to adjust.

Unless you or someone else can provide a way to reproduce this distortion you are experiencing there's no way to troubleshoot.

Great! Thank you Tim for confirming my understanding of how the volume control works. It's all clear now.

I'll then send you the link to download the track, and will indicate the exact timecode where the distortion is audible the most.
Reply


Forum Jump: