The new duration (remaining duration after the current
ROC ends) was calculated but not used, making the
optimization worthless.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (new_dur > 0) {
/* add right after tmp */
+ roc->duration = new_dur;
list_add(&roc->list, &tmp->list);
} else {
list_add_tail(&roc->list,