Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118189 - media-sound/cdparanoia: Add Red Hat patches for SG_IO instead of cooked ioctl
Summary: media-sound/cdparanoia: Add Red Hat patches for SG_IO instead of cooked ioctl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL: http://people.redhat.com/pjones/cdpar...
Whiteboard:
Keywords: InVCS
: 100601 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-07 08:47 UTC by Sebastian
Modified: 2006-03-24 05:39 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Suggested ebuild (cdparanoia-3.9.8-r3.ebuild,2.15 KB, text/plain)
2006-01-07 08:48 UTC, Sebastian
Details
Patches from Red Hat (red_hat_patches.tar.gz,17.53 KB, application/octet-stream)
2006-01-07 08:51 UTC, Sebastian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian 2006-01-07 08:47:43 UTC
Hi all,

I'd like to have the Red Hat patches in Gentoo. Among other things they introduce the usage of SG_IO to cdparanoia. This is _very_ useful for Linux kernel 2.6.
Since ide-scsi emulation has been deprecated people tend to use ide-cd instead. Some are even forced away from ide-scsi because ide-scsi burning is broken.
Without ide-scsi cdparanoia falls back to the cooked ioctl interface. That's definitely the worst way to go, because cdparanoia doesn't catch all the drive errors.

There's a thread at lkml about this, if you're interested:
http://marc.theaimsgroup.com/?t=113632694900002

I googled for cdparanoia and SG_IO and I did find something. Someone at Red Hat already did the work. Thanks!

I'll attach an ebuild. It'd be nice if you guys could test and maybe stable it as -r3.

I tarred up the Red Hat patches. You can find them here -> http://www-users.rwth-aachen.de/sebastian.kemper/red_hat_patches.tar.gz

Sebastian
Comment 1 Sebastian 2006-01-07 08:48:48 UTC
Created attachment 76454 [details]
Suggested ebuild
Comment 2 Sebastian 2006-01-07 08:51:12 UTC
Created attachment 76455 [details]
Patches from Red Hat
Comment 3 Sebastian 2006-01-07 08:57:42 UTC
*** Bug 100601 has been marked as a duplicate of this bug. ***
Comment 4 Bret Towe 2006-01-14 14:07:21 UTC
i tried these patchs out on an athlon64 box and have had no issues with
them they have made it so i could rip a couple tracks that before
had lots of pops of static, now sound crystal clear
Comment 5 Sebastian 2006-01-14 14:13:08 UTC
(In reply to comment #4)
> i tried these patchs out on an athlon64 box and have had no issues with
> them they have made it so i could rip a couple tracks that before
> had lots of pops of static, now sound crystal clear
> 

Thanks for your input, I appreciate it. Anyone else?
Sebastian
Comment 6 Sander Sweers 2006-01-22 05:05:04 UTC
This gived a huge speedup in ripping :) Figures below but please note that I only applied the sg_io patch from RedHat not the others.

Without SG_IO:
real    18m23.228s
user    0m19.766s
sys     0m18.689s

With SG_IO:
real    5m14.834s
user    0m11.736s
sys     0m4.508s

I'll try the dma patch also to see if this gived any speed increase.
Comment 7 Sander Sweers 2006-01-22 05:26:21 UTC
Nope, the dma patch did not do anything in the speed department. If i could vote, i would vote to get at least the sg_io patch included.
Comment 8 David Hately 2006-01-22 07:28:16 UTC
I tested before and after patch. No error messages on the unpatched version, but a slight increase in speed after patch. 459 megabyte CD over five tracks. Start/finish times are as follows.

Before patch:
Sun Jan 22 14:01:40 GMT 2006
Sun Jan 22 14:04:18 GMT 2006

