From bbdc3fe84069f107ae01170aa37d3556e15a09d1 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 --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 325401f8..5276f4ff 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.09.18.090839" +#define Cdrskin_timestamP "2007.09.18.130344" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index 47c062c9..8b440649 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/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)