You are not logged in.

#1 2016-04-23 20:40:19

tonnz
Member
Registered: 2015-08-02
Posts: 38

PulseAudio Volume Control seems (non-) linear/"wrong"

Hello,

when i reduce the audio volume from 100% (perceived as "way too loud") to 50%, it becomes "way too low". And i would not describe the perception as "half as loud". If i reduce it to 25%, it is barely audible, which i definitely would not describe as "a quarter as loud".
I investigated this issue a bit and found out that the human perception of "volume" follows a logarithmic scale. PulseAudio does not seem to account for that in my case, that would explain what i am hearing.

Is this the expected volume behaviour of PulseAudio? Or is there an issue with my setup? I had a look into the PulseAudio preferences and i did not find anything related to my problem.
All i could find with google is this Thread on the Ubuntu Forums. I tried to apply the proposed fix, but that resulted in no sound at all.
I searched the Wiki for a solution, the only thing that seems to be remotely related to my problem is the fix listed under No sound below a volume cutoff. I applied this fix and the audio control seems to be better at lower volumes, but as the volume approaches 100% the perceived volume rises yet again way too quickly.

This may seem like a minor issue to some, but i find this extremely annoying. Maybe i am just used to the volume behavior of Windows, but it has been almost a year now since my transition from Windows to Arch Linux and i am still not used to it.
It would be great if anyone knows how to fix this problem!

Last edited by tonnz (2016-04-23 20:43:29)

Offline

#2 2016-04-23 21:34:41

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

I would cross check what pulse is doing by comparing with the information from alsamixer(1), it may be that pulse is changing the volume by changing the hardware control (changing too fast) and then after some point it is doing software volume control.

(1) Make sure that you are not checking the generic PulseAudio Card/Chip but your actual soundcard.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2016-04-23 22:06:20

tonnz
Member
Registered: 2015-08-02
Posts: 38

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

R00KIE wrote:

I would cross check what pulse is doing by comparing with the information from alsamixer(1), it may be that pulse is changing the volume by changing the hardware control (changing too fast) and then after some point it is doing software volume control.

(1) Make sure that you are not checking the generic PulseAudio Card/Chip but your actual soundcard.

Thank you for your reply.
I checked it as you advised, and there is indeed a discrepancy. The volume reported by alsamixer is lower than the volume i set using pavucontrol (i chose the correct card/chip as you wrote using the -c switch).
This suggests that there is in fact some compensation for the human perception of volume going on, right?
I graphed the data, here it is:
http://i.imgur.com/EMAp7aM.png?2

Looks pretty exponential (or is it a square function?). So is it just me? I double checked, both Android and Windows volume controls appear more "correct" for me, there definitely is something different going on with PulseAudio.

EDIT: I don't think i understand this correctly. Shouldn't the compensation go the other way, i mean, shouldn't the graph rise more slowly at higher volumes, instead of faster, to compensate for the human perception?

Last edited by tonnz (2016-04-23 23:25:32)

Offline

#4 2016-04-23 22:48:55

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

The volume reported by alsamixer might be in dB or in percentage I suspect, without thinking about it for a while and doing some research I can't say outright how dB should relate to percentage so that it is perceived as a linear change. It is also not obvious to me if the volume is reported in percentage, how it should be changed so that the change sounds linear.

I seem to recall that pulse had some "tricks" relating to how the percentage in pavucontrol related to dBs. If I recall correctly this was related to how some cards report volume in dBs and others in percentage.

What I meant in my previous post is something like this, I have one headset where from 100% to 20% volume (in pavucontrol) pulseaudio changes the volume control of the headset directly, below 20% it is doing software volume control.

All that said, this may be something you should inquire about in pulseaudio's mailing list or in the IRC, they should be the ones more qualified to answer this questions, although I suspect there may be some users here in the forums with very good knowledge about audio stuff. You might also want to try inquiring about this in arch's general mailing list, with a well worded question of course, as some of the users might not frequent the forums.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-04-23 22:51:32

tonnz
Member
Registered: 2015-08-02
Posts: 38

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

Here is a follow up.
Keep in mind that i am no expert on sound or the perception of sound. But if i was tasked to implement a volume control, i would chose something like the ln-function, for reasons mentioned in my previous reply.
(Quick and dirty graph done using online-tools and gimp because i am a noob)
http://i.imgur.com/jQcoW6J.png?1
How is PulseAudio supposed to scale the volume?

Last edited by tonnz (2016-04-23 23:25:00)

Offline

#6 2016-04-23 22:53:51

tonnz
Member
Registered: 2015-08-02
Posts: 38

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

R00KIE wrote:

All that said, this may be something you should inquire about in pulseaudio's mailing list or in the IRC, they should be the ones more qualified to answer this questions, although I suspect there may be some users here in the forums with very good knowledge about audio stuff. You might also want to try inquiring about this in arch's general mailing list, with a well worded question of course, as some of the users might not frequent the forums.

I will follow these suggestions once i have some more time, probably monday evening.
Thank you for your help!

Last edited by tonnz (2016-04-23 22:54:13)

Offline

#7 2016-04-23 23:28:21

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

Please don't post big images directly[1]. Edit your previous posts and replace the images with links (with small thumbnails if you wish) to an image hosting site of your choice or smaller images. If you don't we moderators will just replace them with links to an image hosting site (one you might not like).

[1] https://wiki.archlinux.org/index.php/Fo … s_and_code

Edit:
You may want to take a look at these, they are old but should provide some info.
https://bugzilla.redhat.com/show_bug.cgi?id=502057
http://comments.gmane.org/gmane.comp.au … neral/3585

Last edited by R00KIE (2016-04-23 23:43:52)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2016-04-23 23:31:22

tonnz
Member
Registered: 2015-08-02
Posts: 38

Re: PulseAudio Volume Control seems (non-) linear/"wrong"

R00KIE wrote:

Please don't post big images directly[1]. Edit your previous posts and replace the images with links (with small thumbnails if you wish) to an image hosting site of your choice or smaller images. If you don't we moderators will just replace them with links to an image hosting site (one you might not like).

[1] https://wiki.archlinux.org/index.php/Fo … s_and_code

Yep, sorry. I just saw a similar complaint in another post a couple of minutes ago and changed the images to links immediately.

Offline

Board footer

Powered by FluxBB