Made support for DVD+R DL official, enabled untested support for BD-RE

This commit is contained in:
2008-02-28 12:32:34 +00:00
parent ea6957ef68
commit 616454c737
6 changed files with 40 additions and 33 deletions

View File

@ -730,7 +730,7 @@ void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy);
/** Allows the use of media types which are implemented in libburn but not yet
tested. The list of those untested profiles is subject to change.
Currently it contains: 0x15 "DVD-R/DL sequential recording",
0x2b "DVD+R/DL"
0x43 "BD-RE"
If you really test such media, then please report the outcome on
libburn-hackers@pykix.org
If ever then this call should be done soon after burn_initialize() before
@ -1093,10 +1093,11 @@ off_t burn_disc_available_space(struct burn_drive *d,
0x09 "CD-R", 0x0a "CD-RW",
0x11 "DVD-R sequential recording", 0x12 "DVD-RAM",
0x13 "DVD-RW restricted overwrite", 0x14 "DVD-RW sequential recording",
0x1a "DVD+RW", 0x1b "DVD+R".
0x1a "DVD+RW", 0x1b "DVD+R"
0x2b "DVD+R/DL"
If enabled by burn_allow_untested_profiles() it also writes to profiles
0x15 "DVD-R/DL sequential recording", 0x2b "DVD+R/DL".
Writeable stdio-drives return this profile
0x15 "DVD-R/DL sequential recording", 0x43 "BD-RE".
Writeable stdio-drives return this profile:
0xffff "stdio file"
@param d The drive where the media is inserted.
@param pno Profile Number as of mmc5r03c.pdf, table 89

View File

@ -306,8 +306,9 @@ int mmc_read_track_info(struct burn_drive *d, int trackno, struct buffer *buf,
c.opcode[1] = 1;
if(trackno<=0) {
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
d->current_profile == 0x12 )
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM */
d->current_profile == 0x12 || d->current_profile == 0x43)
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM
BD-RE */
trackno = 1;
else if (d->current_profile == 0x10 ||
d->current_profile == 0x11 ||
@ -349,7 +350,7 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
*nwa = mmc_four_char_to_int(data + 12);
num = mmc_four_char_to_int(data + 16);
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
d->current_profile == 0x12) {
d->current_profile == 0x12 || d->current_profile == 0x43) {
/* overwriteable */
*lba = *nwa = num = 0;
} else if (!(data[7]&1)) {
@ -1490,7 +1491,7 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
ts A70112 : same for DVD-RAM
*/
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
d->current_profile == 0x12)
d->current_profile == 0x12 || d->current_profile == 0x43)
d->status = BURN_DISC_BLANK;
if (d->status == BURN_DISC_BLANK) {
@ -2104,7 +2105,8 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
d->current_is_supported_profile = 1;
#endif
#ifdef Libburn_support_dvd_raM
if (cp == 0x12)
if (cp == 0x12 || (cp == 0x43 && burn_support_untested_profiles))
/* DVD-RAM , BD-RE */
d->current_is_supported_profile = 1;
#endif
#ifdef Libburn_support_dvd_r_seQ
@ -2114,8 +2116,7 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
d->current_is_supported_profile = 1;
#endif
#ifdef Libburn_support_dvd_plus_R
if (cp == 0x1b || (cp == 0x2b && burn_support_untested_profiles))
/* DVD+R , DVD+R/DL */
if (cp == 0x1b || cp == 0x2b) /* DVD+R , DVD+R/DL */
d->current_is_supported_profile = 1;
#endif
@ -3004,8 +3005,9 @@ int mmc_compose_mode_page_5(struct burn_drive *d,
pd[13] = 16;
} else if (d->current_profile == 0x1a || d->current_profile == 0x1b ||
d->current_profile == 0x2b || d->current_profile == 0x12) {
/* not with DVD+R[W][/DL] or DVD-RAM */;
d->current_profile == 0x2b || d->current_profile == 0x12 ||
d->current_profile == 0x43) {
/* not with DVD+R[W][/DL] or DVD-RAM or BD-RE */;
return 0;
} else {
/* Traditional setup for CD */

View File

@ -580,7 +580,7 @@ void spc_sense_write_params(struct burn_drive *d)
/* ts A70212 : try to setup d->media_capacity_remaining */
if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
d->current_profile == 0x12)
d->current_profile == 0x12 || d->current_profile == 0x43)
d->read_format_capacities(d, -1);
else if (d->status == BURN_DISC_BLANK ||
(d->current_is_cd_profile && d->status == BURN_DISC_APPENDABLE)) {

View File

@ -967,8 +967,9 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
if (d->status == BURN_DISC_UNSUITABLE)
goto unsuitable_profile;
if (d->drive_role == 2 ||
d->current_profile == 0x1a || d->current_profile == 0x12) {
/* DVD+RW , DVD-RAM , emulated drive on stdio file */
d->current_profile == 0x1a || d->current_profile == 0x12 ||
d->current_profile == 0x43) {
/* DVD+RW , DVD-RAM , BD-RE, emulated drive on stdio file */
if (o->start_byte >= 0 && (o->start_byte % 2048))
strcat(reasons,
"write start address not properly aligned to 2048, ");
@ -1370,8 +1371,8 @@ int burn_dvd_write_session(struct burn_write_opts *o,
ret = burn_disc_close_session_dvd_minus_r(o, s);
if (ret <= 0)
return 0;
} else if (d->current_profile == 0x12) {
/* DVD-RAM */
} else if (d->current_profile == 0x12 || d->current_profile == 0x43) {
/* DVD-RAM , BD-RE */
/* ??? any finalization needed ? */;
} else if (d->current_profile == 0x13) {
/* DVD-RW restricted overwrite */
@ -1522,8 +1523,9 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
d->needs_close_session = 0;
if (d->current_profile == 0x1a || d->current_profile == 0x12) {
/* DVD+RW , DVD-RAM */
if (d->current_profile == 0x1a || d->current_profile == 0x12 ||
d->current_profile == 0x43) {
/* DVD+RW , DVD-RAM , BD-RE */
ret = 1;
if (d->current_profile == 0x1a)
ret = burn_disc_setup_dvd_plus_rw(o, disc);
@ -2191,6 +2193,8 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
alignment = 32 * 1024;
if (d->current_profile == 0x1a) /* DVD+RW */
alignment = 2 * 1024;
if (d->current_profile == 0x43) /* BD-RE */
alignment = 2 * 1024;
if (alignment == 0) {
sprintf(msg, "Write start address not supported");
libdax_msgs_submit(libdax_messenger, d->global_index,