After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571145 - media-keys plugin no longer supports gstreamer/alsa/oss
media-keys plugin no longer supports gstreamer/alsa/oss
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2009-02-10 08:06 UTC by Nirbheek Chauhan
Modified: 2011-07-11 11:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Re-add AcmeVolume control support via extensive and ugly ifdefs (60.56 KB, patch)
2009-02-10 08:07 UTC, Nirbheek Chauhan
none Details | Review
patch001 (28.94 KB, patch)
2009-04-07 17:47 UTC, Romain Perier
none Details | Review
The correct patches fixed (the last version) (29.29 KB, patch)
2009-04-08 17:41 UTC, Romain Perier
none Details | Review
new patch (29.28 KB, patch)
2009-04-09 19:39 UTC, Romain Perier
none Details | Review
gentoo gnome-overlay patch (29.15 KB, patch)
2009-04-12 16:59 UTC, Romain Perier
none Details | Review
patch more factorized and fix a bug compile (29.15 KB, patch)
2009-04-15 17:43 UTC, Romain Perier
none Details | Review
factorized and clean again (29.36 KB, patch)
2009-04-15 17:52 UTC, Romain Perier
none Details | Review
a new patch version, which normally should be work (29.48 KB, patch)
2009-04-16 20:05 UTC, Romain Perier
none Details | Review
gnome-settings-daemon-2.26.1-readd-gst-vol-control-support.patch (29.64 KB, patch)
2009-04-19 18:51 UTC, Romain Perier
needs-work Details | Review
Updated patch for 2.27.5 (26.96 KB, patch)
2009-08-14 08:16 UTC, Nirbheek Chauhan
needs-work Details | Review
Patch with mentioned problems fixed (25.73 KB, patch)
2009-08-14 09:51 UTC, Nirbheek Chauhan
needs-work Details | Review
Updated patch for g-s-d 2.28.0 (24.38 KB, patch)
2009-10-09 15:54 UTC, Emilio Pozuelo Monfort
none Details | Review
updated patch (27.17 KB, patch)
2010-07-09 16:53 UTC, Brian Cameron
none Details | Review

Description Nirbheek Chauhan 2009-02-10 08:06:04 UTC
Although pulseaudio is now officially an external dependency of GNOME 2.26, it would be nice to have some sort of transition period towards it. Similar to how gnome-applets now lists mixer_applet as "deprecated".

Right now, distros such as Gentoo, Debian, etc which do not want to force pulseaudio on users have no choice but to stick with gnome-settings-daemon 2.24, which will invariably cause great grief and constipation among GNOME downstream packagers.

Please reconsider adding the AcmeVolume control stuff back with appropriate "Deprecated" tags affixed. Attached below is a patch which #ifdefs the old code into plugins/media-keys/ as appropriate.
Comment 1 Nirbheek Chauhan 2009-02-10 08:07:31 UTC
Created attachment 128357 [details] [review]
Re-add AcmeVolume control support via extensive and ugly ifdefs

This patch can also be git am-ed if preferred.
Comment 2 Jens Granseuer 2009-02-10 18:05:11 UTC
First of all, I could see us adding (parts of) the old backend back. However:

* the only supported AcmeVolume backend was GStreamer. The others were unmaintained and untested, and I don't think it makes sense to put them back. The code could be simplified and reduced quite a bit if the AcmeVolume abstraction was dropped completely.

