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

Bug#367008: marked as done (ITA: Control the behaviour of your cdrom device)



Your message dated Tue, 14 Apr 2009 06:33:47 +0000
with message-id <E1LtcDL-0000jR-9e@ries.debian.org>
and subject line Bug#367008: fixed in setcd 1.5-6
has caused the Debian Bug report #367008,
regarding ITA: Control the behaviour of your cdrom device
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 owner@bugs.debian.org
immediately.)


-- 
367008: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367008
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: setcd
Version: 1.5-4
Severity: wishlist
Tags: patch

Hi!

setcd -x as well as hdparm -X wasn't able to slow down
my DVD+RW drive during DVD playback (and it was
rocketing as a Ferrary car (thanks G-d I had earphones)).

While investigating the issue I've found (thank to
Goga777/Sky777):
http://noto.de/speed/speedcontrol.c
http://club.cdfreaks.com/showthread.php?t=173854
http://www.ussg.iu.edu/hypermail/li...411.3/1064.html

Using the code, I've implemented the patch for the
setcd. Here I atach it.

-- 
WBR,
xrgtn

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'oldstable'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.32-grsec
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages setcd depends on:
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries

setcd recommends no packages.

-- no debconf information
Index: setcd.c
===================================================================
RCS file: /var/lib/cvs/deb/setcd/setcd.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 setcd.c
--- setcd.c	11 May 2006 20:16:58 -0000	1.1.1.1
+++ setcd.c	12 May 2006 19:02:15 -0000
@@ -1,5 +1,6 @@
 /* Setcd.c: Set various flags to control the behaviour of your cdrom device.
    (c) 1997 David A. van Leeuwen
+   (c) 2004 Thomas Fritzsche <tf@noto.de>
 
    $Id: setcd.c,v 1.4 1999/08/24 19:07:34 david Exp $
 
@@ -23,7 +24,7 @@
 #include <fcntl.h>
 #include <ctype.h>		/* tolower */
 #include <unistd.h>		/* lseek, read */
-#include <string.h>		/* strncmp */
+#include <string.h>		/* strncmp, memset */
 #include <sys/ioctl.h>		/* ioctl */
 #include <linux/cdrom.h>
 #ifndef CDC_CLOSE_TRAY		/* moved into cdrom.h... */
@@ -248,7 +249,49 @@
 	  if (set || clear || status)
 	       print_options(flags, set | clear | ~0 * status);
 	  if (speed>=0) {
-	       if (ioctl(fd, CDROM_SELECT_SPEED, speed)<0) {
+	       struct cdrom_generic_command cgc;
+	       struct request_sense sense;
+	       unsigned char buffer[28];
+	       unsigned long rw_size;
+	       memset(&cgc, 0, sizeof(cgc));
+	       memset(&sense, 0, sizeof(sense));
+	       memset(&buffer, 0, sizeof(buffer));
+	       /* SET STREAMING command */ 
+	       cgc.cmd[0] = 0xb6;
+	       /* 28 byte parameter list length */
+	       cgc.cmd[10] = 28;
+	       cgc.sense = &sense;
+	       cgc.buffer = buffer;
+	       cgc.buflen = sizeof(buffer);
+	       cgc.data_direction = CGC_DATA_WRITE;
+	       cgc.quiet = 1;
+	       if(speed == 0) {
+		    /* set Restore Drive Defaults */  
+		    buffer[0] = 4;
+	       }
+	       buffer[8] = 0xff;
+	       buffer[9] = 0xff;
+	       buffer[10] = 0xff;
+	       buffer[11] = 0xff;
+	       rw_size = 177 * speed;
+	       /* read size */
+	       buffer[12] = (rw_size >> 24) & 0xff;
+	       buffer[13] = (rw_size >> 16) & 0xff;
+	       buffer[14] = (rw_size >>  8) & 0xff;
+	       buffer[15] = rw_size & 0xff;
+	       /* read time 1 sec. */
+	       buffer[18] = 0x03;
+	       buffer[19] = 0xE8;
+	       /* write size */
+	       buffer[20] = (rw_size >> 24) & 0xff;
+	       buffer[21] = (rw_size >> 16) & 0xff;
+	       buffer[22] = (rw_size >>  8) & 0xff;
+	       buffer[23] = rw_size & 0xff;
+	       /* write time 1 sec. */
+	       buffer[26] = 0x03;
+	       buffer[27] = 0xE8;
+	       if ((ioctl(fd, CDROM_SEND_PACKET, &cgc) != 0)
+			 && (ioctl(fd, CDROM_SELECT_SPEED, speed) < 0)) {
 		    perror("can't set speed");
 		    exit(-6);
 	       } else {

--- End Message ---
--- Begin Message ---
Source: setcd
Source-Version: 1.5-6

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

setcd_1.5-6.diff.gz
  to pool/main/s/setcd/setcd_1.5-6.diff.gz
setcd_1.5-6.dsc
  to pool/main/s/setcd/setcd_1.5-6.dsc
setcd_1.5-6_amd64.deb
  to pool/main/s/setcd/setcd_1.5-6_amd64.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 367008@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
LENART Janos <ocsi@debian.org> (supplier of updated setcd 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.8
Date: Tue, 14 Apr 2009 07:10:24 +0200
Source: setcd
Binary: setcd
Architecture: source amd64
Version: 1.5-6
Distribution: unstable
Urgency: low
Maintainer: LENART Janos <ocsi@debian.org>
Changed-By: LENART Janos <ocsi@debian.org>
Description: 
 setcd      - Control the behaviour of your cdrom device
Closes: 367008 406134
Changes: 
 setcd (1.5-6) unstable; urgency=low
 .
   * Adopting the package. (closes: #406134)
   * Now using the SET STREAMING command too. (closes: #367008)
     + Code from: Thomas Fritzsche <tf@noto.de>
     + Patch from: Alexander Gattin <xrgtn@yandex.ru>
   * Fixing some minor lintian warnings.
Checksums-Sha1: 
 8745d65cf7ebde0c6afd4ffe64b9c648bda61359 894 setcd_1.5-6.dsc
 e1bf8412d851830641e132d9a06db88c01990dec 5552 setcd_1.5-6.diff.gz
 9b239f4e3ec21d44b1d8242b143e24997543ca1a 13824 setcd_1.5-6_amd64.deb
Checksums-Sha256: 
 9750f52c30aeb24e4045dbbff771f092fee7d1cd203b5176e86dae8b30782630 894 setcd_1.5-6.dsc
 a0c6f01afac08144359e37e97db3cf66651dd01bcd3421fd58a01ff300d93e8e 5552 setcd_1.5-6.diff.gz
 519421594aa974192bc3c4bc28013a03fe9f5089b4a879afe9dffdf74c901540 13824 setcd_1.5-6_amd64.deb
Files: 
 5c409adca92c6eb5c13fa27b6377f69d 894 utils optional setcd_1.5-6.dsc
 da9b4f89debac263b44cda1cb06e548b 5552 utils optional setcd_1.5-6.diff.gz
 5b6da19580353502150fe85ac477299a 13824 utils optional setcd_1.5-6_amd64.deb

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

iD8DBQFJ5CeqefzP0rBFj00RAgC5AJ4m4pCoe48GQIuNY1g59I9ddXL5UQCfXojM
dsu36L3na8M0n+AIsY/fr+Q=
=JF2S
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: