Bug 327279

Summary: Volume control is broken with pulseaudio
Product: [Frameworks and Libraries] Phonon Reporter: Cédric Bellegarde <web>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: martin.sandsmark, myriam, rdieter, romain.perier
Priority: NOR    
Version: 4.7.0   
Target Milestone: 4.8   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.1
Sentry Crash Report:
Attachments: Complete debug file

Description Cédric Bellegarde 2013-11-07 15:05:54 UTC
When trying to set volume from amarok or dragonplayer, nothing happen.

Reproducible: Always

Steps to Reproduce:
1. Have pulseaudio4 installed
2. launch amarok or dragonplayer
3. try to change volume
Actual Results:  
Nothing happen

Expected Results:  
volume changed

downgrading to phonon 4.6 fix issue
Comment 2 Cédric Bellegarde 2013-11-07 15:09:28 UTC
Debug info:

"PulseSupport(2): Attempting to set volume to 0.2 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.17 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.14 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.11 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.14 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
Calling appendChild() on a null node does nothing.
"PulseSupport(2): Attempting to set volume to 0.17 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.14 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.11 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.08 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.11 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended" 
"PulseSupport(2): Attempting to set volume to 0.14 for Output Stream {c835c20c-9c3f-40b7-8d7b-51172cbd41ef}" 
"PulseSupport(2): Setting volume on an invalid stream ..... this better be intended"
Comment 3 Harald Sitter 2013-11-07 15:12:39 UTC
The entire log please with all debug enabled.
Comment 4 Cédric Bellegarde 2013-11-07 15:17:28 UTC
Created attachment 83404 [details]
Complete debug file
Comment 5 Harald Sitter 2013-11-07 15:17:31 UTC
Git commit f278a93493ac04ce04d48e8e5b5158caa0621ce3 by Harald Sitter.
Committed on 07/11/2013 at 15:16.
Pushed by sitter into branch '4.7'.

Ensure the PulseAudio envrionment is set up when running older backends

This ensures that pre-4.7 backends (expecting the environment to be
set up by libphonon) retain working volume control.
FIXED-IN: 4.7.1

M  +2    -0    phonon/audiooutput.cpp

http://commits.kde.org/phonon/f278a93493ac04ce04d48e8e5b5158caa0621ce3
Comment 6 Harald Sitter 2013-11-07 15:20:03 UTC
<apachelogger> you have to update phonon-gstreamer/phonon-vlc as well
<gnumdk> apachelogger: using ArchLinux so up to date ;) As i was sure Kubuntu was not broken, i tried to downgrade phonon

As I said, please make sure you have phonon-vlc 0.7.0 installed.
Comment 7 Cédric Bellegarde 2013-11-07 15:24:45 UTC
gnumdk@arch:~$ pacman -Q|grep phonon
phonon-qt4 4.7.0-2
phonon-vlc 0.7.0-1
Comment 8 Cédric Bellegarde 2013-11-07 15:25:31 UTC
Applying your patch fix issue.
Comment 9 Harald Sitter 2013-11-07 15:39:05 UTC
The backend was not built against libphonon 4.7.0 then. When built against libphonon 4.7 the cmake output of the backend should contain "Building against Phonon 4.7 API", otherwise it won't use the new interfaces for PulseAudio setup.

You may want to report a bug against Arch I suppose.
Comment 10 Rex Dieter 2013-11-11 15:25:14 UTC
I can reproduce the same symptoms using phonon-4.7.0 and phonon-backend-gstreamer-4.7.0 (confirmed built against phonon-4.7.0), though it's build output doesn't mention anything like "Building against Phonon 4.7 API"

testing the referenced commit now...
Comment 11 Harald Sitter 2013-11-11 15:36:24 UTC
pgst doesn't mention what API it builds against
Comment 12 Rex Dieter 2013-11-11 16:27:42 UTC
oddly enough,
* using a patched phonon per commit referenced in comment #5 seems to help
* rebuilding pgst again, seems to help too, and it's no longer reproducible.

curse you gremlins
Comment 13 Harald Sitter 2013-11-12 12:41:24 UTC
Found the problem. I have not the slightest idea how it can work for some builds and not for others.... oddest thing in the world.
Comment 14 Harald Sitter 2013-11-12 12:53:59 UTC
Git commit 6d6889ea87d10aac2a3627cc98ddd8d308974952 by Harald Sitter.
Committed on 12/11/2013 at 12:53.
Pushed by sitter into branch '4.7'.

use backend_version define as option for automoc + debug API target

otherwise classes may get moced with the wrong interface version setup.
also imported API target debug from VLC to make it obvious in the cmake
output what API target will be used.
FIXED-IN: 4.7.1

M  +24   -4    gstreamer/CMakeLists.txt

http://commits.kde.org/phonon-gstreamer/6d6889ea87d10aac2a3627cc98ddd8d308974952