Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 08:22:22 +0300
From:      "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
To:        stable@FreeBSD.ORG
Subject:   Re: Problem with video-CDs
Message-ID:  <20001212082222.A19475@snark.ptc.spbu.ru>
In-Reply-To: <200012110158.MAA08709@lightning.itga.com.au>; from "Gregory Bond" on Mon, Dec 11, 2000 at 12:58:26
References:  <200012110158.MAA08709@lightning.itga.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 11, 2000 at 12:58:26 +1100, Gregory Bond wrote:

> 	acd0: READ_BIG - ILLEGAL REQUEST asc=64 ascq=00 error=04 
> 
> and dd gets EIO.  On 3.5 dd gets EIO but no console message.
> 
> Is this a known problem?

Yes.

In /sys/dev/ata/atapi-cd.c in acd_start change flags to ATAPI_READ_CD
from 0x10 (data only) to 0xf8 (whole sector):

--- atapi-cd.c-dist	Tue Dec 12 08:11:15 2000
+++ atapi-cd.c-new	Tue Dec 12 08:12:08 2000
@@ -1165,7 +1165,7 @@
 	    ccb[0] = ATAPI_READ_BIG;
 	else {
 	    ccb[0] = ATAPI_READ_CD;
-	    ccb[9] = 0x10;
+	    ccb[9] = 0xf8;
 	}
     }
     else


After this you can write a C program that does something along the
lines of:

struct vcdsector {
    u_char sync[12];
    u_char header[4];
    u_char subheader[8];
    u_char data[2324];
    u_char spare[4];
};

    struct vcdsector sec;
    int bs = sizeof(struct vcdsector);

    /* read toc */

    ioctl(fd, CDRIOCSETBLOCKSIZE, &bs);	/* sic! CD_R_IO, */

    /* lseek to track start */

    for (...) {
        read(fd, &sec, bs);
        fwrite(sec.data, 2324, 1, outfile);
    }

Driver author knows about this and, as far as I understand, has this
fixed in his development sources.

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001212082222.A19475>