Disabled obsolete drive-media-state workaround. (Spinoff of ticket 93 :))

This commit is contained in:
Thomas Schmitt 2006-12-27 13:01:39 +00:00
parent cafad767a9
commit 6277678a8e
2 changed files with 14 additions and 15 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.26.184321"
#define Cdrskin_timestamP "2006.12.27.125948"

View File

@ -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)