Package: kmilo Version: 4:3.5.8-1 Severity: normal Tags: patch kmilo fails to work properly on some case because it uses old dcop calls to control the master volume.
The funny thing is that the bug seems to be present only in the code of the generic case, and not present int the code for specific case like dell, vaio or thinkpad laptops. Here is a patch to fix this behaviour, it works perfectly on my laptop. Cheers, -- Emmanuel Bouthenot -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.23-1-686 (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages kmilo depends on: ii kdelibs4c2a 4:3.5.8.dfsg.1-7 core libraries and binaries for al ii libc6 2.7-6 GNU C Library: Shared libraries ii libgcc1 1:4.3-20080127-1 GCC support library ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library ii libpng12-0 1.2.15~beta5-3 PNG library - runtime ii libqt3-mt 3:3.3.7-9 Qt GUI Library (Threaded runtime v ii libsm6 2:1.0.3-1+b1 X11 Session Management library ii libstdc++6 4.3-20080127-1 The GNU Standard C++ Library v3 ii libx11-6 2:1.0.3-7 X11 client-side library ii libxext6 1:1.0.3-2 X11 miscellaneous extension librar ii libxtst6 2:1.0.3-1 X11 Testing -- Resource extension ii zlib1g 1:1.2.3.3.dfsg-11 compression library - runtime kmilo recommends no packages. -- no debconf information
diff -Naur kdeutils-3.5.8/kmilo/generic/generic_monitor.cpp kdeutils-3.5.8-new/kmilo/generic/generic_monitor.cpp --- kdeutils-3.5.8/kmilo/generic/generic_monitor.cpp 2007-05-14 07:40:46.000000000 +0000 +++ kdeutils-3.5.8-new/kmilo/generic/generic_monitor.cpp 2008-02-04 22:15:04.651307492 +0000 @@ -47,8 +47,6 @@ m_mute = false; m_progress = 0; - m_minVolume = 0; - m_maxVolume = 100; m_volume = 50; } @@ -92,7 +90,7 @@ { bool kmix_error = false; - DCOPReply reply = kmixClient->call("absoluteVolume", 0); + DCOPReply reply = kmixClient->call("masterVolume"); if (reply.isValid()) m_volume = reply; else @@ -104,7 +102,7 @@ if (kapp->startServiceByDesktopName("kmix")==0) // trying to start kmix { // trying again - reply = kmixClient->call("absoluteVolume", 0); + reply = kmixClient->call("masterVolume"); if (reply.isValid()) { m_volume = reply; @@ -122,10 +120,6 @@ return false; } else { - reply = kmixClient->call("absoluteVolumeMax", 0); - m_maxVolume = reply; - reply = kmixClient->call("absoluteVolumeMin", 0); - m_minVolume = reply; return true; } } @@ -134,11 +128,11 @@ { if (!retrieveVolume()) return; - - m_volume += (int)((m_maxVolume - m_minVolume) * step /100) +1; - if (m_volume > m_maxVolume) - m_volume = m_maxVolume; - + + m_volume += step; + if (m_volume > 100) + m_volume = 100; + displayVolume(); } @@ -147,10 +141,10 @@ if (!retrieveVolume()) return; - m_volume -= (int)((m_maxVolume - m_minVolume) * step /100) +1; - if (m_volume < m_minVolume) - m_volume = m_minVolume; - + m_volume -= step; + if (m_volume < 0) + m_volume = 0; + displayVolume(); } @@ -161,12 +155,11 @@ void GenericMonitor::displayVolume() { - _interface->displayProgress(i18n("Volume"), (int)(m_volume * 100 / (m_maxVolume - m_minVolume))); - + _interface->displayProgress(i18n("Volume"), m_volume); // If we got this far, the DCOP communication with kmix works, // so we don't have to test the result. - kmixClient->send("setAbsoluteVolume", 0, m_volume); - + kmixClient->send("setMasterVolume", m_volume); + // if mute then unmute if (m_mute) { diff -Naur kdeutils-3.5.8/kmilo/generic/generic_monitor.h kdeutils-3.5.8-new/kmilo/generic/generic_monitor.h --- kdeutils-3.5.8/kmilo/generic/generic_monitor.h 2007-05-14 07:40:46.000000000 +0000 +++ kdeutils-3.5.8-new/kmilo/generic/generic_monitor.h 2008-02-04 22:14:33.151808870 +0000 @@ -75,11 +75,9 @@ DCOPRef *kmixClient, *kmixWindow; int m_progress; - long m_volume, m_oldVolume; + int m_volume, m_oldVolume; bool m_mute; - - long m_maxVolume, m_minVolume; - + Monitor::DisplayType m_displayType; };