GNOME Bugzilla – Bug 125538
"use PCM" preference key not taken into account
Last modified: 2004-12-22 21:47:04 UTC
When checking the checkbox "Use PCM volume", the GConf key is changed according to it... But the ACME daemon keep on using the main volume when using the volume buttons. Did I forget something ?
ALSA or OSS?
I'm having the same problem since I upgraded to Gnome 2.4. I'm using ALSA. With my card, the volume channels are a bit buggy (surround channel controls master volume, while master channel is redundant). So I have to control volume using the PCM channel, but now acme is stuck to changing master volume only, even if the 'use PCM' box is checked.
I'm using ALSA on a to 2.6 kernel.
G'day =) Here's a patch to fix the problem (hopefully!) --- src/acme-volume-alsa.c 2003-07-01 10:04:03.000000000 +1000 +++ ../acme-volume-alsa.c 2003-12-18 12:04:20.000000000 +1100 @@ -77,8 +77,25 @@ static void acme_volume_alsa_set_use_pcm (AcmeVolume *vol, gboolean val) { - AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol; - self->_priv->use_pcm = val; + snd_mixer_selem_id_t *sid = NULL; + snd_mixer_elem_t *elem; + + AcmeVolumeAlsa *self = (AcmeVolumeAlsa *) vol; + self->_priv->use_pcm = val; + + snd_mixer_selem_id_alloca(&sid); + snd_mixer_selem_id_set_name (sid, (val?"PCM":"Master")); + + elem = snd_mixer_find_selem(self->_priv->handle, sid); + + if (!elem) + { + D("snd_mixer_find_selem"); + } + else + { + self->_priv->elem = elem; + } } static gboolean Mike Tyson mike at tzidesign.com
*** Bug 122908 has been marked as a duplicate of this bug. ***
2003-12-18 Bastien Nocera <hadess@hadess.net> * src/acme-volume-alsa.c: (acme_volume_alsa_set_use_pcm): Fix PCM usage with ALSA, patch by Mike Tyson <mike at tzidesign.com> (Closes: #125538)
*** Bug 129996 has been marked as a duplicate of this bug. ***
I compiled the CVS version of acme as a debian package, using the debian folder from the debian maintainer, and the problem appears to still be here. The option "Use PCM ..." doesn't appear in the properties window anymore, but is still checked in gconf. When the volume and mute buttons are pressed, no change is made to the PCM volume, and only master volume is modified. I'd be please to help if you could give me any tip...
In the current CVS version of acme, the PCM option has been removed, and is not used anymore: 2004-01-02 Bastien Nocera <hadess@hadess.net> * src/acme-properties.c: (init_gui): * src/acme-properties.glade: * src/acme-volume-alsa.c: (acme_volume_alsa_class_init): * src/acme-volume-dummy.c: (acme_volume_dummy_class_init): * src/acme-volume-oss.c: (acme_volume_oss_class_init): * src/acme-volume.c: * src/acme-volume.h: * src/acme.c: (main): * src/acme.schemas.in: remove the "Use PCM" option as we can auto-detect whether there is a Master volume or not.