* the code needs to be cleanly separated from the new paths. An ifdef jungle makes the whole thing unmaintainable.
Comment 3 Lin Ma 2009-04-07 07:06:57 UTC
Is there any process for this bug? Media-key is also broken on Solaris which lacks PulseAudio.
Comment 4 Nirbheek Chauhan 2009-04-07 07:14:15 UTC
(In reply to comment #3)
> Is there any process for this bug? Media-key is also broken on Solaris which
> lacks PulseAudio.
> 

There is some progress on the downstream bug[1], the contributor will post a cleaned-up patch here soon.


1. http://bugs.gentoo.org/show_bug.cgi?id=264883
Comment 5 Lin Ma 2009-04-07 07:26:01 UTC
> There is some progress on the downstream bug[1], the contributor will post a
> cleaned-up patch here soon.
> 
> 
> 1. http://bugs.gentoo.org/show_bug.cgi?id=264883
> 

Thanks Nirbheek. So I could copy the patch shamelessly and base my work on it instead of creating a new patch myself :)
Comment 6 Romain Perier 2009-04-07 16:02:35 UTC
Yeah , i'm removed acme-volume-[alsa|oss|dummy] module and clean-up acme-volume-gstreamer.c which i removed to acme-volume.c (because there is just one module now), i re-written his interface too (to avoiding to rewrite some parts of gs-media-keys-manager.c) i'll make some clean-up for gsd-media-keys-manager.c and i think that i could submit the patch this evening :)
Comment 7 Romain Perier 2009-04-07 17:47:17 UTC
Created attachment 132286 [details] [review]
patch001
Comment 8 Romain Perier 2009-04-07 17:54:31 UTC
The new patch is finished :

* I removed plugins/media-keys/actions/acme-volume-[alsa|oss|dummy].*
  and acme-volume ABC (Abstract Base Class)
* I cleaned-up code in plugins/media-keys/actions/acme-volume.c
  and re-written the interface indentically to acme-volume ABC (avoiding to re-write some parts in plugins/media-keys/gsd-media-keys-manager.c for nothing)

* I updated plugins/media-keys/actions/Makefile.am
* I updated the configure.ac to only support --enable-gstreamer, so --enable-[alsa|oss] have been removed
* I updated plugins/media-keys/Makefile.am indentically to the orig patches.
* I Fixed the bug which blocked the volume when mixer was muted
  (if we decreased the volume to zero, it was muted, but it was impossible to increase it, see do_sound_action function with a appropriated comment :) )

mrpouet
Comment 9 Romain Perier 2009-04-07 17:55:12 UTC
Ps: and i cleaned some ifdef (the most as possible) in plugins/media-keys/gsd-media-keys-manager.c  :p
Comment 10 Nirbheek Chauhan 2009-04-08 10:31:58 UTC
(In reply to comment #7)
> Created an attachment (id=132286) [edit]
> the new patch cleaned-up and which work perfectly
> 

Verified to work, and is now used in our gnome-2.26 overlay.
Comment 11 Romain Perier 2009-04-08 17:04:35 UTC
This patch doesn't work it we execute configure script with --disable-gstreamer --disable-pulse options, this  is due to #else directive in code (#else to #ifdef HAVE_PULSE) , i'll fix it and submit the corrected patch :)
Comment 12 Romain Perier 2009-04-08 17:40:33 UTC
Comment on attachment 132286 [details] [review]
patch001

out-dated
Comment 13 Romain Perier 2009-04-08 17:41:34 UTC
Created attachment 132353 [details] [review]
The correct patches fixed (the last version)
Comment 14 Romain Perier 2009-04-08 17:42:29 UTC
the correct patch is submitted in attachment , sorry for the forget :)
Comment 15 Romain Perier 2009-04-09 19:38:12 UTC
Comment on attachment 132353 [details] [review]
The correct patches fixed (the last version)

outdated
Comment 16 Romain Perier 2009-04-09 19:39:18 UTC
Created attachment 132424 [details] [review]
new patch
Comment 17 Romain Perier 2009-04-09 19:40:47 UTC
new patch was attached, i cleaned some code, and fixed compilation failed without gstreamer support, i added AC_DEFINE call if gstreamer is enable (the macroconstant HAVE_GSTREAMER was not defined in config.h before)

mrpouet
Comment 18 Romain Perier 2009-04-12 16:59:56 UTC
Created attachment 132559 [details] [review]
gentoo gnome-overlay patch
Comment 19 Romain Perier 2009-04-12 17:02:35 UTC
patch was corrected due to an compilation error with pulseaudio support, and an run-time execution, tested and reviewed by the developpers.

you'll can find the new patch in attachment
Comment 20 Nirbheek Chauhan 2009-04-13 15:25:59 UTC
Is it possible to have this included in 2.26.1? A lot of people would benefit from this :)

