-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
droid-sink: use UI volume for voice volume #119
base: master
Are you sure you want to change the base?
droid-sink: use UI volume for voice volume #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add following to the commit body:
[droid-sink] Use UI volume for voice volume. Fixes JB#60853
f9269b0
to
bdbb85c
Compare
Done, and rebased. Please take another look. |
Sorry I probably wasn't clear enough, I meant to add it to the body of message, so the commit message would be
|
`set_voice_volume()` accepts value from 0.0 to 1.0 of unspecified scale. Previously, we were using `pa_sw_volume_to_linear()` as an input for this function, but it turns out that the volume wasn't gradual (the voice call remained silent until ~50% UI volume). From reading Android code, it seems like the input of this function scales linearly with the UI value. Thus, it's better to feed the UI- based value to this function. Even though I still can't find if PA's volume (cubic) is the same scale as `set_voice_volume()` (and thus the dB value in PA could be incorrect), at least from my brief testing it already sounds better. [droid-sink] Use UI volume for voice volume. Fixes JB#60853
bdbb85c
to
5a12ab1
Compare
Oh Ok. Does this look good now? |
Heh, it's been some time since I was last working with pulseaudio things so I didn't think through the first time. :) So here goes, the default volume steps for voice call are really not that great and pretty much are legacy dating from Jolla1 times. So they don't really map at all for anything recent. They can (and thus should) be defined for each adaptation. For reference you could check for example how Xperia 10 III has been set up. Since different devices may have different volume curves for voice afaik I'm not sure if some better generic defaults would be ok, at least we should increase the steps to more than 6 (which again is legacy from Jolla1 times, where there were actually only 6 different volume levels for voicecalls in the Jolla1 hal implementation). Anyways, I think it should be possible to figure out usable and good steps using the mainvolume configuration, let me know if you have any issues there. |
Err... not sure I follow you here. This patch originates from Ubuntu Touch, which doesn't have 'MainVolume' module to define each step's value. We assume that Pulseaudio's volume slider will do the sane thing and causes the volume to gradually increase (perceptually). If, however, Pulseaudio needs another table to define the sane steps, then my feeling is that PA or its modules are doing something wrong. In this case, I believe the wrong doing is in passing a "linear" volume to You'll notice that, in the example file you linked, the differences of each step for call is different, but the differences between each step for media is the same. However, if I understand the code correctly, this is supposed to control the same PA software volume. This makes me feel like the 'MainVolume' table is a workaround for the broken scale translation. But Ok, I figured out that if you do merge this, then it'll be a breaking change in SailfishOS that every port will have to fix. So... not sure how to proceed here. |
set_voice_volume()
accepts value from 0.0 to 1.0 of unspecified scale. Previously, we were usingpa_sw_volume_to_linear()
as an input for this function, but it turns out that the volume wasn't gradual (the voice call remained silent until ~50% UI volume).From reading Android code, it seems like the input of this function scales linearly with the UI value. Thus, it's better to feed the UI- based value to this function. Even though I still can't find if PA's volume (cubic) is the same scale as
set_voice_volume()
(and thus the dB value in PA could be incorrect), at least from my brief testing it already sounds better.