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 125538 - "use PCM" preference key not taken into account
"use PCM" preference key not taken into account
Status: RESOLVED FIXED
Product: acme
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Bastien Nocera
Bastien Nocera
: 122908 129996 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-10-26 16:51 UTC by sensei
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description sensei 2003-10-26 16:51:41 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 ?
Comment 1 Bastien Nocera 2003-10-26 17:27:41 UTC
ALSA or OSS?
Comment 2 MT 2003-12-03 10:38:22 UTC
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.
Comment 3 sensei 2003-12-03 13:02:43 UTC
I'm using ALSA on a to 2.6 kernel.
Comment 4 Mike Tyson 2003-12-18 02:11:31 UTC
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
Comment 5 Bastien Nocera 2003-12-18 11:02:55 UTC
*** Bug 122908 has been marked as a duplicate of this bug. ***
Comment 6 Bastien Nocera 2003-12-18 11:21:15 UTC
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)
Comment 7 Bastien Nocera 2003-12-25 16:43:58 UTC
*** Bug 129996 has been marked as a duplicate of this bug. ***
Comment 8 sensei 2004-02-11 17:29:02 UTC
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...
Comment 9 Bastien Nocera 2004-02-11 17:41:09 UTC
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.