From 129db7ee4969d7f27678b8bd55fba08e8920ad4c Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 18 Sep 2007 13:03:24 +0000 Subject: [PATCH] Made use of Immed bit with 5Bh CLOSE TRACK/SESSION --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/mmc.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 325401f..5276f4f 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.09.18.090839" +#define Cdrskin_timestamP "2007.09.18.130344" diff --git a/libburn/mmc.c b/libburn/mmc.c index 47c062c..8b44064 100644 --- a/libburn/mmc.c +++ b/libburn/mmc.c @@ -433,6 +433,8 @@ void mmc_close(struct burn_drive *d, int session, int track) */ c.retry = 1; + c.opcode[1] |= 1; /* ts A70918 : Immed */ + /* (ts A61030 : shifted !!session rather than or-ing plain session ) */ c.opcode[2] = ((session & 3) << 1) | !!track; c.opcode[4] = track >> 8; @@ -440,6 +442,11 @@ void mmc_close(struct burn_drive *d, int session, int track) c.page = NULL; c.dir = NO_TRANSFER; d->issue_command(d, &c); + + /* ts A70918 : Immed : wait for drive to complete command */ + usleep(1000000); /* (in format() there was a race condition) */ + while (!d->test_unit_ready(d)) + usleep(100000); } void mmc_get_event(struct burn_drive *d)