From 6277678a8eacca9e4ebc03cd831616abe0b14d5e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 27 Dec 2006 13:01:39 +0000 Subject: [PATCH] Disabled obsolete drive-media-state workaround. (Spinoff of ticket 93 :)) --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.c | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 42b86a8..457c1b6 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.26.184321" +#define Cdrskin_timestamP "2006.12.27.125948" diff --git a/libburn/drive.c b/libburn/drive.c index 666703d..847ef15 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -140,10 +140,6 @@ unsigned int burn_drive_count(void) /* ts A61125 : media status aspects of burn_drive_grab() */ int burn_drive_inquire_media(struct burn_drive *d) { - /* ts A60907 */ - int was_equal = 0, must_equal = 3, max_loop = 20; - int loop_count, old_speed = -1234567890, new_speed = -987654321; - int old_erasable = -1234567890, new_erasable = -987654321; /* ts A61225 : after loading the tray, mode page 2Ah can change */ d->getcaps(d); @@ -153,23 +149,26 @@ int burn_drive_inquire_media(struct burn_drive *d) if (d->mdata->cdr_write || d->mdata->cdrw_write || d->mdata->dvdr_write || d->mdata->dvdram_write) { -#ifdef Libburn_grab_release_and_grab_agaiN - /* This code demanded the app to release and re-grab. */ - - /* ??? ts A61225 : is this safe now (after d->getcaps()) ? */ +#define Libburn_knows_correct_state_after_loaD 1 +#ifdef Libburn_knows_correct_state_after_loaD d->read_disc_info(d); #else + /* ts A61227 : This repeated read_disc_info seems + to be obsoleted by above d->getcaps(d). + */ /* ts A60908 */ /* Trying to stabilize the disc status after eventual load without closing and re-opening the drive */ /* This seems to work for burn_disc_erasable() . Speed values on RIP-14 and LITE-ON 48125S are stable and false, nevertheless. */ - /* - fprintf(stderr,"libburn: experimental: read_disc_info()\n"); - */ + int was_equal = 0, must_equal = 3, max_loop = 20; + int loop_count, old_speed = -1234567890, new_speed= -987654321; + int old_erasable = -1234567890, new_erasable = -987654321; + + fprintf(stderr,"LIBBURN_DEBUG: read_disc_info()\n"); for (loop_count = 0; loop_count < max_loop; loop_count++){ old_speed = new_speed; old_erasable = new_erasable; @@ -189,12 +188,12 @@ int burn_drive_inquire_media(struct burn_drive *d) was_equal = 0; /* if (loop_count >= 1 && was_equal == 0) - fprintf(stderr,"libburn: experimental: %d : speed %d:%d erasable %d:%d\n", - loop_count,old_speed,new_speed,old_erasable,new_erasable); */ + fprintf(stderr,"LIBBURN_DEBUG: %d : speed %d:%d erasable %d:%d\n", + loop_count,old_speed,new_speed,old_erasable,new_erasable); usleep(100000); } -#endif /* ! Libburn_grab_release_and_grab_agaiN */ +#endif /* ! Libburn_knows_correct_state_after_loaD */ } else { if (d->current_profile == -1 || d->current_is_cd_profile)