From 1b114e4be22aacc21a88223d43ca035dae792185 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 9 Oct 2013 09:24:09 +0000 Subject: [PATCH] Separately determining the maximum speeds for writing and reading --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index de70cc80..993fb0d4 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.10.03.100011" +#define Cdrskin_timestamP "2013.10.09.092306" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index c893fccd..9e43b598 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -2797,15 +2797,21 @@ void mmc_set_speed(struct burn_drive *d, int r, int w) if (r <= 0 || w <= 0) { /* ts A70712 : now searching for best speed descriptor */ - if (w > 0 && r <= 0) + if (r <= 0) { burn_drive_get_best_speed(d, r, &best_sd, 1 | 2); - else + if (best_sd != NULL) { + r = best_sd->read_speed; + end_lba = best_sd->end_lba; + } + } + if (w <= 0) { burn_drive_get_best_speed(d, w, &best_sd, 2); - if (best_sd != NULL) { - w = best_sd->write_speed; - d->nominal_write_speed = w; - r = best_sd->read_speed; - end_lba = best_sd->end_lba; + if (best_sd != NULL) { + w = best_sd->write_speed; + d->nominal_write_speed = w; + if (end_lba < best_sd->end_lba) + end_lba = best_sd->end_lba; + } } } @@ -4150,7 +4156,7 @@ static int mmc_get_write_performance_al(struct burn_drive *d, struct burn_speed_descriptor *sd; /* A61225 : 1 = report about speed descriptors */ - static int speed_debug = 0; + static int speed_debug = 1; BURN_ALLOC_MEM(buf, struct buffer, 1); BURN_ALLOC_MEM(c, struct command, 1);