Preparations for DVD-R[W] Sequential Recording
This commit is contained in:
parent
1c750ea1e8
commit
eae1198606
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2007.01.29.175822"
|
#define Cdrskin_timestamP "2007.01.30.165317"
|
||||||
|
@ -44,7 +44,7 @@ extern struct libdax_msgs *libdax_messenger;
|
|||||||
#define Libburn_support_dvd_raM 1
|
#define Libburn_support_dvd_raM 1
|
||||||
|
|
||||||
|
|
||||||
/* ts A70129 >>> EXPERIMENTAL
|
/* ts A70129 >>> EXPERIMENTAL UNTESTED
|
||||||
#define Libburn_support_dvd_r_seQ 1
|
#define Libburn_support_dvd_r_seQ 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -168,6 +168,7 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
|
|||||||
struct buffer buf;
|
struct buffer buf;
|
||||||
struct command c;
|
struct command c;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
|
int i;
|
||||||
|
|
||||||
mmc_function_spy("mmc_get_nwa");
|
mmc_function_spy("mmc_get_nwa");
|
||||||
c.retry = 1;
|
c.retry = 1;
|
||||||
@ -178,11 +179,15 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
|
|||||||
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
|
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
|
||||||
d->current_profile == 0x12 )
|
d->current_profile == 0x12 )
|
||||||
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM */
|
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM */
|
||||||
c.opcode[5] = 1;
|
trackno = 1;
|
||||||
|
else if (d->current_profile == 0x11 ||
|
||||||
|
d->current_profile == 0x14) /* DVD-R[W] Sequential */
|
||||||
|
trackno = d->last_track_no;
|
||||||
else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */
|
else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */
|
||||||
c.opcode[5] = 0xFF;
|
trackno = 0xFF;
|
||||||
} else
|
}
|
||||||
c.opcode[5] = trackno;
|
for (i = 0; i < 4; i++)
|
||||||
|
c.opcode[2 + i] = (trackno >> (24 - 8 * i)) & 0xff;
|
||||||
c.page = &buf;
|
c.page = &buf;
|
||||||
c.dir = FROM_DRIVE;
|
c.dir = FROM_DRIVE;
|
||||||
d->issue_command(d, &c);
|
d->issue_command(d, &c);
|
||||||
@ -538,6 +543,7 @@ void mmc_read_disc_info(struct burn_drive *d)
|
|||||||
/* ts A61020 */
|
/* ts A61020 */
|
||||||
d->start_lba = d->end_lba = -2000000000;
|
d->start_lba = d->end_lba = -2000000000;
|
||||||
d->erasable = 0;
|
d->erasable = 0;
|
||||||
|
d->last_track_no = 1;
|
||||||
|
|
||||||
/* ts A61202 */
|
/* ts A61202 */
|
||||||
d->toc_entries = 0;
|
d->toc_entries = 0;
|
||||||
@ -595,7 +601,6 @@ void mmc_read_disc_info(struct burn_drive *d)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
d->status = BURN_DISC_BLANK;
|
d->status = BURN_DISC_BLANK;
|
||||||
d->last_track_no = 0;
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
d->status = BURN_DISC_APPENDABLE;
|
d->status = BURN_DISC_APPENDABLE;
|
||||||
@ -1816,7 +1821,7 @@ int mmc_setup_drive(struct burn_drive *d)
|
|||||||
d->needs_close_session = 0;
|
d->needs_close_session = 0;
|
||||||
d->bg_format_status = -1;
|
d->bg_format_status = -1;
|
||||||
d->num_format_descr = 0;
|
d->num_format_descr = 0;
|
||||||
d->last_track_no = 0;
|
d->last_track_no = 1;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -196,8 +196,7 @@ int burn_write_close_track(struct burn_write_opts *o, struct burn_session *s,
|
|||||||
MMC-3 does not. I tried both. 0xFF was in effect when other
|
MMC-3 does not. I tried both. 0xFF was in effect when other
|
||||||
bugs finally gave up and made way for readable tracks. */
|
bugs finally gave up and made way for readable tracks. */
|
||||||
/* ts A70129
|
/* ts A70129
|
||||||
Probably the right value would be d->last_track_no+tnum for
|
Probably the right value for appendables is d->last_track_no
|
||||||
appendables
|
|
||||||
*/
|
*/
|
||||||
d->close_track_session(o->drive, 0, 0xff);
|
d->close_track_session(o->drive, 0, 0xff);
|
||||||
|
|
||||||
@ -901,13 +900,10 @@ int burn_disc_close_track_dvd_minus_r(struct burn_write_opts *o,
|
|||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
d->busy = BURN_DRIVE_CLOSING_SESSION;
|
d->busy = BURN_DRIVE_CLOSING_SESSION;
|
||||||
/* 0xff was a name for the last track in MMC-1 but later
|
/* Ignoring tnum here and hoping that d->last_track_no is correct */
|
||||||
it vanished. One would need to determine the absolute
|
d->close_track_session(d, 0, d->last_track_no); /* CLOSE TRACK, 001b */
|
||||||
logical track number in multi-session situations.
|
|
||||||
Probably: d->last_track_no+tnum
|
|
||||||
*/
|
|
||||||
d->close_track_session(d, 0, 0xff); /* CLOSE TRACK, 001b */
|
|
||||||
d->busy = BURN_DRIVE_WRITING;
|
d->busy = BURN_DRIVE_WRITING;
|
||||||
|
d->last_track_no++;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -953,7 +949,7 @@ int burn_dvd_write_track(struct burn_write_opts *o,
|
|||||||
d->progress.sector++;
|
d->progress.sector++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pad up buffer to next full 32 kB */
|
/* Pad up buffer to next full o->obs (usually 32 kB) */
|
||||||
if (o->obs_pad && out->bytes > 0 && out->bytes < o->obs) {
|
if (o->obs_pad && out->bytes > 0 && out->bytes < o->obs) {
|
||||||
memset(out->data + out->bytes, 0, o->obs - out->bytes);
|
memset(out->data + out->bytes, 0, o->obs - out->bytes);
|
||||||
out->sectors += (o->obs - out->bytes) / 2048;
|
out->sectors += (o->obs - out->bytes) / 2048;
|
||||||
@ -1024,8 +1020,8 @@ int burn_disc_close_session_dvd_minus_r(struct burn_write_opts *o,
|
|||||||
{
|
{
|
||||||
struct burn_drive *d = o->drive;
|
struct burn_drive *d = o->drive;
|
||||||
|
|
||||||
if (d->current_has_feat21h != 1) /* only for Incremental writing */
|
if (d->current_has_feat21h != 1)
|
||||||
return 2;
|
return 2; /* only for Incremental writing */
|
||||||
|
|
||||||
d->busy = BURN_DRIVE_CLOSING_SESSION;
|
d->busy = BURN_DRIVE_CLOSING_SESSION;
|
||||||
d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */
|
d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */
|
||||||
@ -1177,7 +1173,7 @@ int burn_disc_setup_dvd_minus_rw(struct burn_write_opts *o,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts A70129 */
|
/* ts A70129 : for DVD-R[W] Sequential Recoding */
|
||||||
int burn_disc_setup_dvd_minus_r(struct burn_write_opts *o,
|
int burn_disc_setup_dvd_minus_r(struct burn_write_opts *o,
|
||||||
struct burn_disc *disc)
|
struct burn_disc *disc)
|
||||||
{
|
{
|
||||||
@ -1304,6 +1300,8 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
|||||||
msg, 0,0);
|
msg, 0,0);
|
||||||
goto early_failure;
|
goto early_failure;
|
||||||
}
|
}
|
||||||
|
/* ??? padding needed ??? cowardly doing it for now */
|
||||||
|
o->obs_pad = 1; /* fill-up track's last 32k buffer */
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sprintf(msg, "Unsuitable media detected. Profile %4.4Xh %s",
|
sprintf(msg, "Unsuitable media detected. Profile %4.4Xh %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user