Changeset 2598

Show
Ignore:
Timestamp:
11/22/15 14:20:49 (8 years ago)
Author:
jwoithe
Message:

From Stefan Richter.

If the saffire_pro24/26 discover() methods detect an unsupported firmware
version, they fail, and thus jackd startup fails. The reason of failure
should be shown to users without them having to learn how to increase log
verbosity.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/focusrite/saffire_pro24.cpp

    r2501 r2598  
    2727 
    2828#include "libutil/ByteSwap.h" 
     29#include <cstdio> 
    2930 
    3031namespace Dice { 
     
    434435        // is the pro24dsp. 
    435436        if (version[0] != 0x00010004 && version[0] != 0x00010008 && version[0] != 0x00020000) { 
    436             debugError("This is a Focusrite Saffire Pro24 but not the right firmware. Better stop here before something goes wrong.\n"); 
    437             debugError("This device has firmware 0x%x while we only know about versions 0x%x, 0x%x and 0x%x.\n", version[0], 0x10004, 0x10008, 0x00020000); 
     437            fprintf(stderr, "This is a Focusrite Saffire Pro24 but not the right firmware. Better stop here before something goes wrong.\n"); 
     438            fprintf(stderr, "This device has firmware 0x%x while we only know about versions 0x%x, 0x%x and 0x%x.\n", version[0], 0x10004, 0x10008, 0x00020000); 
    438439            return false; 
    439440        } 
  • trunk/libffado/src/dice/focusrite/saffire_pro26.cpp

    r2590 r2598  
    2828 
    2929#include "libutil/ByteSwap.h" 
     30#include <cstdio> 
    3031 
    3132namespace Dice { 
     
    379380        // Only known firmware for Saffire Pro 26 devices so far is 0x10000. 
    380381        if (version[0] != 0x10000) { 
    381             debugError("This is a Focusrite Saffire Pro26 but not the right firmware. Better stop here before something goes wrong.\n"); 
    382             debugError("This device has firmware 0x%x while we only know about version 0x%x.\n", version[0], 0x10000); 
     382            fprintf(stderr, "This is a Focusrite Saffire Pro26 but not the right firmware. Better stop here before something goes wrong.\n"); 
     383            fprintf(stderr, "This device has firmware 0x%x while we only know about version 0x%x.\n", version[0], 0x10000); 
    383384            return false; 
    384385        }