summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authoritohy <itohy>2001-01-08 23:04:56 +0000
committeritohy <itohy>2001-01-08 23:04:56 +0000
commit87404db237c5e202b13b7e8c78d7310ce6bdac57 (patch)
tree60b1273477220d83fb24aeacd6d0a9013e9d54de /audio
parentb14dfa4b46ca37125fb2b793c09f4323753160f9 (diff)
downloadpkgsrc-87404db237c5e202b13b7e8c78d7310ce6bdac57.tar.gz
- Change the timeout period from 10s to 1min, which is the same value of
the original implementation. Actually, one of my drive takes more than 10s for seeking a track and causes inconsistency of the aic SCSI driver. Yeah, the driver should not fail, but that is a different problem.... :) - Implement read speed selection (-S option). The unit is 1000byte/s. "-S 176" for 1x speed, "-S 352" for 2x speed, and so on. If the specified value is smaller than 176, it will be multiplied by 176, so "-S 1" also selects 1x speed. "-S 0" selects the maximum speed. This is an experimental feature and the interface will likely change.
Diffstat (limited to 'audio')
-rw-r--r--audio/cdparanoia/files/patch-sum4
-rw-r--r--audio/cdparanoia/patches/patch-cg59
2 files changed, 48 insertions, 15 deletions
diff --git a/audio/cdparanoia/files/patch-sum b/audio/cdparanoia/files/patch-sum
index 673b4214bd3..f27939e63ed 100644
--- a/audio/cdparanoia/files/patch-sum
+++ b/audio/cdparanoia/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.8 2000/10/06 06:40:35 jlam Exp $
+$NetBSD: patch-sum,v 1.9 2001/01/08 23:04:56 itohy Exp $
MD5 (patch-aa) = 07f944781b9efc51fd6e7be6523ab4e6
MD5 (patch-ab) = c3ef67eeb817732c2f29c11dd7048ba4
@@ -12,4 +12,4 @@ MD5 (patch-cc) = 795d7c9f4971ad7804229f757ab4479e
MD5 (patch-cd) = ab3d1eaaa4706c77a0e4795f20759c8c
MD5 (patch-ce) = 6f15e3f28c38a0058428c5f5981029ad
MD5 (patch-cf) = 5d4fa67d7aeb2fec2439f3eba97fc6d6
-MD5 (patch-cg) = 65fa4c512d0d2e53119f6a4d5fb6bd74
+MD5 (patch-cg) = a124a89ef64477c072a045ee8a9a9a34
diff --git a/audio/cdparanoia/patches/patch-cg b/audio/cdparanoia/patches/patch-cg
index 76de9a5f2d1..4be339f82f4 100644
--- a/audio/cdparanoia/patches/patch-cg
+++ b/audio/cdparanoia/patches/patch-cg
@@ -1,7 +1,7 @@
-$NetBSD: patch-cg,v 1.4 2000/07/24 05:05:46 itohy Exp $
+$NetBSD: patch-cg,v 1.5 2001/01/08 23:04:58 itohy Exp $
---- interface/scsi_interface.c.orig Tue Dec 14 05:28:03 1999
-+++ interface/scsi_interface.c Thu Jun 22 03:06:09 2000
+--- interface/scsi_interface.c.orig Tue Dec 14 13:28:03 1999
++++ interface/scsi_interface.c Mon Jan 8 09:11:38 2001
@@ -32,6 +32,7 @@
#endif
@@ -85,14 +85,14 @@ $NetBSD: patch-cg,v 1.4 2000/07/24 05:05:46 itohy Exp $
+ memset(d->sg_buffer, bytefill, out_size);
+ }
+ sreq->senselen = SENSEBUFLEN;
-+ sreq->timeout = 10000; /* 10s */
-+
++ sreq->timeout = 60000; /* 60s */
+
+- if(sg_hd->sense_buffer[0]){
+ status = ioctl(d->cdda_fd, SCIOCCOMMAND, (void *) sreq);
+ if (status < 0)
+ return(TR_ILLEGAL);
+#endif
-
-- if(sg_hd->sense_buffer[0]){
++
+#ifdef __linux__
+ if(sg_hd->sense_buffer[0])
+#endif
@@ -135,7 +135,31 @@ $NetBSD: patch-cg,v 1.4 2000/07/24 05:05:46 itohy Exp $
if(d->sg_buffer[i]!=bytefill){
flag=1;
break;
-@@ -840,16 +906,29 @@
+@@ -667,6 +733,23 @@
+ return(tracks);
+ }
+
++/* Set operating speed */
++static int scsi_setspeed(cdrom_drive *d, int speed)
++{
++ if (speed == 0)
++ speed = 0xffff; /* maximum speed */
++ else if (speed < 176)
++ speed *= 176;
++
++ memset(d->sg_buffer, 0, 12);
++ d->sg_buffer[0] = 0xbb; /* set speed */
++ d->sg_buffer[2] = speed >> 8;
++ d->sg_buffer[3] = speed;
++ d->sg_buffer[4] = -1;
++ d->sg_buffer[5] = -1;
++ return handle_scsi_cmd(d, 12, 0, 0, 0, 0);
++}
++
+ /* These do one 'extra' copy in the name of clean code */
+
+ static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors){
+@@ -840,16 +923,29 @@
while(1) {
if((err=map(d,(p?buffer:NULL),begin,sectors))){
if(d->report_all){
@@ -166,7 +190,7 @@ $NetBSD: patch-cg,v 1.4 2000/07/24 05:05:46 itohy Exp $
cdmessage(d,b);
sprintf(b," Transport error: %s\n",strerror_tr[err]);
cdmessage(d,b);
-@@ -859,9 +938,17 @@
+@@ -859,9 +955,17 @@
fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n",
begin,sectors,retry_count);
fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
@@ -185,15 +209,24 @@ $NetBSD: patch-cg,v 1.4 2000/07/24 05:05:46 itohy Exp $
fprintf(stderr," Transport error: %s\n",strerror_tr[err]);
fprintf(stderr," System error: %s\n",strerror(errno));
}
-@@ -1376,6 +1463,11 @@
- /* Mt Fuji */
+@@ -1377,6 +1481,11 @@
if(reportp)
cdmessage(d,"\tDrive appears to be Mt. Fuji ATAPI C/DVD\n");
-+ return(1);
+ return(1);
+ case 0x32:
+ /* Toshiba DVD */
+ if(reportp)
+ cdmessage(d,"\tDrive appears to be Toshiba ATAPI C/DVD\n");
- return(1);
++ return(1);
default:
if(reportp)
+ switch(d->inqbytes[3]&0x0f){
+@@ -1537,7 +1646,7 @@
+
+ d->read_toc = (!memcmp(d->drive_model, "IMS", 3) && !d->is_atapi) ? scsi_read_toc2 :
+ scsi_read_toc;
+- d->set_speed = NULL;
++ d->set_speed = scsi_setspeed;
+
+
+ if(!d->is_atapi){