Re: Re: Is controlling DVD speeds via SET_STREAMING supported?

From: Jens Axboe
Date: Sat Nov 27 2004 - 02:47:12 EST


On Wed, Nov 24 2004, Thomas Fritzsche wrote:
> /* SET STREAMING command */
> cgc.cmd[0] = 0xb6;
> /* 28 byte parameter list length */
> cgc.cmd[10] = 28;
>
> cgc.sense = &sense;
> cgc.buffer = buffer;
> cgc.buflen = sizeof(buffer);
> cgc.data_direction = CGC_DATA_WRITE;
>
> buffer[8] = 0xff;
> buffer[9] = 0xff;
> buffer[10] = 0xff;
> buffer[11] = 0xff;
>
> buffer[15] = 177*speed;
> buffer[18] = 0x03;
> buffer[19] = 0xE8;

I should have read this more closely... You need to fill the speed
fields correctly:

unsigned long read_size = 177 * speed;

buffer[12] = (read_size >> 24) & 0xff;
buffer[13] = (read_size >> 16) & 0xff;
buffer[14] = (read_size >> 8) & 0xff;
buffer[15] = read_size & 0xff;

Ditto for write size.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/