Package: jack / 3.1.1+cvs20050801-31

38_remove_gen_device.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Remove (broken) generic device support from jack

The current support in jack for "generic devices" is completely
broken.  While there is a --gen-device option (corresponding to %D in
jack_helpers), it is actually not used anywhere - only in the cmd_old
of cdda2wav but this is not used.  The normal cmd uses %d which is the
normal device.

Furthermore, jack checks that the device specified as --gen-device
exists (i.e. it assumes it's something like /dev/....).  However,
according to latest cdda2wav, it expects a SCSI string a la 1,0,0
(bus, id, lun).  Further tests show that using 1,0,0 or /dev/sr0
on my system with a USB CD-ROM (i.e. one that shows up as SCSI) does
not make any difference at all.

My conclusion is that this "generic device" stuff is obsolete.
Current Linux kernels should deal with devices properly, regardless of
them being IDE or SCSI.  In fact, I just saw a proposal to get rid of
the ide-scsi stuff in the kernel.

I'll therefore remove the (broken) generic device support from jack.


--- a/jack_config.py
+++ b/jack_config.py
@@ -64,12 +64,6 @@
         'usage': "use which device for ripping",
         'long': 'device',
         },
-    'gen_device': {
-        'type': types.StringType,
-        'val': None,
-        'doc': "cdda2wav may need the scsi generic device",
-        'long': 'AUTO',
-        },
     'encoder': {
         'type': types.StringType,
         'val': "oggenc",
--- a/jack_functions.py
+++ b/jack_functions.py
@@ -111,8 +111,6 @@
     "Returns track list"
     if jack_helpers.helpers[toc_prog].has_key('toc_cmd'):
         cmd = string.replace(jack_helpers.helpers[toc_prog]['toc_cmd'], "%d", cf['_cd_device'])
-        if cf['_gen_device']:
-            cmd = string.replace(cmd, "%D", cf['_gen_device'])
         p = os.popen(cmd)
         start = 0
         erg = []
--- a/jack_helpers.py
+++ b/jack_helpers.py
@@ -350,7 +350,6 @@
             ch = [ "none", "mono", "stereo", "three", "quad" ].index(ch)
             erg.append([num, length, start, copy, pre, ch, 1, cf['_bitrate'], cf['_name'] % (num + 1)])
 """,
-        'toc_cmd_old': "cdda2wav --no-infofile -D %D -J -v 35 2>&1",
         'toc_fkt_old': r"""
 new_c2w = 0
 new_toc1 = 0
--- a/jack_prepare.py
+++ b/jack_prepare.py
@@ -67,9 +67,6 @@
                         cf['_image_file'] = os.path.abspath(cf['_image_file'])
                     jack_ripstuff.all_tracks = jack_functions.gettoc(cf['_toc_prog'])
                     toc_just_read = 1
-                    # check that the generic device is usable, too
-                    if cf['_gen_device'] and not os.access(cf['_gen_device'], os.R_OK | os.W_OK):
-                        warning(r"""could not open generic device %s for reading and writing.""" % cf['_gen_device'])
 
             if cf['_scan_dirs']:
                 dirs = [os.getcwd()]
--- a/jack_workers.py
+++ b/jack_workers.py
@@ -78,7 +78,6 @@
         if i == "%n": args.append(`track[NUM]`)
         elif i == "%o": args.append(track[NAME].decode(cf['_charset'], "replace") + ".wav")
         elif i == "%d": args.append(cf['_cd_device'])
-        elif i == "%D": args.append(cf['_gen_device'])
         else: args.append(i)
     data = start_new_process(args)
     data['type'] = "ripper"
@@ -165,7 +164,6 @@
     for i in string.split(helpers[ripper]['otf-cmd']):
         if i == "%n": args.append(`track[NUM]`)
         elif i == "%d": args.append(cf['_cd_device'])
-        elif i == "%D": args.append(cf['_gen_device'])
         else: args.append(i)
     data['rip']['start_time'] = time.time()
     pid = os.fork()
@@ -205,8 +203,6 @@
             args.append(track[NAME].decode(cf['_charset'], "replace") + jack_targets.targets[jack_helpers.helpers[cf['_encoder']]['target']]['file_extension'])
         elif i == "%d":
             args.append(cf['_cd_device'])
-        elif i == "%D":
-            args.append(cf['_gen_device'])
         else:
             args.append(i)
     data['enc']['start_time'] = time.time()