After patch:
Sun Jan 22 14:26:42 GMT 2006
Sun Jan 22 14:28:44 GMT 2006
Comment 9 Patrick McLean gentoo-dev 2006-01-25 19:38:33 UTC
Has anyone tested this on a 2.4 kernel?
Comment 10 Sebastian 2006-01-26 01:25:34 UTC
(In reply to comment #9)
> Has anyone tested this on a 2.4 kernel?
> 

Not me, sorry, don't have such a thing around anymore.
Comment 11 Patrick McLean gentoo-dev 2006-01-27 11:10:56 UTC
New revision of cdparanoia that applies these patches with a 2.6 kernel committed.
Comment 12 Maarten Maathuis 2006-02-07 09:09:15 UTC
While the sg_io has a few nice effects(such as working properly on my audio caching drive), the speed command doesn't have the desired effect (Ripping seems slower, but the drive speed/noise stays the same). Anyone experience the same?
Comment 13 Jim 2006-03-22 07:12:32 UTC
Didnt work
Comment 14 Jim 2006-03-22 08:11:03 UTC

command:ACCEPT_KEYWORDS="~x86" emerge cdparanoia
kernel:2.6.10-gentoo-r6



I tried to emerge this patch but got failed errors. Here is my output:

* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 2.6.10-gentoo-r6
>>> Unpacking source...
>>> Unpacking cdparanoia-III-alpha9.8.src.tgz to /var/tmp/portage/cdparanoia-3.9.8-r3/work
>>> Unpacking cdparanoia-3.9.8-SG_IO-patches.tar.gz to /var/tmp/portage/cdparanoia-3.9.8-r3/work
* Applying cdparanoia-3.9.8-include-cdda_interface_h.patch ... [ ok ]
* Applying cdparanoia-3.9.8-toc.patch ... [ ok ]
* Applying cdparanoia-3.9.8-identify_crash.patch ... [ ok ]
* Applying 3.9.8-gcc34.patch ... [ ok ]
* Applying cdparanoia-3.9.8-use-destdir.patch ... [ ok ]
* Applying cdparanoia-3.9.8-respectflags.patch ...

* Failed Patch: cdparanoia-3.9.8-respectflags.patch !
* ( /usr/portage/media-sound/cdparanoia/files/cdparanoia-3.9.8-respectflags.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/cdparanoia-3.9.8-r3/temp/cdparanoia-3.9.8-respectflags.patch-14222.out





Now for the .out file:

***** cdparanoia-3.9.8-respectflags.patch *****

===============================================

PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/media-sound/cdparanoia/files/cdparanoia-3.9.8-respectflags.patch

===============================================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/interface/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/interface/Makefile.in
|+++ cdparanoia-III-alpha9.8/interface/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/paranoia/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/paranoia/Makefile.in
|+++ cdparanoia-III-alpha9.8/paranoia/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
===============================================

PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/media-sound/cdparanoia/files/cdparanoia-3.9.8-respectflags.patch

===============================================
patching file interface/Makefile.in
Hunk #1 FAILED at 46.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.in.rej
patching file Makefile.in
Hunk #1 FAILED at 44.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.in.rej
===============================================

PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/media-sound/cdparanoia/files/cdpar
anoia-3.9.8-respectflags.patch

===============================================
missing header for unified diff at line 5 of patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/interface/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/interface/Makefile.in
|+++ cdparanoia-III-alpha9.8/interface/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
missing header for unified diff at line 18 of patch
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/paranoia/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/paranoia/Makefile.in
|+++ cdparanoia-III-alpha9.8/paranoia/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
===============================================
PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/media-sound/cdparanoia/files/cdparanoia-3.9.8-respectflags.patch

===============================================
missing header for unified diff at line 5 of patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/interface/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/interface/Makefile.in
|+++ cdparanoia-III-alpha9.8/interface/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
missing header for unified diff at line 18 of patch
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: cdparanoia-III-alpha9.8/paranoia/Makefile.in
|===================================================================
|--- cdparanoia-III-alpha9.8.orig/paranoia/Makefile.in
|+++ cdparanoia-III-alpha9.8/paranoia/Makefile.in
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
Comment 15 Sebastian 2006-03-24 05:39:48 UTC
As there's a routine in the ebuild checking for the kernel version before considering to apply the Red Hat patches I think the routine is faulty for kernels <2.6.15.