Changeset 2059

Show
Ignore:
Timestamp:
03/03/12 08:15:04 (12 years ago)
Author:
adi
Message:

DICE: Use nicknames instead of GUID

Change all channel names to use a device's nickname. Historically, we've
used the GUID to distinguish different devices on the bus.

In case of colliding nicknames, we'd fail to register the jack port, so
owners of multiple devices have to make sure to use different nicknames.

Patch by Philippe Carriere

Files:

Legend:

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

    r2057 r2059  
    993993    Streaming::StreamProcessor *processor, 
    994994    Streaming::Port::E_Direction direction) { 
     995    std::string dev_name; 
    995996 
    996997    std::string id=std::string("dev?"); 
    997     if(!getOption("id", id)) { 
     998    dev_name = getNickname(); 
     999    if(!getOption("id", id) && dev_name.size() == 0) { 
    9981000        debugWarning("Could not retrieve id parameter, defauling to 'dev?'\n"); 
    9991001    } 
    10001002 
     1003    if (dev_name.size() == 0) dev_name = id;  
    10011004    std::ostringstream portname; 
    1002     portname << id << "_" << channelInfo->name; 
     1005    portname << dev_name << "/" << channelInfo->name; 
    10031006 
    10041007    Streaming::Port *p=NULL;