<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>337034</bug_id>
          
          <creation_ts>2014-07-04 08:34:33 +0000</creation_ts>
          <short_desc>Knotification should use PA directly when available</short_desc>
          <delta_ts>2014-08-26 14:12:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-knotifications</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Cédric Bellegarde">web</reporter>
          <assigned_to name="Martin Klapetek">mklapetek</assigned_to>
          <cc>cfeck</cc>
    
    <cc>jlp</cc>
    
    <cc>kde.kfoar</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>silvan.calarco</cc>
    
    <cc>sitter</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1459239</commentid>
    <comment_count>0</comment_count>
    <who name="Cédric Bellegarde">web</who>
    <bug_when>2014-07-04 08:34:33 +0000</bug_when>
    <thetext>KDE 4 and KDE 5 use phonon for playing notification and so are unable to use media.role=event PulseAudio property.

This create weird bug like this:
https://bugs.kde.org/show_bug.cgi?id=324975

Reproducible: Always

Steps to Reproduce:
1. Mute notification volume in kmix
2. play a KDE notification
Actual Results:  
Knotity play sound

Expected Results:  
No sound

Two solution:
- Use PA when available in notifybyaudio.cpp
- Patch PulseAudio (if not already available) to be able to set PA properties

Temp fix, use this script as external notification executable:
$ cat /usr/local/bin/notify.sh 
#!/bin/bash
paplay --property=&quot;media.role=event&quot; &quot;$@&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1459322</commentid>
    <comment_count>1</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2014-07-04 14:02:31 +0000</bug_when>
    <thetext>Isn&apos;t Phonon our abstraction layer? What needs to be changed in Phonon, so that applications do not need to use PA directly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1459828</commentid>
    <comment_count>2</comment_count>
    <who name="Cédric Bellegarde">web</who>
    <bug_when>2014-07-07 12:18:00 +0000</bug_when>
    <thetext>A way to pass PA properties.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460052</commentid>
    <comment_count>3</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2014-07-08 08:29:20 +0000</bug_when>
    <thetext>internal mapping
https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L227

internal map application
https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1039

internal property creation
https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1195

internal override setting
https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1231

if stuff isn&apos;t behaving then it&apos;s because pulseaudio ignores overrides (which is the only way to set properties when using VLC (https://trac.videolan.org/vlc/ticket/9989)...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460053</commentid>
    <comment_count>4</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2014-07-08 08:32:42 +0000</bug_when>
    <thetext>Oh and in case you want to fix this in an multimedia library independent way here is the api proposal that needs implementing to provide a cache based playback (which in turn internally could use pulseaudio directoy as pulseaudio provides a sample cache api already).

http://markmail.org/thread/3yysp76oz7zjyr3t#query:+page:1+mid:3yysp76oz7zjyr3t+state:results</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460054</commentid>
    <comment_count>5</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2014-07-08 08:35:16 +0000</bug_when>
    <thetext>s/directoy/directly fwiw ^^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460128</commentid>
    <comment_count>6</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2014-07-08 14:50:19 +0000</bug_when>
    <thetext>knotify requests Phonon::NotificationCategory for its audio output from Phonon. If I understand comment #3 correctly, Phonon already has support for passing the category down to pulseaudio.

If this does not work correctly, the bug is either in Phonon, or in pulseaudio. Marking as NEEDSINFO, until someone clarifies the status of this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460194</commentid>
    <comment_count>7</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2014-07-08 21:01:06 +0000</bug_when>
    <thetext>Pulseaudio bug I say. I briefly talked with Colin Guthrie about this a while ago. What happens (and this only ever affects the vlc backend because of the videolan bug I mentioned in comment #3) is that phonon defines override variables in the envrionment before letting vlc create the pulseaudio sink. However pulseaudio then incorrectly merges the diverging data incorrectly, giving the data that vlc provides preference over the override which ultimately sets the role to video and not whatever was set by phonon.
This then bypasses the notification volume set in kmix as that doesn&apos;t apply to video role sinks and that&apos;s why it uses volume 1.0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460237</commentid>
    <comment_count>8</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2014-07-09 07:31:41 +0000</bug_when>
    <thetext>Thanks for the update. In other words, what knotify does is correct, and does not need to be changed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>