Feature request: limiting the speed of the CDROM drive

Discuss the current and future development of Max.
Post Reply
goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Feature request: limiting the speed of the CDROM drive

Post by goldenband » Mon Jun 02, 2008 7:05 pm

Could Max incorporate something along the lines of the Linux utility cdspeed, which allows the user to specify a maximum rotational speed for his/her CD/DVD drive?

http://home.linuxfocus.org/~guido/

There would be a bunch of benefits to this. For one, all of us who have Apple laptops know how finicky the slot-loading CD/DVD drives can be, especially when you have a disc that has a label on it. I've had a heck of a time getting certain CDs to rip -- mainly, again, discs with stick-on labels -- and I often have to extract one track at a time, ejecting the disc in between, almost as if the drive is overheating and needs to cool down. It would help the problem, I think, if I could keep the drive from trying to accelerate above (say) 8x.

Also, in general, slower speeds will lead to better extractions. And as Guido's page points out, it's nice to be able to listen without a lot of noise from the CD drive -- so this code might also be great as part of Play.

Thoughts?

goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: Feature request: limiting the speed of the CDROM drive

Post by goldenband » Wed Jun 04, 2008 8:04 pm

So, er, anyone? Surely I can't be the only one who wishes my slot-loading drive could be "encouraged" to do a better job with CDRs with labels. It's not just the jet-engine noise, either; last night I tried another extraction, and halfway through the drive just gave up!

I tried compiling the C code for cdspeed last night, but I quickly was out of my depth -- I don't know what the OS X equivalent of cdrom.h is.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Feature request: limiting the speed of the CDROM drive

Post by sbooth » Thu Jun 05, 2008 12:30 am

goldenband wrote:I tried compiling the C code for cdspeed last night, but I quickly was out of my depth -- I don't know what the OS X equivalent of cdrom.h is.
It's the IOKit, which can be a bear to learn.

goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: Feature request: limiting the speed of the CDROM drive

Post by goldenband » Thu Jun 05, 2008 1:10 am

Ah, thanks for that. Now at least I know where to look, which is always half the battle.

Let me ask you this: I found a message board thread that lists what appear to be four different ways of setting a CDROM speedlimit in Linux, and the only one that appears to be available in OS X is mount, using the syntax:

Code: Select all

mount -o speed=<speed>
However, I wasn't able to get it to work, probably because I don't properly understand how to specify the CDROM drive from the command line -- it kept telling me that I was asking for an "unknown special file or file system", so I'm guessing I got the syntax wrong.

Do you (or does anyone else) know, will mount take the "-o speed" option in OS X, or is it strictly a Linux thing? If it is present in OS X, could this work for Max?

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Feature request: limiting the speed of the CDROM drive

Post by sbooth » Thu Jun 05, 2008 6:12 am

Max is already able to set the speed for the drive using an ioctl, and in fact the comparison ripper slows the drive down when the rips are not matching up.

See http://svn.sbooth.org/viewvc.cgi/max/tr ... iew=markup line 203 and http://svn.sbooth.org/viewvc.cgi/max/tr ... iew=markup line 524.

goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: Feature request: limiting the speed of the CDROM drive

Post by goldenband » Thu Jun 05, 2008 11:05 pm

That's excellent, thanks so much! Is there any way to turn that into a user-selectable preference? Or failing that, could one add/change a couple lines of code, and custom-build a version that would globally force a maximum speed of 2x or 4x?

The reason I ask is that my CDROM drive is literally shutting down partway through an attempted rip, and it consistently happens at a different point in the CD, so my suspicion is that the drive itself is overheating -- it becomes unresponsive and makes grunting noises for 2-3 minutes before permitting an eject. Max isn't having any trouble reading until it happens, so its slowdown mechanism isn't getting triggered. Once it does happen, Max itself becomes semi-unresponsive -- I can't abort the task, but I can quit the program, at least (other programs aren't so friendly). I'm hoping that if I can force a low read speed from the start, the drive won't overheat, and I can get a full rip and burn a fresh, label-less CD.

(This has happened with multiple CDs and DVDs, by the way -- the problem is the label, and I've never had any other problems with my CD/DVD drive when dealing with other discs. Slot-loading drives just don't tolerate discs with labels well.)

Anyway, thanks for your responses, and rest assured that I certainly understand if this can't be a priority right now.

bobson
Posts: 2
Joined: Thu Dec 04, 2008 1:52 am

Re: Feature request: limiting the speed of the CDROM drive

Post by bobson » Thu Dec 04, 2008 1:59 am

I also have the same request. Couldn't find any software that can limit the optical drive speed under OS X in order to reduce noise. Any progress with this feature? Or any other pointers/ideas?
Thanks.

goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: Feature request: limiting the speed of the CDROM drive

Post by goldenband » Thu Dec 04, 2008 3:39 am

Bobson, give Discrotate a try. Someone on the Cog forums was kind enough to point it out, and though it didn't solve all my ripping issues (unfortunately), it did slow my CDROM drive down exactly as advertised.

bobson
Posts: 2
Joined: Thu Dec 04, 2008 1:52 am

Re: Feature request: limiting the speed of the CDROM drive

Post by bobson » Thu Dec 04, 2008 5:03 am

Goldenband, thanks a lot, that's exactly what I needed. Unfortunately, it appears that my macbook's drive (late 2008) is not supported by this utility. The DiscRotate Tester gave me this result:

HL-DT-ST DVDRW GS21N Media
Current Medium: /dev/rdisk1
Current Drive Speed: 11080 kB/s
Min. Drive Speed: 11080 kB/s
Max. Drive Speed: 11080 kB/s

I wonder if the min. drive speed being equal to the max. speed is a hardware limitation, or if it can be changed via firmware/software. Any thoughts?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests