Re: PATCH for changing of DVD speed via ioctl() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cHitman <[email protected]> wrote:

> This patch implements changing of DVD speed via ioctl() call, like
> CDROM_SELECT_SPEED do. In CDROM_SELECT_SPEED its implementation isn't
> so good (diffirent values of 1x in KB/s, troubles with return value of
> cdrom_select_speed() and other). I defined CDROM_SELECT_DVDSPEED ioctl
> () call with value 0x5324. But some dvdroms (like Plexter) do not
> support this feature.. :(

Introducing another device-specific IOCTL because the other device-specific
request turned out to be wrong is likely to be wrong, too.

>  req.sense = sense;
> -     if (speed == 0)
> +     if (speed <= 0)
>  speed = 0xffff; /* set to max */
>  else
>  speed *= 177;   /* Nx to kbytes/s */

The parameter value should IMHO be a pointer to a struct {
 unsigned long long maxspeed; // (with 0 being the magic max. value?)
 int facility; /* 0=general speed, 2=general read, 4=read data,
                  6=read audio, 8=read raw ... whatever is supported
                  n+1 = s/read/write/ */
}

That will work for any device and speed you can expect in the near future.

> +static int cdrom_select_dvd_speed(ide_drive_t *drive, int speed,
> +             struct request_sense *sense)
> +{
> +     struct request req;
> +     struct request_sense cap_sense;
> +     unsigned char pd[28];
> +     unsigned long cap, spf;
> +
> +     if (!CDROM_CONFIG_FLAGS(drive)->dvd)
> +             return -ENOSYS;

EINVAL?

-- 
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux