Enabled DVD-R/DL Sequential via burn_allow_untested_profiles()

This commit is contained in:
Thomas Schmitt 2007-02-23 19:08:58 +00:00
parent 0ddeb01502
commit 2e361e50ed
6 changed files with 86 additions and 20 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.02.22.113016" #define Cdrskin_timestamP "2007.02.23.190937"

View File

@ -689,6 +689,7 @@ Media type can be recognized by Current Profile from 46h GET CONFIGURATION.
DVD-R 0011h DVD-R 0011h
DVD-RW Restricted Overwrite 0013h DVD-RW Restricted Overwrite 0013h
DVD-RW Sequential Recording 0014h DVD-RW Sequential Recording 0014h
(DVD-R/DL Sequential Recording 0015h untested, might be single-session only)
There are two approaches for writing to sequential DVD-R[W]: DAO and There are two approaches for writing to sequential DVD-R[W]: DAO and
Incremental. Not all media and drives offer Incremental which allows Incremental. Not all media and drives offer Incremental which allows
@ -701,6 +702,7 @@ track and it demands an exactly predicted track size.
- DAO writing - DAO writing
- Obtaining DVD-R[W] multi-session info for extending ISO-9660 filesystems - Obtaining DVD-R[W] multi-session info for extending ISO-9660 filesystems
- Obtaining a Table Of Content from DVD-R[W] - Obtaining a Table Of Content from DVD-R[W]
- Hearsay about DVD-R/DL (Dual Layer)
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
About overwriteable, blank, appendable and finalized DVD-R[W] media : About overwriteable, blank, appendable and finalized DVD-R[W] media :
@ -962,5 +964,24 @@ model. Their start address is computed from the start and size of the last
track of the session. track of the session.
-------------------------------------------------------------------------------
Hearsay about DVD-R/DL (Dual Layer) :
DVD-R/DL can assume profile 0015h DVD-R Dual Layer Sequential which is supposed
to behave like DVD-R or 0016h DVD-R Dual Layer Jump which has no counterpart
with DVD-R.
A half-sentence in mmc5r03c.pdf 6.3.3.3.3 might indicate that closing a session
by 5Bh CLOSE TRACK SESSION Close Function 010b overrides the multi-session bits
in mode page 5.
growisofs applies this function in case of not DAO, though. A comment in
growisofs_mmc.cpp states: "// DVD-R DL Seq has no notion of multi-session".
I am not reading this from the specs - but not explicitely the contrary either.
For now libburn will close the session but there is a macro prepared in
libburn/write.c Libburn_dvd_r_dl_multi_no_close_sessioN which will suppress
close session if multi-session is demanded.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------

View File

