Have you tried something like:
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <linux/cdrom.h>
#include <sys/ioctl.h>
/* Max it out */
#define HOWFAST 0
main(int ac, char ** av)
{
char * device = "/dev/scd0";
int fd;
int status;
fd = open(device, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
perror("Can't open device: ");
exit(-2);
}
/* `0' means auto-selection, you might also try big numbers :) */
status=ioctl(fd, CDROM_SELECT_SPEED, 0);
if (status) {
perror("Can't set speed: ");
exit(-1);
}
}
Also check out the drive speed field when running
cat /proc/sys/dev/cdrom/info
and see if it changes when running the setspeed app.
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/