Enabled writing to DVD-RAM
This commit is contained in:
@ -38,10 +38,12 @@ extern struct libdax_msgs *libdax_messenger;
|
||||
#define Libburn_support_dvd_plus_rW 1
|
||||
|
||||
/* ts A61229 */
|
||||
/*
|
||||
*/
|
||||
#define Libburn_support_dvd_minusrw_overW 1
|
||||
|
||||
/* ts A70112 */
|
||||
#define Libburn_support_dvd_raM 1
|
||||
|
||||
|
||||
/* Progress report (with Libburn_support_dvd_plus_rW defined):
|
||||
ts A61219 : It seems to work with a used (i.e. thoroughly formatted) DVD+RW.
|
||||
Error messages of class DEBUG appear because of inability to
|
||||
@ -62,6 +64,7 @@ extern struct libdax_msgs *libdax_messenger;
|
||||
really seems to work without such a page.
|
||||
ts A70101 : Formatted DVD-RW media. Success is varying with media, but
|
||||
dvd+rw-format does not do better with the same media.
|
||||
ts A70112 : Support for writing to DVD-RAM.
|
||||
|
||||
Todo:
|
||||
Determine first free lba for appending data.
|
||||
@ -167,8 +170,9 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
|
||||
memcpy(c.opcode, MMC_TRACK_INFO, sizeof(MMC_TRACK_INFO));
|
||||
c.opcode[1] = 1;
|
||||
if(trackno<=0) {
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13)
|
||||
/* DVD+RW or DVD-RW restricted overwrite*/
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
|
||||
d->current_profile == 0x12 )
|
||||
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM */
|
||||
c.opcode[5] = 1;
|
||||
else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */
|
||||
c.opcode[5] = 0xFF;
|
||||
@ -610,10 +614,13 @@ void mmc_read_disc_info(struct burn_drive *d)
|
||||
*/
|
||||
d->bg_format_status = data[7] & 3;
|
||||
|
||||
/* ts A61219 : preliminarily declare all DVD+RW blank,
|
||||
(which is not the same as bg_format_status==0 "blank") */
|
||||
/* ts A61229 : same for DVD-RW Restricted overwrite */
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13)
|
||||
/* Preliminarily declare blank:
|
||||
ts A61219 : DVD+RW (is not bg_format_status==0 "blank")
|
||||
ts A61229 : same for DVD-RW Restricted overwrite
|
||||
ts A70112 : same for DVD-RAM
|
||||
*/
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
|
||||
d->current_profile == 0x12)
|
||||
d->status = BURN_DISC_BLANK;
|
||||
}
|
||||
|
||||
@ -1101,6 +1108,10 @@ void mmc_get_configuration(struct burn_drive *d)
|
||||
if (cp == 0x13)
|
||||
d->current_is_supported_profile = 1;
|
||||
#endif
|
||||
#ifdef Libburn_support_dvd_raM
|
||||
if (cp == 0x12)
|
||||
d->current_is_supported_profile = 1;
|
||||
#endif
|
||||
|
||||
/* >>> see mmc5r03c.pdf 5.2
|
||||
Interpret list of profile and feature descriptors.
|
||||
|
@ -434,6 +434,10 @@ void spc_getcaps(struct burn_drive *d)
|
||||
spc_inquiry(d);
|
||||
spc_sense_caps(d);
|
||||
spc_sense_error_params(d);
|
||||
|
||||
/* <<< for debugging. >>> ??? to be fixely included here ?
|
||||
mmc_read_format_capacities(d, -1);
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -918,7 +918,8 @@ int burn_dvd_write_session(struct burn_write_opts *o,
|
||||
if (ret <= 0)
|
||||
break;
|
||||
}
|
||||
if (strcmp(d->current_profile_text,"DVD+RW")==0) {
|
||||
if (d->current_profile == 0x1a) {
|
||||
/* DVD+RW */
|
||||
ret = burn_disc_close_session_dvd_plus_rw(o, s);
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
@ -927,6 +928,9 @@ int burn_dvd_write_session(struct burn_write_opts *o,
|
||||
ret = burn_disc_close_session_dvd_minus_rw(o, s);
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
} else if (d->current_profile == 0x12) {
|
||||
/* DVD-RAM */
|
||||
/* ??? any finalization needed ? */;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@ -1056,13 +1060,14 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||
goto early_failure;
|
||||
}
|
||||
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13) {
|
||||
/* DVD+RW or DVD-RW Restricted Overwrite */
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
|
||||
d->current_profile == 0x12) {
|
||||
/* DVD+RW , DVD-RW Restricted Overwrite , DVD-RAM */
|
||||
if (disc->sessions!=1 || disc->session[0]->tracks>1
|
||||
|| o->multi ) {
|
||||
sprintf(msg,
|
||||
"Burning is restricted to a single track and no multi-session"
|
||||
);
|
||||
"Burning is restricted to a single track and no multi-session on %s",
|
||||
d->current_profile_text);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x0002011f,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
@ -1070,7 +1075,8 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||
goto early_failure;
|
||||
}
|
||||
}
|
||||
if (d->current_profile == 0x1a) { /* DVD+RW */
|
||||
if (d->current_profile == 0x1a || d->current_profile == 0x12) {
|
||||
/* DVD+RW , DVD-RAM */
|
||||
if (o->start_byte >= 0 && (o->start_byte % 2048)) {
|
||||
sprintf(msg,
|
||||
"Write start address not properly aligned to 2048");
|
||||
@ -1080,7 +1086,9 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||
msg, 0,0);
|
||||
goto early_failure;
|
||||
}
|
||||
ret = burn_disc_setup_dvd_plus_rw(o, disc);
|
||||
ret = 1;
|
||||
if (d->current_profile == 0x1a)
|
||||
ret = burn_disc_setup_dvd_plus_rw(o, disc);
|
||||
if (ret <= 0) {
|
||||
sprintf(msg,
|
||||
"Write preparation setup failed for DVD+RW");
|
||||
|
Reference in New Issue
Block a user