From 17ddc90046c7ec18f114022ad54d7a458445ed61 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 20 Dec 2006 17:05:33 +0000 Subject: [PATCH] Corrected DVD+RW track number and nwa with 52h READ TRACK INFORMATION --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index c695f2c9..73332256 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.20.145222" +#define Cdrskin_timestamP "2006.12.20.170502" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index de89faa1..37bde51a 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -135,9 +135,12 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa) c.oplen = sizeof(MMC_TRACK_INFO); memcpy(c.opcode, MMC_TRACK_INFO, sizeof(MMC_TRACK_INFO)); c.opcode[1] = 1; - if(trackno<=0) - c.opcode[5] = 0xFF; - else + if(trackno<=0) { + if (d->current_profile = 0x1a) /* DVD+RW */ + c.opcode[5] = 1; + else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */ + c.opcode[5] = 0xFF; + } else c.opcode[5] = trackno; c.page = &buf; c.dir = FROM_DRIVE; @@ -148,8 +151,10 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa) + (data[10] << 8) + data[11]; *nwa = (data[12] << 24) + (data[13] << 16) + (data[14] << 8) + data[15]; - /* ts A61106 : MMC-1 Table 142 : NWA_V = NWA Valid Flag */ - if (!(data[7]&1)) { + if (d->current_profile = 0x1a) { /* DVD+RW */ + *nwa = *nwa = 0; + } else if (!(data[7]&1)) { + /* ts A61106 : MMC-1 Table 142 : NWA_V = NWA Valid Flag */ libdax_msgs_submit(libdax_messenger, -1, 0x00000002, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, "mmc_get_nwa: Track Info Block: NWA_V == 0", 0, 0);