Changeset 2245

Show
Ignore:
Timestamp:
10/17/12 15:46:56 (11 years ago)
Author:
jwoithe
Message:

rme: gracefully handle the case where the device does not appear to come out of the busy state during initialisation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2169 r2245  
    661661            // Device not ready; wait 5 ms and try again 
    662662            usleep(5000); 
     663            i++; 
    663664        } else { 
    664665            iso_rx = stat[2] & 63; 
     
    677678        } 
    678679    } 
    679     if (i==100 || err) 
    680         return false; 
     680    if (i==100 || err) { 
     681        if (i == 100) 
     682            debugFatal("timeout waiting for device not busy\n"); 
     683        return false; 
     684    } 
    681685 
    682686    return FFADODevice::resetForStreaming(); 
     
    754758    // functionality in resetForStreaming() means it's effectively done 
    755759    // twice when FFADO is first started, but this does no harm. 
    756     resetForStreaming(); 
     760    if (resetForStreaming() == false) 
     761        return false; 
    757762   
    758763    if (err) {