thanks
Comment 21 Jens Granseuer 2009-04-14 17:10:55 UTC
The rate of recent changes has kept me from even looking at the patch until now, and doesn't really suggest it's a good candidate for inclusion in a stable release just yet. So no, sorry.
Comment 22 Nirbheek Chauhan 2009-04-14 17:15:48 UTC
(In reply to comment #21)
> The rate of recent changes has kept me from even looking at the patch until
> now, and doesn't really suggest it's a good candidate for inclusion in a stable
> release just yet. So no, sorry.
> 

No problem, we'll be including this in our release though, since we can't really force our users to use pulseaudio (the ensuing bug-flood would cripple us :).

We'll keep updating this bug with any fixes we find along the way.

Thanks!
Comment 23 Josselin Mouette 2009-04-15 13:05:07 UTC
Apparently there are some crashes caused by this patch:
http://bugs.debian.org/524164 http://bugs.debian.org/524165

I’m investigating this, but maybe Romain will have more clues.
Comment 24 Romain Perier 2009-04-15 16:37:15 UTC
Yeah, but if you have a look to the backtrace attached to the debian bugs, there is mainly causes apparently by gdk functions, the top of the stack is :
  • #0 gdk_window_get_offsets
    at /tmp/buildd/gtk+2.0-2.16.1/gdk/gdkwindow.c line 1320

my patch updates and add plugins/media-keys/actions/acme-volume.[c|h], in which an Gobject is added to simply use gstreamer volume control (control mixer and tracks)

it's also updates plugins/media-keys/gsd-media-keys-manager.c do add the appropriate handler to handle KEY_UP/KEY_DOWN/KEY_MUTE (which use acme_volume object). The only logical link that I see with gdk is eventually glade control volume panel, but i've not updated this part.


i could be wrong, of course ;) , can anyone could fully test this patch (for an other distribution if it's possible) , to report any problem or issue ?
Comment 25 Romain Perier 2009-04-15 17:43:50 UTC
Created attachment 132719 [details] [review]
patch more factorized and fix a bug compile
Comment 26 Romain Perier 2009-04-15 17:52:28 UTC
Created attachment 132720 [details] [review]
factorized and clean again
Comment 27 Lin Ma 2009-04-16 07:21:39 UTC
Thanks Romain, applied it to gnome 2.26 on Solaris.
Comment 28 Romain Perier 2009-04-16 08:08:15 UTC
wow cool :), i found the causes of the segfault :

it's apparently due when you defines a device for /desktop/gnome/sound/default_mixer_device (which was empty for me that's why i was unable to reproduice the problem), if i specifi "alsamixer:hw:0" into it, it's crashes apparently due to acme_volume_open.

i'll have a look to code, and find the problem, so please Mask this version, or put it to experimental branch (depending of the distribution) waiting i find a real issue.

thanks ;)
Comment 29 Romain Perier 2009-04-16 20:05:57 UTC
Created attachment 132788 [details] [review]
a new patch version, which normally should be work
Comment 30 Romain Perier 2009-04-16 20:09:03 UTC
anyone can test the new patch ? (if possible on differents systems)

thanks

mrpouet
Comment 31 Romain Perier 2009-04-17 15:37:54 UTC
Note about the last patch only works for gnome-settings-daemon 2.26.0, the patch can be of course apply for g-s-d 2.26.1 but doesn't work (any pop up window is displayed and control is not changed probably due to some changes in g-s-d 2.26.1 code).

i'll have a look to the code change and write a new version of this patch
Comment 32 Romain Perier 2009-04-19 18:50:02 UTC
This is was not due to a bug of code but to a forget.

The problem was ONLY due to media-keys.gnome-settings-daemon-plugin plugin
file which was not installed on the system, mainly due to this line in the
orig plugins/media-keys/Makefile.am :

if HAVE_PULSE
 plugin_DATA =
$(plugin_in_files:.gnome-setting-daemon-plugin.in:.gnome-settings-daemon-plugin)
fi

which is not just absurd for gstreamer support but in general, because
there are not ONLY volume keys bindings which are handled : HOME, MAIL,
EJECT...etc... (I don't criticize anyone, it just a comment ;) )

and finally it's work, the patch just update this part.

mrpouet ;)
Comment 33 Romain Perier 2009-04-19 18:51:35 UTC
Created attachment 132912 [details] [review]
gnome-settings-daemon-2.26.1-readd-gst-vol-control-support.patch

