<?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>308014</bug_id>
          
          <creation_ts>2012-10-07 10:51:22 +0000</creation_ts>
          <short_desc>Information via DBus does not update properly</short_desc>
          <delta_ts>2012-12-06 00:17:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmix</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>VHI</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Igor Poboiko">igor.poboiko</reporter>
          <assigned_to name="Christian Esken">esken</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/kmix/aaf1ef9224441d05b937e77180380238b386f887</cf_commitlink>
          <cf_versionfixedin>4.10</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1303891</commentid>
    <comment_count>0</comment_count>
    <who name="Igor Poboiko">igor.poboiko</who>
    <bug_when>2012-10-07 10:51:22 +0000</bug_when>
    <thetext>When I cange volume using KMix, the DBus wrapper does not get these updates so it cannot populate new volume level via DBus. The problem is that when DBusMixerWrapper is created, it adds itself as a listener for mixer (e.g PulseAudio::Playback_Devices:0), and then mixers ID changes (using recreateId() method, e.g to PulseAudio::Playback_Devices:1). And this leads to this bug (DBusMixerWrapper does not listen to changes related to new mixer, which is actually the old one but with new id).

I can propose following solutions:
1) When mixerId changes, reconnect all the listeners from old mixerId to the new one (needs changes in ControlManager)
2) Or just reconnect it manually on recreateId (by calling removeListener and addListener from DBusMixerWrapper).

Reproducible: Always




This bug is in latest git snapshot, the version shipped with distro is not affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304040</commentid>
    <comment_count>1</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-10-07 21:42:23 +0000</bug_when>
    <thetext>Thanks for the info, Igor. I&apos;ll try to fix it. My current idea is to create the DBusMixerWrapper later, when the device has the correct ID.

This must really really be fixed.

I am also wondering why the device ID changes at all. In my understanding there should only be just PulseAudio::Playback_Devices:0, never PulseAudio::Playback_Devices:1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304055</commentid>
    <comment_count>2</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-10-07 23:04:12 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Thanks for the info, Igor. I&apos;ll try to fix it. My current idea is to create
&gt; the DBusMixerWrapper later, when the device has the correct ID.
&gt; 
&gt; This must really really be fixed.
&gt; 
&gt; I am also wondering why the device ID changes at all. In my understanding
&gt; there should only be just PulseAudio::Playback_Devices:0, never
&gt; PulseAudio::Playback_Devices:1

OK, PulseAudio::Playback_Devices:1 is correct (cards start with instanceNumber() 1, while controls start with number 0).
I also found an issue with the experimental mulit-driver mode: The DBUS API is broken with it, as there are multiple cards &quot;0&quot;, and they seem to map the same DBUS object. So for example Mixers-&gt;2 contains a driverName == &quot;PulseAudio&quot;, but also contains ALSA controls. I also need to fix it for KDE 4.10.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314962</commentid>
    <comment_count>3</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-11-13 00:01:47 +0000</bug_when>
    <thetext>Git commit cb7e8e787a77fec416b3cdc853e515de89034b42 by Christian Esken.
Committed on 13/11/2012 at 01:00.
Pushed by esken into branch &apos;master&apos;.

Starting to fix the DBUS interface. It still does not work, but the issue is understood.
mixer-&gt;openIfValid() requires the cardId, and then everything should be fine.

M  +0    -8    backends/kmix-backends.cpp
M  +1    -1    backends/mixer_backend.cpp
M  +11   -0    backends/mixer_backend.h
M  +15   -6    core/mixer.cpp
M  +17   -6    core/mixertoolbox.cpp
M  +1    -0    dbus/dbusmixerwrapper.cpp

http://commits.kde.org/kmix/cb7e8e787a77fec416b3cdc853e515de89034b42</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1314964</commentid>
    <comment_count>4</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-11-13 00:10:37 +0000</bug_when>
    <thetext>@Igor We cannot use this simple numbering scheme for DBusMixerWrapper::DBusMixerWrapper(Mixer* parent, const QString&amp; path). path used to be &quot;/Mixers/0&quot;, &quot;Mixers/1&quot; and so forth. But these numbers are not really unique - I propose to use fully qualified names like &quot;ALSA::Creative_X-Fi:1&quot; instead.
