After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 584958 - Pulseaudio 0.9.15 Rhythmbox confuses application specific volume
Pulseaudio 0.9.15 Rhythmbox confuses application specific volume
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
0.12.x
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 587028 587123 590062 593164 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-05 20:16 UTC by Ernst Sjöstrand
Modified: 2009-09-27 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ernst Sjöstrand 2009-06-05 20:16:16 UTC
Please describe the problem:
Hi,

seems like Pulseaudio 0.9.15's new "flat volume" support (http://0pointer.de/blog/projects/oh-nine-fifteen.html)
confuses Rhyhmbox a lot.

WATCH YOUR EARS! What happens is that when you touch the Rhythmbox volume slider which is at 100%, it will set the volume for all of Pulseaudio to 100%.

Not really sure how this is supposed to work.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Jonathan Matthew 2009-06-06 02:36:03 UTC
What version of rhythmbox are you using?  Do you have crossfading enabled?

Can you provide some actual concrete steps to reproduce the problem?  I don't really know what your description means or what the problem actually is.
Comment 2 Ernst Sjöstrand 2009-06-06 09:28:22 UTC
So this is about the internal Rhythmbox volume control, that has a small slider in the top right corner.

Happens with both rhythmbox 0.12 and 0.12.2
Both with crossfading enabled and disabled.

Test setup:
Jaunty + Linux Kernel 2.6.30 + Alsa 1.0.19 + PA 0.9.15

I guess Karmic or Fedora 11 should be a good test setup also.

What happens with Pulse 0.9.14 (default Jaunty behavior):
1) You set the speaker volume to 30%
2) You set the volume in RB to 100%
Sound output is 30%

What happens with Pulse 0.9.15:
1) You set the speaker volume to 30%
2) You set the volume in RB to 100%
Sound output is 100%

This actually sounds like an API-break in Pulseaudio.
That, or you're not using the API in the correct way.
Comment 3 Jonathan Matthew 2009-06-06 09:36:33 UTC
To me, that sounds like exactly what the flat volume feature is supposed to do.

Rhythmbox doesn't use the pulseaudio API, and when using playbin2, all it does is set the playbin2 volume parameter.
Comment 4 Ernst Sjöstrand 2009-06-06 10:04:27 UTC
It says like this in the RB 0.12 release notes:
* If using pulseaudio, control the output volume using the PA stream volume

Well it's a big difference from how it works with PA 0.9.14, regression imho.
If you intend to keep this behaviour, there are two major problems though:

1) Doesn't read the correct application volume at startup. So the slider could be at 100% while the volume is at 20%, touching the slider will suddenly put the volume at 100%.

2) 1% volume on the slider == 58% volume in pulseaudio. There's some problem with the logaritmic vs linear values somewhere I'd guess.

Of cource I can report those as separate bugs when we are finished with this discussion.
Comment 5 Jonathan Matthew 2009-06-06 10:12:51 UTC
(In reply to comment #4)
> It says like this in the RB 0.12 release notes:
> * If using pulseaudio, control the output volume using the PA stream volume
> 
> Well it's a big difference from how it works with PA 0.9.14, regression imho.
> If you intend to keep this behaviour, there are two major problems though:

We don't even have a choice in the matter.  playbin2 uses the stream volume automatically.

> 1) Doesn't read the correct application volume at startup. So the slider could
> be at 100% while the volume is at 20%, touching the slider will suddenly put
> the volume at 100%.

I suppose we should read the volume from the stream once it's available.  I'll look into that.

> 2) 1% volume on the slider == 58% volume in pulseaudio. There's some problem
> with the logaritmic vs linear values somewhere I'd guess.

This sounds something like bug 571610.
Comment 6 Jonathan Matthew 2009-06-08 13:06:01 UTC
(In reply to comment #5)
> 
> > 1) Doesn't read the correct application volume at startup. So the slider could
> > be at 100% while the volume is at 20%, touching the slider will suddenly put
> > the volume at 100%.
> 
> I suppose we should read the volume from the stream once it's available.  I'll
> look into that.

So, with pulseaudio, the correct thing to do is to let it remember the application volume setting, which it restores and properly applies relative to the reference volume (or something like that anyway).  If we restore it ourselves, pulseaudio can't distinguish that from a user volume adjustment, so it (apparently) overrides the reference volume.

With anything else, the correct thing to do is to restore the last volume level that the user set.

Then there's the question of what to do if the user adjusts the volume before playing anything.
Comment 7 Jonathan Matthew 2009-06-15 12:20:31 UTC
fixed in commit 65f1f82ef9fda2f878be45aeef5ab26dbcf0beab

Now we only restore the previous volume when not using pulseaudio.  Everything else now works correctly as far as I can tell.
Comment 8 Jonathan Matthew 2009-06-26 09:48:25 UTC
*** Bug 587028 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Matthew 2009-06-27 23:57:20 UTC
*** Bug 587123 has been marked as a duplicate of this bug. ***
Comment 10 John Thacker 2009-07-09 14:37:05 UTC
This fix only works for me with crossfade enabled.  I'm using pulseaudio on F11.

If crossfade is not enabled, then every time a new track is selected (on initial start, with Previous, Next, or double-clicking on a track in the window), volume reduces to 40% of the previous value.  From 100% (full volume) to 40% to 16% to 6(.4)%, etc.  When rhythmbox advances to the next track in the playlist after a track finishes, all is normal, however.

With crossfading enabled, volume stays the same.
Comment 11 Moritz Mückschel 2009-07-12 08:36:47 UTC
I can confirm this on Ubuntu. With crossfading active it works correctly, without the master volume is still changed.
Comment 12 Jonathan Matthew 2009-07-28 20:50:34 UTC
*** Bug 590062 has been marked as a duplicate of this bug. ***
Comment 13 Bernhard Koenig 2009-08-21 21:06:36 UTC
Yeah, why is this resolved? I have the issue in current karmic (rhythmbox 0.12.3, pulseaudio 1:0.9.16~test5-0ubuntu2). I have it with or without cross-fading enabled.
Comment 14 Jonathan Matthew 2009-08-21 22:42:06 UTC
There was also a GStreamer component to the problem.  You probably don't have a version of GStreamer that includes the fix.
Comment 15 Jonathan Matthew 2009-08-26 21:33:44 UTC
*** Bug 593164 has been marked as a duplicate of this bug. ***
Comment 16 John Thacker 2009-09-27 14:22:51 UTC
"So, with pulseaudio, the correct thing to do is to let it remember the
application volume setting, which it restores and properly applies relative to
the reference volume (or something like that anyway)."

But this is weird, because the reference volume gets restored when rhythmbox quits, but the application volume setting gets remembered as "x dB compared to reference volume."

This happens to me and is reproducible:
1) Set reference volume to -20 dB with rhythmbox not running.
2) Start rhythmbox and start playing a file.  Raise rhythmbox volume to 100%, which sets the pulseaudio main volume to 0 dB.
3) Quit rhythmbox; the pulseaudio reference volume is restored to -20 dB.
4) Change the pulseaudio reference volume to 0 dB, increasing it by 20 dB.
4) Start rhythmbox again and start playing.  The pulseaudio main volume gets set to 0 dB (old application level) + 20 dB (change in pulseaudio main volume since last run) = 20 dB, which is over 100% and results in clipping and other nasty stuff.  Can hurt your ears.