the patch which solves the problem :)
Comment 34 Bastien Nocera 2009-04-29 15:08:13 UTC
Stuff like that just can't be right:

+#ifdef HAVE_PULSE
+        if (vol_step <= 0 || vol_step > 100) {
+#else
+        if (error) {
+#endif

And the changes to the manager code would need to be cleaned up:
- indentation doesn't match the existing code
- replacing int with gint gains us nothing

-#include "gsd-media-keys-window.h"
-
 #ifdef HAVE_PULSE
 #include "gvc-mixer-control.h"
+#elif defined(HAVE_GSTREAMER)
+#include "actions/acme-volume.h"
 #endif /* HAVE_PULSE */
+#include "gsd-media-keys-window.h"

Why do you move things around like that?

-                if (screen == NULL) {
+                if (screen == NULL)
                         continue;
-                }

Don't make changes like that, if somebody touches that code, they'll remove the braces.

+#ifdef HAVE_PULSE
+        guint norm_vol_step;
         if (manager->priv->stream == NULL)
+#else
+        if (manager->priv->volume == NULL)
+#endif

Put the conditional and its branch inside the ifdef, otherwise it's unreadable.

-
-        /* FIXME: this is racy */
         vol = gvc_mixer_stream_get_volume (manager->priv->stream);
         muted = gvc_mixer_stream_get_is_muted (manager->priv->stream);
+

Why do you modify the pulse code?

-}
then
+        }

Broken indentation

-

Don't remove linefeeds for no reason.
Comment 35 William Jon McCann 2009-04-29 15:52:53 UTC
Regarding braces and style.  g-s-d used the GDM style guidelines in my original separate module.  Fizz may have different rules now though...