Is that OK for you, Igor?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1315635</commentid>
    <comment_count>5</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-11-14 20:24:57 +0000</bug_when>
    <thetext>Git commit aaf1ef9224441d05b937e77180380238b386f887 by Christian Esken.
Committed on 14/11/2012 at 21:21.
Pushed by esken into branch &apos;master&apos;.

Fix DBus interface (which was broken in trunk by my communication architecture upgrade.
The Mixer names are also now full qualified Mixer ID&apos;s instead of simple numbers - this is required as the ID&apos;s conflict in a multi-backend setup.

M  +3    -3    CMakeLists.txt
M  +21   -15   core/mixer.cpp
M  +5    -8    core/mixer.h
M  +16   -14   core/mixertoolbox.cpp
M  +2    -8    dbus/dbusmixerwrapper.cpp
M  +1    -1    gui/kmixdockwidget.cpp

http://commits.kde.org/kmix/aaf1ef9224441d05b937e77180380238b386f887</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1316063</commentid>
    <comment_count>6</comment_count>
    <who name="Igor Poboiko">igor.poboiko</who>
    <bug_when>2012-11-16 13:53:53 +0000</bug_when>
    <thetext>There is still a problem: sometimes when controls are added, the &quot;_id&quot; property of the mixer is an empty string, so mixers dbus path is wrong (and so is control&apos;s path). The debug output is:

kmix(8401) Mixer::dbusPath: Late _id= &quot;&quot;
kmix(8401) Mixer::dbusPath: handMade= &quot;/Mixers/PulseAudio_PlaybackxDevices&quot;
QDBusConnection for control created &quot;/Mixers//alsa_output_pci_0000_01_00_1_hdmi_stereo&quot; 
kmix(8401) Mixer_PULSE::addDevice: Adding Pulse volume  &quot;alsa_output.pci-0000_00_1b.0.analog-stereo&quot; , isCapture=  false , devnum= 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1316065</commentid>
    <comment_count>7</comment_count>
    <who name="Igor Poboiko">igor.poboiko</who>
    <bug_when>2012-11-16 13:54:59 +0000</bug_when>
    <thetext>And, BTW, everything should work fine with new DBus paths.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1316433</commentid>
    <comment_count>8</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-11-18 12:24:51 +0000</bug_when>
    <thetext>Need to look into the &quot;empty id&quot; thing. Reopeni g.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321155</commentid>
    <comment_count>9</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-12-04 23:27:04 +0000</bug_when>
    <thetext>The empty &quot;_id&quot; are for the MixDevice instances. Thanks for being so observant, Igor. Its a actually a design bug [1], but I worked around it for KDE 4.10. Additionally I applied the changes from https://git.reviewboard.kde.org/r/107439/ . According to the logs there are no empty _id values any longer, and I tested with qdbusviewer - as far as I see everything is fine now.

Igor, a confirmation from you would be appreciated.



[1] Parts of the ID of a Mixer(Backend) are constructed outside the Mixer(Backend), namely the cardInstance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321156</commentid>
    <comment_count>10</comment_count>
    <who name="Christian Esken">esken</who>
    <bug_when>2012-12-04 23:31:11 +0000</bug_when>
    <thetext>Git commit 8241b0e9776fbebb8c2d07abcd008eededc07bd8 by Christian Esken.
Committed on 05/12/2012 at 00:30.
Pushed by esken into branch &apos;master&apos;.

Fix wrong DBus paths for the MixDevice instances

M  +22   -4    core/mixer.cpp

http://commits.kde.org/kmix/8241b0e9776fbebb8c2d07abcd008eededc07bd8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321287</commentid>
    <comment_count>11</comment_count>
    <who name="Igor Poboiko">igor.poboiko</who>
    <bug_when>2012-12-05 12:25:58 +0000</bug_when>
    <thetext>As for me everything seem to work fine now. :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>