From f263e1087c1fbe589511d77af23d6a3b69f7cf9e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 5 Jan 2007 12:58:36 +0000 Subject: [PATCH] Comments and name changes from new findings out of reading MMC-5 --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 10 +++++++--- libburn/trunk/libburn/write.c | 19 ++++++++++++++++--- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 33cb93dd..ae0d926a 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.01.03.164716" +#define Cdrskin_timestamP "2007.01.05.125715" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index a0804f77..23569210 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -74,7 +74,7 @@ static unsigned char MMC_GET_ATIP[] = { 0x43, 2, 4, 0, 0, 0, 0, 16, 0, 0 }; static unsigned char MMC_GET_DISC_INFO[] = { 0x51, 0, 0, 0, 0, 0, 0, 16, 0, 0 }; static unsigned char MMC_READ_CD[] = { 0xBE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static unsigned char MMC_ERASE[] = { 0xA1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +static unsigned char MMC_BLANK[] = { 0xA1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static unsigned char MMC_SEND_OPC[] = { 0x54, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static unsigned char MMC_SET_SPEED[] = { 0xBB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -846,11 +846,11 @@ void mmc_erase(struct burn_drive *d, int fast) struct command c; mmc_function_spy("mmc_erase"); - memcpy(c.opcode, MMC_ERASE, sizeof(MMC_ERASE)); + memcpy(c.opcode, MMC_BLANK, sizeof(MMC_BLANK)); c.opcode[1] = 16; /* IMMED set to 1 */ c.opcode[1] |= !!fast; c.retry = 1; - c.oplen = sizeof(MMC_ERASE); + c.oplen = sizeof(MMC_BLANK); c.page = NULL; c.dir = NO_TRANSFER; d->issue_command(d, &c); @@ -1098,6 +1098,10 @@ void mmc_get_configuration(struct burn_drive *d) d->current_is_supported_profile = 1; #endif + /* >>> see mmc5r03c.pdf 5.2 + Interpret list of profile and feature descriptors. + */ + } void mmc_sync_cache(struct burn_drive *d) diff --git a/libburn/trunk/libburn/write.c b/libburn/trunk/libburn/write.c index 7dcf466a..b6abfbb2 100644 --- a/libburn/trunk/libburn/write.c +++ b/libburn/trunk/libburn/write.c @@ -894,8 +894,13 @@ int burn_disc_close_session_dvd_minus_rw(struct burn_write_opts *o, struct burn_drive *d = o->drive; d->busy = BURN_DRIVE_CLOSING_SESSION; - if (d->current_profile == 0x13) - d->close_track_session(d, 1, 0); /* CLOSE SESSION */ + if (d->current_profile == 0x13) { + d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */ + + /* ??? under what circumstances to use close functiom 011b + "Finalize disc" ? */ + + } d->busy = BURN_DRIVE_WRITING; return 1; } @@ -975,8 +980,16 @@ int burn_disc_setup_dvd_minus_rw(struct burn_write_opts *o, /* ??? mmc5r03c.pdf 7.5.2 : "For DVD-RW media ... If a medium is in Restricted overwrite mode, this mode page shall not be used." - But growisofs composes a page 5 and sends it. + But growisofs composes a page 5 and sends it. + mmc5r03c.pdf 5.3.16 , table 127 specifies that mode page 5 + shall be supported with feature 0026h Restricted Overwrite. + 5.3.22 describes a feature 002Ch Rigid Restrictive Overwrite + which seems to apply to DVD-RW and does not mention page 5. + + 5.4.14 finally states that profile 0013h includes feature + 002Ch rather than 0026h. + d->send_write_parameters(d, o); */