[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#433643: marked as done (making timidity's alsaseq interface _powerfriendly_)



Your message dated Thu, 26 Jul 2007 19:02:06 +0000
with message-id <E1IE8b8-00050z-CP@ries.debian.org>
and subject line Bug#433643: fixed in timidity 2.13.2-14
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: timidity
Severity: wishlist


Hi,

I got a new laptop with a onboard sound system, without any hw
synthesizer... since I'm an MIDI diehard, I tried timidity... (which worked
out of the box! THX!!)

Unfortunatly, the 10ms wakeup cycle in interface/alsaseq_c.c kills the
battery pretty fast. -> So, here are TWO approaches to save the battery life.
(hopefully the patches don't get screwed up...)

Thanks,
	Chr.

Either FIRST:

--- timidity-2.13.2/interface/alsaseq_c.c.org	2007-07-18 14:44:57.675654262 +0200
+++ timidity-2.13.2/interface/alsaseq_c.c	2007-07-18 14:45:20.324944971 +0200
@@ -529,12 +529,9 @@ static void doit(struct seq_context *ctx
 		}
 		if (! ctxp->active || ! IS_STREAM_TRACE) {
 			fd_set rfds;
-			struct timeval timeout;
 			FD_ZERO(&rfds);
 			FD_SET(ctxp->fd, &rfds);
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 10000; /* 10ms */
-			if (select(ctxp->fd + 1, &rfds, NULL, NULL, &timeout) < 0)
+			if (select(ctxp->fd + 1, &rfds, NULL, NULL, NULL) < 0)
 				goto __done;
 		}
 	}

-EOP-
or SECOND:

--- timidity-2.13.2/interface/alsaseq_c.c	2004-07-10 07:07:00.000000000 +0200
+++ timidity-2.13.2-fix/interface/alsaseq_c.c	2007-07-17 14:55:28.393628042 +0200
@@ -500,6 +500,7 @@ static void stop_playing(void)
 
 static void doit(struct seq_context *ctxp)
 {
+ 	int err, timeout_val = 10;
 	for (;;) {
 		while (snd_seq_event_input_pending(ctxp->handle, 1)) {
 			if (do_sequencer(ctxp))
@@ -532,10 +533,19 @@ static void doit(struct seq_context *ctx
 			struct timeval timeout;
 			FD_ZERO(&rfds);
 			FD_SET(ctxp->fd, &rfds);
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 10000; /* 10ms */
-			if (select(ctxp->fd + 1, &rfds, NULL, NULL, &timeout) < 0)
+			timeout.tv_sec = (timeout_val / 1000);
+			timeout.tv_usec = (timeout_val % 1000) * 1000;
+			err = select(ctxp->fd + 1, &rfds, NULL, NULL, timeout_val < 0 ? NULL : &timeout);
+			if (err < 0)
 				goto __done;
+			else if (err == 0)
+				if (timeout_val < 1024)
+					timeout_val+=timeout_val;
+				else
+					timeout_val = -1;
+			else
+				timeout_val = 10;
+					
 		}
 	}
 
-EOP-

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-rc3-git6-wireless (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


--- End Message ---
--- Begin Message ---
Source: timidity
Source-Version: 2.13.2-14

We believe that the bug you reported is fixed in the latest version of
timidity, which is due to be installed in the Debian FTP archive:

timidity-el_2.13.2-14_all.deb
  to pool/main/t/timidity/timidity-el_2.13.2-14_all.deb
timidity-interfaces-extra_2.13.2-14_i386.deb
  to pool/main/t/timidity/timidity-interfaces-extra_2.13.2-14_i386.deb
timidity_2.13.2-14.diff.gz
  to pool/main/t/timidity/timidity_2.13.2-14.diff.gz
timidity_2.13.2-14.dsc
  to pool/main/t/timidity/timidity_2.13.2-14.dsc
timidity_2.13.2-14_i386.deb
  to pool/main/t/timidity/timidity_2.13.2-14_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 433643@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joost Yervante Damad <andete@debian.org> (supplier of updated timidity package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 26 Jul 2007 20:40:14 +0200
Source: timidity
Binary: timidity-el timidity timidity-interfaces-extra
Architecture: source i386 all
Version: 2.13.2-14
Distribution: unstable
Urgency: low
Maintainer: Debian Multimedia Team <debian-multimedia@lists.debian.org>
Changed-By: Joost Yervante Damad <andete@debian.org>
Description: 
 timidity   - Software sound renderer (MIDI sequencer, MOD player)
 timidity-el - An Emacs front end to Timidity++
 timidity-interfaces-extra - TiMidity++ extra user interfaces
Closes: 428353 433643
Changes: 
 timidity (2.13.2-14) unstable; urgency=low
 .
   * Add note to README.Debian about how to get a systemwide timidity
     sequencer to work together with the pulseaudio system (Closes: #428353)
   * lintian fixes: first run configure before doing make clean in the
     debian/rules clean target
   * use neat exponentional backup select in interface/alsaseq_c.c
     with thanks to  "C. " <chunkeey@web.de> (Closes: #433643)
Files: 
 1630c56a2d7122d767c9563697799d98 1090 sound optional timidity_2.13.2-14.dsc
 eabb4613ff2efccda9fe555f8d4959c9 105031 sound optional timidity_2.13.2-14.diff.gz
 458533ab1c6500867f890d07e07090fb 16024 sound optional timidity-el_2.13.2-14_all.deb
 4992e6211ac23075ade1f72cda9f5144 550704 sound optional timidity_2.13.2-14_i386.deb
 e49233f5a0dd01bfee9ebe3911a77785 84222 sound optional timidity-interfaces-extra_2.13.2-14_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGqOv80/r2+3z8lN0RAhc+AJ9Ope0auRO6moahJG0btNQfBuqnzQCgmhxH
sii5uZjPuT172z9H3TT3kKk=
=V0Hc
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: