Your message dated Mon, 28 Apr 2008 00:01:09 +0100
with message-id <[EMAIL PROTECTED]>
and subject line xmms has been removed from Debian, closing #122875
has caused the Debian Bug report #122875,
regarding xmms: Should hold mixer open for ALSA compatibility
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
122875: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=122875
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: xmms
Version: 1.2.5-1.0chip1
Severity: normal
Tags: patch

Alsa's OSS mixer emulation depends on the OSS-using program holding
the mixer device open so as to maintain the state of the simulated
mixer.

This patch makes xmms hold the mixer open ... which is good for
efficiency, BTW, as well as Alsa compatibility.


Index: OSS.h
--- OSS.h.prev
+++ OSS.h       Fri Dec  7 12:57:19 2001
@@ -64,4 +64,6 @@
 void oss_configure(void);
 
+void oss_open_mixer(void);
+void oss_close_mixer(void);
 void oss_get_volume(int *l, int *r);
 void oss_set_volume(int l, int r);

Index: audio.c
--- audio.c.prev
+++ audio.c     Fri Dec  7 13:07:51 2001
@@ -22,5 +22,5 @@
 #define NFRAGS         32
 
-static gint fd = 0;
+static gint fd = -1;
 static gpointer buffer;
 static gboolean going = FALSE, prebuffer, paused = FALSE, unpause = FALSE,
@@ -423,8 +423,11 @@ void oss_close(void)
                ioctl(fd, SNDCTL_DSP_RESET, 0);
                close(fd);
+               fd = -1;
        }
        g_free(device_name);
        wr_index = 0;
        rd_index = 0;
+
+       oss_close_mixer();
 }
 

Index: configure.c
--- configure.c.prev
+++ configure.c Fri Dec  7 13:05:05 2001
@@ -74,4 +74,6 @@ static void configure_win_ok_cb(GtkWidge
 
        gtk_widget_destroy(configure_win);
+
+       oss_open_mixer();
 }
 

Index: init.c
--- init.c.prev
+++ init.c      Fri Dec  7 13:02:46 2001
@@ -48,3 +48,5 @@ void oss_init(void)
                xmms_cfg_free(cfgfile);
        }
+
+       oss_open_mixer();
 }

Index: mixer.c
--- mixer.c.prev
+++ mixer.c     Fri Dec  7 12:56:23 2001
@@ -19,5 +19,7 @@
 #include <errno.h>
 
-static char* get_mixer_device(void)
+static int fd = -1;
+
+void oss_open_mixer(void)
 {
        char *name;
@@ -30,20 +32,26 @@ static char* get_mixer_device(void)
                name = g_strdup(DEV_MIXER);
 
-       return name;
+       oss_close_mixer();
+       fd = open(name, O_RDWR);
+       if (fd == -1)
+               g_warning("oss_open_mixer(): Failed to open mixer device (%s): 
%s",
+                         name, strerror(errno));
+
+       g_free(name);
 }
 
-void oss_get_volume(int *l, int *r)
+void oss_close_mixer(void)
 {
-       int fd, v, cmd, devs;
-       gchar *devname;
+       if (fd != -1)
+       {
+               close(fd);
+               fd = -1;
+       }
+}
 
-       devname = get_mixer_device();
-       fd = open(devname, O_RDONLY);
-       g_free(devname);
+void oss_get_volume(int *l, int *r)
+{
+       int v, cmd, devs;
 
-       /*
-        * We dont show any errors if this fails, as this is called
-        * rather often
-        */
        if (fd != -1)
        {
@@ -54,12 +62,8 @@ void oss_get_volume(int *l, int *r)
                        cmd = SOUND_MIXER_READ_VOLUME;
                else
-               {
-                       close(fd);
                        return;
-               }
                ioctl(fd, cmd, &v);
                *r = (v & 0xFF00) >> 8;
                *l = (v & 0x00FF);
-               close(fd);
        }
 }
@@ -67,9 +71,5 @@ void oss_get_volume(int *l, int *r)
 void oss_set_volume(int l, int r)
 {
-       int fd, v, cmd, devs;
-       gchar *devname;
-
-       devname = get_mixer_device();
-       fd = open(devname, O_RDONLY);
+       int v, cmd, devs;
 
        if (fd != -1)
@@ -81,15 +81,7 @@ void oss_set_volume(int l, int r)
                        cmd = SOUND_MIXER_WRITE_VOLUME;
                else
-               {
-                       close(fd);
                        return;
-               }
                v = (r << 8) | l;
                ioctl(fd, cmd, &v);
-               close(fd);
        }
-       else
-               g_warning("oss_set_volume(): Failed to open mixer device (%s): 
%s",
-                         devname, strerror(errno));
-       g_free(devname);
 }


-- System Information
Debian Release: 3.0
Kernel Version: Linux tytlal 2.4.17pre5 #1 Thu Dec 6 14:22:01 PST 2001 i686 
unknown

Versions of the packages xmms depends on:
ii  libc6          2.2.4-7        GNU C Library: Shared libraries and Timezone
ii  libglib1.2     1.2.10-3       The GLib library of C routines
ii  libgtk1.2      1.2.10-7       The GIMP Toolkit set of widgets for X
ii  xlibs          4.1.0-9        X Window System client libraries


--- End Message ---
--- Begin Message ---
Version: 1:1.2.10+20070601-1+rm

The xmms package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.

For more information about this package's removal, read
http://bugs.debian.org/461309 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.

--
Marco Rodrigues
http://Marco.Tondela.org


--- End Message ---

Reply via email to