http://git.gnome.org/cgit/gdm/plain/HACKING
Comment 36 Giorgio DG 2009-05-19 18:31:46 UTC
As previously reported here (http://bugzilla.gnome.org/show_bug.cgi?id=583075)
when I try to mute volume by hotkeys (Fn+F10) a notify is shown on screen
but inputmix-mute (codec1 jack green) is toggled instead of expected
vmix0-outvol. The result is that volume is not muted.
No problem when toggling volume-applet icon or when increasing / decreasing
volume with Fn + F11 / Fn + F12 instead.
I get two different logs when launching gnome-volume-control --gst-debug=5 from
shell.
- muting from Hotkeys:
http://pastebin.com/m445fb04
- muting from Applet:
http://pastebin.com/m5016c2c5

Additional Info:
Distro ArchLinux
oss 4.1_1052-1
gnome-settings-daemon 2.26.1 built with a patch to use gstreamer volume
(http://repos.archlinux.org/viewvc.cgi/gnome-settings-daemon/repos/extra-i686/07_use_gstreamer_volume.patch?view=log).
Comment 37 Nirbheek Chauhan 2009-08-14 08:16:16 UTC
Created attachment 140745 [details] [review]
Updated patch for 2.27.5

The attached patch has been updated for 2.27.5, and addresses the problems with the earlier patch listed by Bastien. Can we have this for 2.28 please? :)
Comment 38 Bastien Nocera 2009-08-14 08:32:25 UTC
I don't like the build changes one bit. And things like this are very very broken:
+if HAVE_PULSE
 DIST_SUBDIRS = cut-n-paste
+else
+DIST_SUBDIRS = actions
+endif

DIST_SUBDIRS can't be conditional. Otherwise you end up adding one directory and not the other in the tarballs.

The acme-volume.c should be renamed to something else, and make it clear it's the GStreamer backend. It also doesn't need to go in a sub-directory.

plugins/media-keys/actions/Makefile.am most certainly doesn't work as you think it does.

You're moving stuff around again, and removing empty lines for no reason.
-        guint vol, norm_vol_step;
         int vol_step;
-
+        GError  *error = NULL;
+        guint vol;

You're still putting conditional in ifdefs, and not documenting your code. This still looks wrong.
+#ifdef HAVE_PULSE
+        if (vol_step <= 0 || vol_step > 100) {
+#else
+        if (error) {
+#endif

I stopped reviewing there because it's clear you didn't fix the problems I mentioned in the earlier review.
Comment 39 Nirbheek Chauhan 2009-08-14 09:51:00 UTC
Created attachment 140751 [details] [review]
Patch with mentioned problems fixed

(In reply to comment #38)
> DIST_SUBDIRS can't be conditional. Otherwise you end up adding one directory
> and not the other in the tarballs.
> 

Fixed

> The acme-volume.c should be renamed to something else, and make it clear it's
> the GStreamer backend. It also doesn't need to go in a sub-directory.
> 

Done

> plugins/media-keys/actions/Makefile.am most certainly doesn't work as you think
> it does.
> 

That was taken from the old file in svn, fixed now (merged into cut-n-paste)

> You're moving stuff around again, and removing empty lines for no reason.
> -        guint vol, norm_vol_step;
>          int vol_step;
> -
> +        GError  *error = NULL;
> +        guint vol;
> 

This was partially fixed in the previous patch, and is now fully fixed.

> You're still putting conditional in ifdefs, and not documenting your code. This
> still looks wrong.
> +#ifdef HAVE_PULSE
> +        if (vol_step <= 0 || vol_step > 100) {
> +#else
> +        if (error) {
> +#endif
> 

That's how it was in the old code (checking "error"), but apparently the new way works too.

> I stopped reviewing there because it's clear you didn't fix the problems I
> mentioned in the earlier review.
> 

Well, except for the conditional in ifdef, all the other problems you mentioned last time were fixed this time.

Do not be discouraged by lots of problems, tell me what they are and I'll fix them :)
Comment 40 Josselin Mouette 2009-08-14 10:03:09 UTC
Some pieces of the patch assume that either Gstreamer or Pulse is available, but this is not enforced in configure.in.
Comment 41 Nirbheek Chauhan 2009-08-14 10:08:13 UTC
(In reply to comment #40)
> Some pieces of the patch assume that either Gstreamer or Pulse is available,
> but this is not enforced in configure.in.
> 

Okay, which way do you want it? Force one of the two or support having neither of the two? (easiest will be forcing one of the two)
Comment 42 Bastien Nocera 2009-08-14 10:12:32 UTC
(In reply to comment #39)
> > plugins/media-keys/actions/Makefile.am most certainly doesn't work as you think
> > it does.
> > 
> 
> That was taken from the old file in svn, fixed now (merged into cut-n-paste)

But it's not cut-n-paste code, put it in the media-keys directory.

> > I stopped reviewing there because it's clear you didn't fix the problems I
> > mentioned in the earlier review.
> > 
> 
> Well, except for the conditional in ifdef, all the other problems you mentioned
> last time were fixed this time.
> 
> Do not be discouraged by lots of problems, tell me what they are and I'll fix
> them :)

Yes, but my comments seem to fall on deaf ears. Like this piece of code, when I mentioned "You're still putting conditional in ifdefs" in comment 38.

+#ifdef HAVE_PULSE
         if (manager->priv->stream == NULL)
+#else
+        if (manager->priv->volume == NULL)
+#endif
                 return;

This should be:
#ifdef HAVE_PULSE
         if (manager->priv->stream == NULL)
                 return;
#else
        if (manager->priv->volume == NULL)
                 return;
#endif

You could also just rename stream to volume in the struct, and avoid this construct altogether.

-SUBDIRS =
-plugin_LTLIBRARIES =
-
-if HAVE_PULSE
-SUBDIRS += cut-n-paste
-plugin_LTLIBRARIES += libmedia-keys.la
-endif
+SUBDIRS = cut-n-paste
+plugin_LTLIBRARIES = libmedia-keys.la

Those changes are broken if you're building without PA and without GStreamer (as mentioned by Josselin), and they shouldn't be made requirements either.

And don't prefix the code with gvc- when it doesn't come from gnome-volume-control.
Comment 43 Emilio Pozuelo Monfort 2009-10-09 15:54:10 UTC
Created attachment 145145 [details] [review]
Updated patch for g-s-d 2.28.0

This patch is updated to apply against g-s-d 2.28.0. I haven't fixed all the issues mentioned before though.
Comment 44 Pacho Ramos 2010-07-09 12:03:24 UTC
We are suffering a small bug with this patch: 

Buttons "raiseVolume" "lowerVolume" work only on the second time, if
they are pressed after one another (i.e. if I, for instance, press raiseVolume
repeatedly, and then start pressing lowerVolume) the first time the volume will
actually increase, as if I pressed raiseVolume, and only on the second hit it
will start actually decrease.
Comment 45 Brian Cameron 2010-07-09 16:53:21 UTC
Created attachment 165566 [details] [review]
updated patch


Here is an updated patch that applies against gnome-settings-daemon 2.30.1 code.

Aside from making the patch work against the latest code, I made two changes to the code:

1) I reduced the TIMEOUT defined in 
   plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c from 4 seconds to
   2 seconds.  

   This TIMEOUT is used to make the media keys plugin avoid rechecking for the 
   device if the user hits a media key more than once before the timeout.  So
   if a user hits media keys multiple times (which is common), the code avoids
   re-checking for the device and just assumes it will use the last one used.
   In my testing, a 4 second timeout was just too long.  It was too easy to
   change the device, and then hit a media key within 4 seconds and have it not 
   work right.  Since the timeout is reset each time you hit a media key, this 
   code forces you to not hit a media key for 4 seconds before it will re-check
   the device and start using the correct one.  I found changing the timeout to
   2 seconds made the code work much more nicely and not so confusingly.
  
2) The media-keys plugin just uses whatever device it finds first.  If the user
   has multiple audio devices, this can cause the media keys to control the 
   wrong device.  This can seem like the media keys are not working if the
   second audio device is not actually hooked up to speakers, for example.

   I fixed the /plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c code to 
   check the gnome-volume-control GConf key:
   /apps/gnome-volume-control/active-element
   And the media-keys plugin will use the device that gnome-volume-control is
   using if the GConf key is set to a valid value.
 
These issues are discussed in the following OpenSolaris bug report, and comment 
#13 shows the exact code changes associated with these changes:

   https://defect.opensolaris.org/bz/show_bug.cgi?id=13512#c13
Comment 46 Pacho Ramos 2010-07-12 13:33:55 UTC
Thanks a lot :-D, it works fine for me.

Only a note, I will probably need to run:
echo "plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c" >> po/POTFILES.in

to prevent tests failure due:

Making check in po
make[1]: Entering directory `/var/tmp/portage/gnome-base/gnome-settings-daemon-2.30.2/work/gnome-settings-daemon-2.30.2/po'
INTLTOOL_EXTRACT=/usr/bin/intltool-extract srcdir=. /usr/bin/intltool-update --gettext-package gnome-settings-daemon --pot
rm -f missing notexist
srcdir=. /usr/bin/intltool-update -m
The following files contain translations and are currently not in use. Please
consider adding these to the POTFILES.in file, located in the po/ directory.

plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c

If some of these files are left out on purpose then please add them to
POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list
of left out files has been written in the current directory.
Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-settings-daemon
if [ -r missing -o -r notexist ]; then \
          exit 1; \
        fi
make[1]: *** [check] Error 1
Comment 47 Pacho Ramos 2010-07-13 14:49:15 UTC
(In reply to comment #45)
> Created an attachment (id=165566) [details] [review]
> updated patch
> 
> 
> Here is an updated patch that applies against gnome-settings-daemon 2.30.1
> code.
> 

It also seems to break when compiling with as-needed:
test_media_keys-gsd-media-keys-manager.o: In function `acme_filter_events':
gsd-media-keys-manager.c:(.text+0x158b): undefined reference to
`acme_volume_get_threshold'
gsd-media-keys-manager.c:(.text+0x15b6): undefined reference to
`acme_volume_get_volume'
gsd-media-keys-manager.c:(.text+0x15c5): undefined reference to
`acme_volume_get_mute'
gsd-media-keys-manager.c:(.text+0x15e3): undefined reference to
`acme_volume_mute_toggle'
gsd-media-keys-manager.c:(.text+0x15ef): undefined reference to
`acme_volume_get_mute'
gsd-media-keys-manager.c:(.text+0x15fe): undefined reference to
`acme_volume_get_volume'
gsd-media-keys-manager.c:(.text+0x1892): undefined reference to
`acme_volume_set_volume'
gsd-media-keys-manager.c:(.text+0x18ae): undefined reference to
`acme_volume_set_volume'
gsd-media-keys-manager.c:(.text+0x18c3): undefined reference to
`acme_volume_mute_toggle'
gsd-media-keys-manager.c:(.text+0x18e9): undefined reference to
`acme_volume_set_mute'
test_media_keys-gsd-media-keys-manager.o: In function
`gsd_media_keys_manager_start':
gsd-media-keys-manager.c:(.text+0x1ec6): undefined reference to
`acme_volume_new'
collect2: ld returned 1 exit status

Thanks for your work :-)
Comment 48 Jason 2010-09-03 04:50:16 UTC
Hope this gstreamer backend can change the control devices.

like "Giorgio DG" said, i also have the problem.

gnome-settings-daemon and gnome-mixer-applet control the different device.
Comment 49 Pacho Ramos 2010-10-24 13:48:42 UTC
(In reply to comment #45)
> Created an attachment (id=165566) [details] [review]
> updated patch
> 
> 
> Here is an updated patch that applies against gnome-settings-daemon 2.30.1
> code.
> 
> Aside from making the patch work against the latest code, I made two changes to
> the code:
> 
> 1) I reduced the TIMEOUT defined in 
>    plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c from 4 seconds to
>    2 seconds.  
> 
>    This TIMEOUT is used to make the media keys plugin avoid rechecking for the 
>    device if the user hits a media key more than once before the timeout.  So
>    if a user hits media keys multiple times (which is common), the code avoids
>    re-checking for the device and just assumes it will use the last one used.
>    In my testing, a 4 second timeout was just too long.  It was too easy to
>    change the device, and then hit a media key within 4 seconds and have it not 
>    work right.  Since the timeout is reset each time you hit a media key, this 
>    code forces you to not hit a media key for 4 seconds before it will re-check
>    the device and start using the correct one.  I found changing the timeout to
>    2 seconds made the code work much more nicely and not so confusingly.
> 
> 2) The media-keys plugin just uses whatever device it finds first.  If the user
>    has multiple audio devices, this can cause the media keys to control the 
>    wrong device.  This can seem like the media keys are not working if the
>    second audio device is not actually hooked up to speakers, for example.
> 
>    I fixed the /plugins/media-keys/cut-n-paste/gvc-gstreamer-acme-vol.c code to 
>    check the gnome-volume-control GConf key:
>    /apps/gnome-volume-control/active-element
>    And the media-keys plugin will use the device that gnome-volume-control is
>    using if the GConf key is set to a valid value.
> 
> These issues are discussed in the following OpenSolaris bug report, and comment 
> #13 shows the exact code changes associated with these changes:
> 
>    https://defect.opensolaris.org/bz/show_bug.cgi?id=13512#c13

This introduced a regression as reported downstream on http://bugs.gentoo.org/show_bug.cgi?id=339732 :
"I am unable to change pulseaudio's default output device from my laptop's
onboard sound chip to my Logitech ClearChat USB headset if the onboard sound's
volume is set to 0%. I have to raise the volume before I am able to change the
default device.

Reproducible: Always

Steps to Reproduce:
1. Open gnome-volume-control
2. Go to "Output" tab
3. Try to click the radio button beside "Logitech USB Headset Analog Stereo"
(4.) Sometimes the default will switch to the headset but will switch back to
onboard within ~10 seconds. This step does not always happen.
Actual Results:  
Default output returned to onboard sound

Expected Results:  
Default device should be changed to USB headset"
Comment 50 Alexey Torkhov 2011-01-24 03:26:10 UTC
(In reply to comment #45)
> Created an attachment (id=165566) [details] [review]
> updated patch
> 
> 
> Here is an updated patch that applies against gnome-settings-daemon 2.30.1
> code.

Tried this with gnome-settings-daemon 2.32.1 and it works fine for me.
Comment 51 Bastien Nocera 2011-07-11 09:54:41 UTC
Trying to create a desktop environment based on pieces of string is over. Feel free to get your distribution to ship this if they cannot be bothered to ship modern components to power this desktop.
Comment 52 Nirbheek Chauhan 2011-07-11 11:26:05 UTC
fwiw, Gentoo dropped this patch months ago, and has been pulling in Pulseaudio unconditionally for GNOME 3.