diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index a2551ae..bb5f0f5 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.11.16.133951" +#define Cdrskin_timestamP "2006.11.18.194606" diff --git a/libburn/drive.c b/libburn/drive.c index 69c2545..cefa50e 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -156,10 +156,13 @@ int burn_drive_grab(struct burn_drive *d, int le) } d->busy = BURN_DRIVE_GRABBING; - if (le) + if (le) { d->load(d); + d->start_unit(d); + } d->lock(d); + d->start_unit(d); /* ts A61020 : this was BURN_DISC_BLANK as pure guess */ d->status = BURN_DISC_UNREADY; diff --git a/libburn/sbc.c b/libburn/sbc.c index 4be928d..942ebf5 100644 --- a/libburn/sbc.c +++ b/libburn/sbc.c @@ -11,6 +11,7 @@ /* spc command set */ static char SBC_LOAD[] = { 0x1b, 0, 0, 0, 3, 0 }; static char SBC_UNLOAD[] = { 0x1b, 0, 0, 0, 2, 0 }; +static char SBC_START_UNIT[] = { 0x1b, 0, 0, 0, 1, 0 }; void sbc_load(struct burn_drive *d) { @@ -37,12 +38,28 @@ void sbc_eject(struct burn_drive *d) d->issue_command(d, &c); } +/* ts A61118 : is it necessary to tell the drive to get ready for use ? */ +int sbc_start_unit(struct burn_drive *d) +{ + struct command c; + + memcpy(c.opcode, SBC_START_UNIT, sizeof(SBC_START_UNIT)); + c.retry = 1; + c.oplen = sizeof(SBC_START_UNIT); + c.dir = NO_TRANSFER; + c.page = NULL; + d->issue_command(d, &c); + return (c.error==0); +} + + /* ts A61021 : the sbc specific part of sg.c:enumerate_common() */ int sbc_setup_drive(struct burn_drive *d) { d->eject = sbc_eject; d->load = sbc_load; + d->start_unit = sbc_start_unit; return 1; } diff --git a/libburn/sbc.h b/libburn/sbc.h index 7fc82e3..dc7a991 100644 --- a/libburn/sbc.h +++ b/libburn/sbc.h @@ -8,6 +8,9 @@ struct burn_drive; void sbc_load(struct burn_drive *); void sbc_eject(struct burn_drive *); +/* ts A61118 */ +int sbc_start_unit(struct burn_drive *); + /* ts A61021 : the sbc specific part of sg.c:enumerate_common() */ int sbc_setup_drive(struct burn_drive *d); diff --git a/libburn/transport.h b/libburn/transport.h index f44e4ad..dbf188a 100644 --- a/libburn/transport.h +++ b/libburn/transport.h @@ -159,6 +159,7 @@ struct burn_drive void (*unlock) (struct burn_drive *); void (*eject) (struct burn_drive *); void (*load) (struct burn_drive *); + int (*start_unit) (struct burn_drive *); void (*read_disc_info) (struct burn_drive *); void (*read_sectors) (struct burn_drive *, int start,