Bug 255246 - Notification volume control does not work with pulseaudio
Summary: Notification volume control does not work with pulseaudio
Status: RESOLVED DUPLICATE of bug 321172
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.6.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 19:35 UTC by Todd
Modified: 2013-07-04 00:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Todd 2010-10-25 19:35:15 UTC
Version:           1.0 (using KDE 4.5.2) 
OS:                Linux

In the notification settings "Player Settings" tab, there is a slider to control the notification volume.  This slider does not have any effect when pulse audio is being used.

Reproducible: Always

Steps to Reproduce:
1. Enable pulseaudio
2. Open the notifications system settings module
3. Select the "Player Settings" tab
4. Reduce the volume to 0% (as an example)
5. Click "Apply"
6. Select the "Applications" tab
7. Find a notification that you are sure works (KDE Workspace has many, Login is a good long sound)
8. Select the notification
9. Click the "Play" button at the bottom

Actual Results:  
1. The sound is audible

Expected Results:  
2. The sound is silent
Comment 1 Christoph Feck 2010-10-25 20:18:17 UTC
KNotify just uses Phonon::AudioOutput::setVolume() in the 0.0 ... 0.1 range, so it sounds like a Phonon bug.
Comment 2 Christoph Feck 2010-10-25 20:19:14 UTC
Sorry, I meant 0.0 (0%)... 1.0 (100%) range.
Comment 3 Harald Sitter 2011-03-02 03:00:09 UTC
Does this actually work without PulseAudio? I do not seem to get a call to setVolume in AudioOutput::setVolume at all in Phonon.
Comment 4 Colin Guthrie 2011-03-02 12:31:11 UTC
Yes this is a bit busted and I think I noticed this before (there is also a leak when using external players). I've actually been experimenting with this a bit of late and have nuked out that control in the GUI (the "Event Sounds" slider in kmix's Playback Streams tab effectively does that job for both KDE and Gtk event sounds.

In my experimental work, I've replaced Phonon with libcanberra in knotify - the only two options to play sound are "No Sound" and "Use Canberra". It works fine with ALSA and PulseAudio and can (eventually) even do neat things like support Sound Themes (FDO specification similar to the Icon Theme) and handle positional event sounds (e.g. sounds generated near the left of the screen come out mostly from the left speaker - although this requires further support in knotify to get that positional metadata passed through). It also takes care of sound sample caching for very quick playback (although it'll still be subject to DBus delays due to how knotify works).

In order of this to be universally accepted (there will no doubt be people who disagree with this approach!), I'll have to write a Phonon backend for libcanberra. This will allow the whole system to still work mostly as currently but with an added layer of abstraction in it when used on a non-PA or non-Linux system. Personally I think this is OK for the potential benefits libcanberra brings. It's already a dep for the Speaker Setup tab, so shouldn't be too much of an added burden. 

I've only done two patches so far... they are here:
http://colin.guthr.ie/git/kdebase-runtime/log/?h=canberra

It's based on kdebase-runtime from svn but still applies I believe. Will update to trunk/git master soon.
Comment 5 Harald Sitter 2011-03-02 21:37:19 UTC
Well, that is all nice but does not change the fact that I cannot trace the bug at hand back to phonon :)
Comment 6 Myriam Schweingruber 2013-04-13 07:58:31 UTC
Is this still an issue with Phonon 4.6 and a recent KDE 4.10.x?
Comment 7 Todd 2013-04-13 13:03:34 UTC
Yes, it is.
Comment 8 Harald Sitter 2013-07-03 22:39:05 UTC
Eh eh eh. Revelations!

could be bug 321172 and/or 321288 (more likely former though).
Comment 9 Harald Sitter 2013-07-04 00:03:20 UTC
And we have a winner.

*** This bug has been marked as a duplicate of bug 321172 ***