@ -1641,8 +1641,9 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
} }
if (wt == BURN_WRITE_RAW) if (wt == BURN_WRITE_RAW)
o->multi_session = o->multi_track = 0; o->multi_session = o->multi_track = 0;
} else if (d->current_profile == 0x11 || d->current_profile == 0x14) { } else if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
/* DVD-R , sequential DVD-RW */ d->current_profile == 0x15) {
/* DVD-R , sequential DVD-RW , DVD-R/DL Sequential */
if (s == BURN_DISC_BLANK) { if (s == BURN_DISC_BLANK) {
o->might_do_sao = 1; o->might_do_sao = 1;
o->advised_write_mode = BURN_WRITE_SAO; o->advised_write_mode = BURN_WRITE_SAO;

View File

@ -589,6 +589,19 @@ void burn_set_verbosity(int level);
void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy); void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy);
/* ts A70223 */
/** 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".
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
any drive scanning.
@param yes 1=allow all implemented profiles, 0=only tested media (default)
*/
void burn_allow_untested_profiles(int yes);
/* ts A60823 */ /* ts A60823 */
/** Aquire a drive with known persistent address.This is the sysadmin friendly /** Aquire a drive with known persistent address.This is the sysadmin friendly
way to open one drive and to leave all others untouched. It bundles way to open one drive and to leave all others untouched. It bundles

View File

@ -21,6 +21,10 @@
#include "options.h" #include "options.h"
/* ts A70223 : in init.c */
extern int burn_support_untested_profiles;
#ifdef Libburn_log_in_and_out_streaM #ifdef Libburn_log_in_and_out_streaM
/* <<< ts A61031 */ /* <<< ts A61031 */
#include <sys/types.h> #include <sys/types.h>
@ -252,7 +256,8 @@ int mmc_read_track_info(struct burn_drive *d, int trackno, struct buffer *buf)
trackno = 1; trackno = 1;
else if (d->current_profile == 0x10 || else if (d->current_profile == 0x10 ||
d->current_profile == 0x11 || d->current_profile == 0x11 ||
d->current_profile == 0x14) d->current_profile == 0x14 ||
d->current_profile == 0x15)
/* DVD-ROM , DVD-R[W] Sequential */ /* DVD-ROM , DVD-R[W] Sequential */
trackno = d->last_track_no; 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 */
@ -287,7 +292,8 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
trackno = 1; trackno = 1;
else if (d->current_profile == 0x10 || else if (d->current_profile == 0x10 ||
d->current_profile == 0x11 || d->current_profile == 0x11 ||
d->current_profile == 0x14) d->current_profile == 0x14 ||
d->current_profile == 0x15)
/* DVD-ROM, DVD-R[W] Sequential */ /* DVD-ROM, DVD-R[W] Sequential */
trackno = d->last_track_no; 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 */
@ -1552,6 +1558,8 @@ void mmc_get_configuration(struct burn_drive *d)
#ifdef Libburn_support_dvd_r_seQ #ifdef Libburn_support_dvd_r_seQ
if (cp == 0x10 || cp == 0x11 || cp == 0x14) /* DVD-ROM,DVD-R,DVD-RW */ if (cp == 0x10 || cp == 0x11 || cp == 0x14) /* DVD-ROM,DVD-R,DVD-RW */
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
if (cp == 0x15 && burn_support_untested_profiles) /* DVD-R/DL */
d->current_is_supported_profile = 1;
#endif #endif
/* Enable this to get loud and repeated reports about the feature set : /* Enable this to get loud and repeated reports about the feature set :
@ -2251,7 +2259,7 @@ int mmc_setup_drive(struct burn_drive *d)
d->start_lba = -2000000000; d->start_lba = -2000000000;
d->end_lba = -2000000000; d->end_lba = -2000000000;
/* ts A61201 - A70128 */ /* ts A61201 - A70223*/
d->erasable = 0; d->erasable = 0;
d->current_profile = -1; d->current_profile = -1;
d->current_profile_text[0] = 0; d->current_profile_text[0] = 0;
@ -2298,9 +2306,10 @@ int mmc_compose_mode_page_5(struct burn_drive *d,
/* Link size dummy */ /* Link size dummy */
pd[5] = 0; pd[5] = 0;
} else if ((d->current_profile == 0x14 || d->current_profile == 0x11) } else if ((d->current_profile == 0x14 || d->current_profile == 0x11 ||
d->current_profile == 0x15)
&& o->write_type == BURN_WRITE_SAO) { && o->write_type == BURN_WRITE_SAO) {
/* ts A70205 : DVD-R[W} : Disc-at-once, DAO */ /* ts A70205 : DVD-R[W][/DL] : Disc-at-once, DAO */
/* Learned from dvd+rw-tools and mmc5r03c.pdf . /* Learned from dvd+rw-tools and mmc5r03c.pdf .
See doc/cookbook.txt for more detailed references. */ See doc/cookbook.txt for more detailed references. */
@ -2313,8 +2322,9 @@ int mmc_compose_mode_page_5(struct burn_drive *d,
/* Data Block Type = 8 */ /* Data Block Type = 8 */
pd[4] = 8; pd[4] = 8;
} else if (d->current_profile == 0x14 || d->current_profile == 0x11) { } else if (d->current_profile == 0x14 || d->current_profile == 0x11 ||
/* ts A70128 : DVD-R[W] Incremental Streaming */ d->current_profile == 0x15) {
/* ts A70128 : DVD-R[W][/DL] Incremental Streaming */
/* Learned from transport.hxx : page05_setup() /* Learned from transport.hxx : page05_setup()
and mmc5r03c.pdf 7.5, 4.2.3.4 Table 17 and mmc5r03c.pdf 7.5, 4.2.3.4 Table 17
and spc3r23.pdf 6.8, 7.4.3 */ and spc3r23.pdf 6.8, 7.4.3 */

View File

@ -6,6 +6,16 @@
/* ts A61009 */ /* ts A61009 */
/* #include <a ssert.h> */ /* #include <a ssert.h> */
/* mmc5r03c.pdf 6.3.3.3.3: DVD-R DL: Close Function 010b: Close Session
"When the recording mode is Incremental Recording,
the disc is single session."
Enable this macro to get away from growisofs which uses Close Session
but also states "// DVD-R DL Seq has no notion of multi-session".
#define Libburn_dvd_r_dl_multi_no_close_sessioN 1
*/
/* ts A61106 : Deliberate defect provocation macros /* ts A61106 : Deliberate defect provocation macros
DO NOT DEFINE THESE IF YOU WANT SUCCESSFUL TAO ! DO NOT DEFINE THESE IF YOU WANT SUCCESSFUL TAO !
@ -969,8 +979,9 @@ int burn_dvd_write_track(struct burn_write_opts *o,
/* ts A70213 : eventually expand size of track to max */ /* ts A70213 : eventually expand size of track to max */
burn_track_apply_fillup(t, d->media_capacity_remaining, 0); burn_track_apply_fillup(t, d->media_capacity_remaining, 0);
if (d->current_profile == 0x11 || d->current_profile == 0x14) { if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
/* DVD-R, DVD-RW Sequential */ d->current_profile == 0x15) {
/* DVD-R, DVD-RW Sequential, DVD-R/DL Sequential */
ret = burn_disc_open_track_dvd_minus_r(o, s, tnum); ret = burn_disc_open_track_dvd_minus_r(o, s, tnum);
if (ret <= 0) if (ret <= 0)
goto ex; goto ex;
@ -1030,8 +1041,9 @@ int burn_dvd_write_track(struct burn_write_opts *o,
is_flushed = 1; is_flushed = 1;
/* Eventually finalize track */ /* Eventually finalize track */
if (d->current_profile == 0x11 || d->current_profile == 0x14) { if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
/* DVD-R, DVD-RW Sequential */ d->current_profile == 0x15) {
/* DVD-R, DVD-RW Sequential, DVD-R/DL Sequential */
ret = burn_disc_close_track_dvd_minus_r(o, s, tnum); ret = burn_disc_close_track_dvd_minus_r(o, s, tnum);
if (ret != 2) if (ret != 2)
goto ex; goto ex;
@ -1083,7 +1095,7 @@ int burn_disc_close_session_dvd_minus_rw(struct burn_write_opts *o,
} }
/* ts A70129 : for profile 0x11 DVD-R and 0x14 DVD-RW Sequential */ /* ts A70129 : for profile 0x11 DVD-R, 0x14 DVD-RW Seq, 0x15 DVD-R/DL Seq */
int burn_disc_close_session_dvd_minus_r(struct burn_write_opts *o, int burn_disc_close_session_dvd_minus_r(struct burn_write_opts *o,
struct burn_session *s) struct burn_session *s)
{ {
@ -1093,6 +1105,11 @@ int burn_disc_close_session_dvd_minus_r(struct burn_write_opts *o,
if (o->write_type != BURN_WRITE_TAO) if (o->write_type != BURN_WRITE_TAO)
return 2; return 2;
#ifdef Libburn_dvd_r_dl_multi_no_close_sessioN
if (d->current_profile == 0x15 && o->multi)
return 2;
#endif
libdax_msgs_submit(libdax_messenger, o->drive->global_index,0x00020119, libdax_msgs_submit(libdax_messenger, o->drive->global_index,0x00020119,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
"Closing session", 0, 0); "Closing session", 0, 0);
@ -1118,8 +1135,9 @@ int burn_dvd_write_session(struct burn_write_opts *o,
if (ret <= 0) if (ret <= 0)
break; break;
} }
if ((d->current_profile == 0x11 || d->current_profile == 0x14)) { if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
/* DVD-R , DVD-RW Sequential */ d->current_profile == 0x15) {
/* DVD-R , DVD-RW Sequential, DVD-R/DL Sequential */
ret = burn_disc_close_session_dvd_minus_r(o, s); ret = burn_disc_close_session_dvd_minus_r(o, s);
if (ret <= 0) if (ret <= 0)
return 0; return 0;
@ -1287,7 +1305,9 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
if (o->start_byte >= 0 && (o->start_byte % 32768)) if (o->start_byte >= 0 && (o->start_byte % 32768))
strcat(reasons, strcat(reasons,
"write start address not properly aligned to 32k, "); "write start address not properly aligned to 32k, ");
} else if (d->current_profile == 0x11 || d->current_profile == 0x14) { } else if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
d->current_profile == 0x15) {
/* DVD-R* Sequential */
if (o->start_byte >= 0) if (o->start_byte >= 0)
strcat(reasons, "write start address not supported, "); strcat(reasons, "write start address not supported, ");
} else { } else {
@ -1433,8 +1453,9 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
/* _Rigid_ Restricted Overwrite demands this */ /* _Rigid_ Restricted Overwrite demands this */
o->obs_pad = 1; /* fill-up track's last 32k buffer */ o->obs_pad = 1; /* fill-up track's last 32k buffer */
} else if (d->current_profile == 0x11 || d->current_profile == 0x14) { } else if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
/* DVD-R , DVD-RW Sequential */ d->current_profile == 0x15) {
/* DVD-R , DVD-RW Sequential , DVD-R/DL Sequential */
t = disc->session[0]->track[0]; t = disc->session[0]->track[0];
o_end = ( burn_track_is_open_ended(t) && !o->fill_up_media ); o_end = ( burn_track_is_open_ended(t) && !o->fill_up_media );
default_size = burn_track_get_default_size(t); default_size = burn_track_get_default_size(t);