Show
Ignore:
Timestamp:
04/02/07 12:35:17 (17 years ago)
Author:
pieterpalmers
Message:

* name change from FreeBoB to FFADO
* replaced tabs by 4 spaces
* got rid of end-of-line spaces
* made all license and copyrights conform

library becomes LGPL, apps become GPL
explicitly state LGPL v2.1 and GPL v2 (don't like v3 draft)

copyrights are 2005-2007 Daniel & Pieter
except for the MotU stuff (C) Jonathan, Pieter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/ARMHandler.cpp

    r414 r445  
    1 /* $Id$ */ 
    2  
    31/* 
    4  *   FreeBob Streaming API 
    5  *   FreeBob = Firewire (pro-)audio for linux 
     2 * Copyright (C) 2005-2007 by Pieter Palmers 
    63 * 
    7  *   http://freebob.sf.net 
     4 * This file is part of FFADO 
     5 * FFADO = Free Firewire (pro-)audio drivers for linux 
    86 * 
    9  *   Copyright (C) 2007 Pieter Palmers <pieterpalmers@users.sourceforge.net> 
     7 * FFADO is based upon FreeBoB 
    108 * 
    11  *   This program is free software {} you can redistribute it and/or modify 
    12  *   it under the terms of the GNU General Public License as published by 
    13  *   the Free Software Foundation {} either version 2 of the License, or 
    14  *   (at your option) any later version. 
     9 * This library is free software; you can redistribute it and/or 
     10 * modify it under the terms of the GNU Lesser General Public 
     11 * License version 2.1, as published by the Free Software Foundation; 
    1512 * 
    16  *   This program is distributed in the hope that it will be useful, 
    17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of 
    18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    19  *   GNU General Public License for more details. 
     13 * This library is distributed in the hope that it will be useful, 
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     16 * Lesser General Public License for more details. 
    2017 * 
    21  *   You should have received a copy of the GNU General Public License 
    22  *   along with this program {} if not, write to the Free Software 
    23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    24  * 
    25  *  
    26  * 
     18 * You should have received a copy of the GNU Lesser General Public 
     19 * License along with this library; if not, write to the Free Software 
     20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     21 * MA 02110-1301 USA 
    2722 */ 
    2823 
     
    3530 * @param initial_value  pointer to buffer containing (if necessary) initial value 
    3631 *                    NULL means undefined 
    37  * @param access_rights access-rights for registered addressrange handled  
    38  *                    by kernel-part. Value is one or more binary or of the  
     32 * @param access_rights access-rights for registered addressrange handled 
     33 *                    by kernel-part. Value is one or more binary or of the 
    3934 *                    following flags - ARM_READ, ARM_WRITE, ARM_LOCK 
    4035 * @param notification_options identifies for which type of request you want 
    41  *                    to be notified. Value is one or more binary or of the  
     36 *                    to be notified. Value is one or more binary or of the 
    4237 *                    following flags - ARM_READ, ARM_WRITE, ARM_LOCK 
    4338 * @param client_transactions identifies for which type of request you want 
     
    4540 *                    for those requests no response will be generated, but 
    4641 *                    has to be generated by the application. 
    47  *                    Value is one or more binary or of the  
     42 *                    Value is one or more binary or of the 
    4843 *                    following flags - ARM_READ, ARM_WRITE, ARM_LOCK 
    4944 *                    For each bit set here, notification_options and 
     
    10196//         byte_t          *buffer; 
    10297// } *raw1394_arm_request_t; 
    103 //  
     98// 
    10499// typedef struct raw1394_arm_response { 
    105100//         int             response_code; 
     
    107102//         byte_t          *buffer; 
    108103// } *raw1394_arm_response_t; 
    109 //  
     104// 
    110105// typedef struct raw1394_arm_request_response { 
    111106//         struct raw1394_arm_request  *request; 
  • trunk/libffado/src/libieee1394/ARMHandler.h

    r414 r445  
    1 /* $Id$ */ 
     1/* 
     2 * Copyright (C) 2005-2007 by Pieter Palmers 
     3 * Copyright (C) 2005-2007 by Daniel Wagner 
     4 * 
     5 * This file is part of FFADO 
     6 * FFADO = Free Firewire (pro-)audio drivers for linux 
     7 * 
     8 * FFADO is based upon FreeBoB 
     9 * 
     10 * This library is free software; you can redistribute it and/or 
     11 * modify it under the terms of the GNU Lesser General Public 
     12 * License version 2.1, as published by the Free Software Foundation; 
     13 * 
     14 * This library is distributed in the hope that it will be useful, 
     15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     17 * Lesser General Public License for more details. 
     18 * 
     19 * You should have received a copy of the GNU Lesser General Public 
     20 * License along with this library; if not, write to the Free Software 
     21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     22 * MA 02110-1301 USA 
     23 */ 
    224 
    3 /* 
    4  *   FreeBob Streaming API 
    5  *   FreeBob = Firewire (pro-)audio for linux 
    6  * 
    7  *   http://freebob.sf.net 
    8  * 
    9  *   Copyright (C) 2005,2006 Pieter Palmers <pieterpalmers@users.sourceforge.net> 
    10  * 
    11  *   This program is free software {} you can redistribute it and/or modify 
    12  *   it under the terms of the GNU General Public License as published by 
    13  *   the Free Software Foundation {} either version 2 of the License, or 
    14  *   (at your option) any later version. 
    15  * 
    16  *   This program is distributed in the hope that it will be useful, 
    17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of 
    18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    19  *   GNU General Public License for more details. 
    20  * 
    21  *   You should have received a copy of the GNU General Public License 
    22  *   along with this program {} if not, write to the Free Software 
    23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    24  * 
    25  *  
    26  * 
    27  */ 
    28 #ifndef __FREEBOB_ARMHANDLER__ 
    29 #define __FREEBOB_ARMHANDLER__ 
     25#ifndef __FFADO_ARMHANDLER__ 
     26#define __FFADO_ARMHANDLER__ 
    3027 
    3128#include "../debugmodule/debugmodule.h" 
     
    3734/** 
    3835 * @brief Class to handle AddressRangeMappings 
    39  *  
    40  * This class is intended to help with implementing  
     36 * 
     37 * This class is intended to help with implementing 
    4138 * address range mapping, i.e. implementing handlers 
    4239 * that react to reads/writes of certain addresses 
    4340 * in 1394 memory space 
    44  *  
     41 * 
    4542 * see the _arm_ functions in raw1394.h for more insight 
    46  *  
     43 * 
    4744 */ 
    48   
     45 
    4946class ARMHandler { 
    5047friend class Ieee1394Service; 
     
    5754               unsigned int client_transactions 
    5855              ); 
    59      
     56 
    6057    virtual ~ARMHandler(); 
    6158 
     
    6562 
    6663    struct raw1394_arm_response *getResponse() {return &m_response;}; 
    67      
     64 
    6865    nodeaddr_t getStart() {return m_start;}; 
    6966    nodeaddr_t getLength() {return m_length;}; 
     
    7168    unsigned int getNotificationOptions() {return m_notification_options;}; 
    7269    unsigned int getClientTransactions() {return m_client_transactions;}; 
    73      
     70 
    7471    byte_t *getBuffer() {return m_buffer;}; 
    75      
     72 
    7673private: 
    7774    nodeaddr_t m_start; 
     
    8279 
    8380    byte_t *m_buffer; 
    84      
     81 
    8582    struct raw1394_arm_response m_response; 
    86      
     83 
    8784    void printBufferBytes( unsigned int level, size_t length, byte_t* buffer ) const; 
    8885    void printRequest(struct raw1394_arm_request *arm_req); 
    89      
     86 
    9087protected: 
    9188 
    92      
     89 
    9390    DECLARE_DEBUG_MODULE; 
    9491 
    9592}; 
    9693 
    97 #endif /* __FREEBOB_ARMHANDLER__ */ 
     94#endif /* __FFADO_ARMHANDLER__ */ 
    9895 
    9996 
  • trunk/libffado/src/libieee1394/configrom.cpp

    r435 r445  
    1 /* configrom.cpp 
    2  * Copyright (C) 2005 by Daniel Wagner 
     1/* 
     2 * Copyright (C) 2005-2007 by Daniel Wagner 
     3 * Copyright (C) 2005-2007 by Jonathan Woithe 
     4 * Copyright (C) 2005-2007 by Pieter Palmers 
    35 * 
    4  * This file is part of FreeBoB. 
     6 * This file is part of FFADO 
     7 * FFADO = Free Firewire (pro-)audio drivers for linux 
    58 * 
    6  * FreeBoB is free software; you can redistribute it and/or modify 
    7  * it under the terms of the GNU General Public License as published by 
    8  * the Free Software Foundation; either version 2 of the License, or 
    9  * (at your option) any later version. 
    10  * FreeBoB is distributed in the hope that it will be useful, 
     9 * FFADO is based upon FreeBoB 
     10 * 
     11 * This library is free software; you can redistribute it and/or 
     12 * modify it under the terms of the GNU Lesser General Public 
     13 * License version 2.1, as published by the Free Software Foundation; 
     14 * 
     15 * This library is distributed in the hope that it will be useful, 
    1116 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    13  * GNU General Public License for more details. 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     18 * Lesser General Public License for more details. 
    1419 * 
    15  * You should have received a copy of the GNU General Public License 
    16  * along with FreeBoB; if not, write to the Free Software 
    17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
    18  * MA 02111-1307 USA. 
     20 * You should have received a copy of the GNU Lesser General Public 
     21 * License along with this library; if not, write to the Free Software 
     22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     23 * MA 02110-1301 USA 
    1924 */ 
    2025 
     
    159164                len ); 
    160165 
    161        while ((buf + len - 1) == '\0') { 
     166    while ((buf + len - 1) == '\0') { 
    162167            len--; 
    163168        } 
    164169        // \todo XXX seems a bit strage to do this but the nodemgr.c code does 
    165170        // it. try to figure out why this is needed (or not) 
    166        buf[len++] = ' '; 
    167        buf[len] = '\0'; 
     171    buf[len++] = ' '; 
     172    buf[len] = '\0'; 
    168173 
    169174 
     
    178183                ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ), 
    179184                len ); 
    180        while ((buf + len - 1) == '\0') { 
     185    while ((buf + len - 1) == '\0') { 
    181186            len--; 
    182187        } 
    183188        // \todo XXX for edirol fa-66 it seems somehow broken. see above 
    184189        // todo as well. 
    185        buf[len++] = ' '; 
    186        buf[len] = '\0'; 
     190    buf[len++] = ' '; 
     191    buf[len] = '\0'; 
    187192 
    188193        debugOutput( DEBUG_LEVEL_VERBOSE, "Model name: '%s'\n", buf); 
     
    217222{ 
    218223    struct config_csr_info* csr_info = (struct config_csr_info*) private_data; 
    219      
     224 
    220225    if ( !csr_info->service->read( csr_info->nodeId, 
    221226                                   addr, 
     
    249254    debugOutput( DEBUG_LEVEL_VERBOSE, "process unit directory:\n" ); 
    250255    csr1212_for_each_dir_entry(csr, kv, ud_kv, dentry) { 
    251        switch (kv->key.id) { 
    252            case CSR1212_KV_ID_VENDOR: 
    253                if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { 
     256    switch (kv->key.id) { 
     257        case CSR1212_KV_ID_VENDOR: 
     258        if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { 
    254259                    debugOutput( DEBUG_LEVEL_VERBOSE, 
    255260                                 "\tvendor_id = 0x%08x\n", 
    256261                                 kv->value.immediate); 
    257262                    m_vendorId = kv->value.immediate; 
    258                
    259                break; 
    260  
    261            case CSR1212_KV_ID_MODEL: 
     263       
     264        break; 
     265 
     266        case CSR1212_KV_ID_MODEL: 
    262267                debugOutput( DEBUG_LEVEL_VERBOSE, 
    263268                             "\tmodel_id = 0x%08x\n", 
    264269                             kv->value.immediate); 
    265270                m_modelId = kv->value.immediate; 
    266                break; 
    267  
    268            case CSR1212_KV_ID_SPECIFIER_ID: 
     271        break; 
     272 
     273        case CSR1212_KV_ID_SPECIFIER_ID: 
    269274                debugOutput( DEBUG_LEVEL_VERBOSE, 
    270275                             "\tspecifier_id = 0x%08x\n", 
    271276                             kv->value.immediate); 
    272277                m_unit_specifier_id = kv->value.immediate; 
    273                break; 
    274  
    275            case CSR1212_KV_ID_VERSION: 
     278        break; 
     279 
     280        case CSR1212_KV_ID_VERSION: 
    276281                debugOutput( DEBUG_LEVEL_VERBOSE, 
    277282                             "\tversion = 0x%08x\n", 
     
    284289                    } 
    285290                } 
    286                break; 
    287  
    288            case CSR1212_KV_ID_DESCRIPTOR: 
    289                if (kv->key.type == CSR1212_KV_TYPE_LEAF && 
    290                    CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 && 
    291                    CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 && 
    292                    CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 && 
    293                    CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 && 
    294                    CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) 
    295                
    296                    switch (last_key_id) { 
    297                        case CSR1212_KV_ID_VENDOR: 
    298                            csr1212_keep_keyval(kv); 
     291        break; 
     292 
     293        case CSR1212_KV_ID_DESCRIPTOR: 
     294        if (kv->key.type == CSR1212_KV_TYPE_LEAF && 
     295            CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 && 
     296            CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 && 
     297            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 && 
     298            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 && 
     299            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) 
     300       
     301            switch (last_key_id) { 
     302            case CSR1212_KV_ID_VENDOR: 
     303                csr1212_keep_keyval(kv); 
    299304                            m_vendorNameKv = kv; 
    300                            break; 
    301  
    302                        case CSR1212_KV_ID_MODEL: 
     305                break; 
     306 
     307            case CSR1212_KV_ID_MODEL: 
    303308                            m_modelNameKv = kv; 
    304                            csr1212_keep_keyval(kv); 
    305                            break; 
    306  
    307                    } 
    308                } /* else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) ... */ 
    309                break; 
    310  
    311            case CSR1212_KV_ID_DEPENDENT_INFO: 
    312                if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { 
    313                    /* This should really be done in SBP2 as this is 
    314                     * doing SBP2 specific parsing. */ 
    315                    processUnitDirectory(csr, kv, id); 
    316                
    317  
    318                break; 
    319  
    320            default: 
    321                break; 
    322        
    323        last_key_id = kv->key.id; 
     309                csr1212_keep_keyval(kv); 
     310                break; 
     311 
     312            } 
     313        } /* else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) ... */ 
     314        break; 
     315 
     316        case CSR1212_KV_ID_DEPENDENT_INFO: 
     317        if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { 
     318            /* This should really be done in SBP2 as this is 
     319             * doing SBP2 specific parsing. */ 
     320            processUnitDirectory(csr, kv, id); 
     321       
     322 
     323        break; 
     324 
     325        default: 
     326        break; 
     327   
     328    last_key_id = kv->key.id; 
    324329    } 
    325330} 
     
    334339 
    335340    csr1212_for_each_dir_entry(csr, kv, csr->root_kv, dentry) { 
    336        switch (kv->key.id) { 
    337            case CSR1212_KV_ID_VENDOR: 
     341    switch (kv->key.id) { 
     342        case CSR1212_KV_ID_VENDOR: 
    338343                debugOutput( DEBUG_LEVEL_VERBOSE, 
    339344                             "vendor id = 0x%08x\n", kv->value.immediate); 
    340                break; 
    341  
    342            case CSR1212_KV_ID_NODE_CAPABILITIES: 
     345        break; 
     346 
     347        case CSR1212_KV_ID_NODE_CAPABILITIES: 
    343348                debugOutput( DEBUG_LEVEL_VERBOSE, 
    344349                             "capabilities = 0x%08x\n", kv->value.immediate); 
    345                break; 
    346  
    347            case CSR1212_KV_ID_UNIT: 
    348                processUnitDirectory(csr, kv, &ud_id); 
    349                break; 
    350  
    351            case CSR1212_KV_ID_DESCRIPTOR: 
    352                if (last_key_id == CSR1212_KV_ID_VENDOR) { 
    353                    if (kv->key.type == CSR1212_KV_TYPE_LEAF && 
    354                        CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 && 
    355                        CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 && 
    356                        CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 && 
    357                        CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 && 
    358                        CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) 
     350        break; 
     351 
     352        case CSR1212_KV_ID_UNIT: 
     353        processUnitDirectory(csr, kv, &ud_id); 
     354        break; 
     355 
     356        case CSR1212_KV_ID_DESCRIPTOR: 
     357        if (last_key_id == CSR1212_KV_ID_VENDOR) { 
     358            if (kv->key.type == CSR1212_KV_TYPE_LEAF && 
     359            CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 && 
     360            CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 && 
     361            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 && 
     362            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 && 
     363            CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0) 
    359364                    { 
    360365                        m_vendorNameKv = kv; 
    361                        csr1212_keep_keyval(kv); 
    362                    } 
    363                
    364                break; 
    365        
    366        last_key_id = kv->key.id; 
     366            csr1212_keep_keyval(kv); 
     367            } 
     368       
     369        break; 
     370   
     371    last_key_id = kv->key.id; 
    367372    } 
    368373 
     
    578583ConfigRom::processOscMessage(OSC::OscMessage *m) { 
    579584    OSC::OscResponse r=OSC::OscResponse(OSC::OscResponse::eUnhandled); 
    580      
     585 
    581586    unsigned int nbArgs=m->nbArguments(); 
    582587    if (nbArgs>=1) { 
     
    584589        if(arg0.isString()) { // commands 
    585590            string cmd=arg0.getString(); 
    586              
     591 
    587592            debugOutput( DEBUG_LEVEL_VERBOSE, "(%p) CMD? %s\n", this, cmd.c_str()); 
    588593            if(cmd == "params") { 
     
    623628        } 
    624629    } 
    625      
     630 
    626631    return r; 
    627632 
  • trunk/libffado/src/libieee1394/configrom.h

    r435 r445  
    1 /* configrom.h 
    2  * Copyright (C) 2005,06 by Daniel Wagner 
     1/* 
     2 * Copyright (C) 2005-2007 by Daniel Wagner 
     3 * Copyright (C) 2005-2007 by Jonathan Woithe 
     4 * Copyright (C) 2005-2007 by Pieter Palmers 
    35 * 
    4  * This file is part of FreeBoB. 
     6 * This file is part of FFADO 
     7 * FFADO = Free Firewire (pro-)audio drivers for linux 
    58 * 
    6  * FreeBoB is free software; you can redistribute it and/or modify 
    7  * it under the terms of the GNU General Public License as published by 
    8  * the Free Software Foundation; either version 2 of the License, or 
    9  * (at your option) any later version. 
    10  * FreeBoB is distributed in the hope that it will be useful, 
     9 * FFADO is based upon FreeBoB 
     10 * 
     11 * This library is free software; you can redistribute it and/or 
     12 * modify it under the terms of the GNU Lesser General Public 
     13 * License version 2.1, as published by the Free Software Foundation; 
     14 * 
     15 * This library is distributed in the hope that it will be useful, 
    1116 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    13  * GNU General Public License for more details. 
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     18 * Lesser General Public License for more details. 
    1419 * 
    15  * You should have received a copy of the GNU General Public License 
    16  * along with FreeBoB; if not, write to the Free Software 
    17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
    18  * MA 02111-1307 USA. 
     20 * You should have received a copy of the GNU Lesser General Public 
     21 * License along with this library; if not, write to the Free Software 
     22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     23 * MA 02110-1301 USA 
    1924 */ 
    2025 
     
    5661 
    5762    bool isIsoResourseManager() const 
    58        { return m_isIsoResourceManager; } 
     63    { return m_isIsoResourceManager; } 
    5964    bool isCycleMasterCapable() const 
    6065        { return m_isCycleMasterCapable; } 
     
    7075 
    7176    fb_quadlet_t getNodeVendorId() const 
    72        { return m_nodeVendorId; } 
     77    { return m_nodeVendorId; } 
    7378 
    7479    bool updatedNodeId(); 
     
    7883 
    7984    bool serialize( Glib::ustring path, Util::IOSerialize& ser ); 
    80     static ConfigRom* deserialize( Glib::ustring path,  
    81                                   Util::IODeserialize& deser, 
    82                                   Ieee1394Service& ieee1394Service ); 
     85    static ConfigRom* deserialize( Glib::ustring path, 
     86                   Util::IODeserialize& deser, 
     87                   Ieee1394Service& ieee1394Service ); 
    8388 
    8489 protected: 
  • trunk/libffado/src/libieee1394/IEC61883.cpp

    r424 r445  
    1 /* $Id$ */ 
    2  
    31/* 
    4  *   FreeBob Streaming API 
    5  *   FreeBob = Firewire (pro-)audio for linux 
     2 * Copyright (C) 2005-2007 by Pieter Palmers 
    63 * 
    7  *   http://freebob.sf.net 
     4 * This file is part of FFADO 
     5 * FFADO = Free Firewire (pro-)audio drivers for linux 
    86 * 
    9  *   Copyright (C) 2007 Pieter Palmers <pieterpalmers@users.sourceforge.net> 
     7 * FFADO is based upon FreeBoB 
    108 * 
    11  *   This program is free software {} you can redistribute it and/or modify 
    12  *   it under the terms of the GNU General Public License as published by 
    13  *   the Free Software Foundation {} either version 2 of the License, or 
    14  *   (at your option) any later version. 
     9 * This library is free software; you can redistribute it and/or 
     10 * modify it under the terms of the GNU Lesser General Public 
     11 * License version 2.1, as published by the Free Software Foundation; 
    1512 * 
    16  *   This program is distributed in the hope that it will be useful, 
    17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of 
    18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    19  *   GNU General Public License for more details. 
     13 * This library is distributed in the hope that it will be useful, 
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     16 * Lesser General Public License for more details. 
    2017 * 
    21  *   You should have received a copy of the GNU General Public License 
    22  *   along with this program {} if not, write to the Free Software 
    23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    24  * 
    25  * 
     18 * You should have received a copy of the GNU Lesser General Public 
     19 * License along with this library; if not, write to the Free Software 
     20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     21 * MA 02110-1301 USA 
    2622 */ 
    2723 
  • trunk/libffado/src/libieee1394/IEC61883.h

    r424 r445  
    1 /* $Id$ */ 
    2  
    31/* 
    4  *   FreeBob Streaming API 
    5  *   FreeBob = Firewire (pro-)audio for linux 
    6  * 
    7  *   http://freebob.sf.net 
    8  * 
    9  *   Copyright (C) 2007 Pieter Palmers <pieterpalmers@users.sourceforge.net> 
    10  * 
    11  *   This program is free software {} you can redistribute it and/or modify 
    12  *   it under the terms of the GNU General Public License as published by 
    13  *   the Free Software Foundation {} either version 2 of the License, or 
    14  *   (at your option) any later version. 
    15  * 
    16  *   This program is distributed in the hope that it will be useful, 
    17  *   but WITHOUT ANY WARRANTY {} without even the implied warranty of 
    18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    19  *   GNU General Public License for more details. 
    20  * 
    21  *   You should have received a copy of the GNU General Public License 
    22  *   along with this program {} if not, write to the Free Software 
    23  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    24  * 
    25  *  
    26  * 
    27  */ 
    28 #ifndef __FREEBOB_IEC61883__ 
    29 #define __FREEBOB_IEC61883__ 
     2 * Copyright (C) 2005-2007 by Pieter Palmers 
     3 * 
     4 * This file is part of FFADO 
     5 * FFADO = Free Firewire (pro-)audio drivers for linux 
     6 * 
     7 * FFADO is based upon FreeBoB 
     8 * 
     9 * This library is free software; you can redistribute it and/or 
     10 * modify it under the terms of the GNU Lesser General Public 
     11 * License version 2.1, as published by the Free Software Foundation; 
     12 * 
     13 * This library is distributed in the hope that it will be useful, 
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     16 * Lesser General Public License for more details. 
     17 * 
     18 * You should have received a copy of the GNU Lesser General Public 
     19 * License along with this library; if not, write to the Free Software 
     20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     21 * MA 02110-1301 USA 
     22 */ 
     23 
     24#ifndef __FFADO_IEC61883__ 
     25#define __FFADO_IEC61883__ 
    3026 
    3127#include "../debugmodule/debugmodule.h" 
    3228 
    3329/* 
    34  * This is shamelessly stolen from iec61883-private,  
     30 * This is shamelessly stolen from iec61883-private, 
    3531 * but I need these functions! 
    3632 * FIXME: this will only work until somebody decides to change 
     
    4541 **/ 
    4642 
    47 /* maximum number of PCRs allowed within the standard  
     43/* maximum number of PCRs allowed within the standard 
    4844 * MPR/PCR addresses defined in IEC-61883. 
    4945 * This refers to the number of output or input PCRs-- 
     
    147143 * @a: The CSR offset address (relative to base) of the register to read. 
    148144 * @value: A pointer to a quadlet where the plug register's value will be stored. 
    149  *  
    150  * This function handles bus to host endian conversion. It returns 0 for  
     145 * 
     146 * This function handles bus to host endian conversion. It returns 0 for 
    151147 * suceess or -1 for error (errno available). 
    152148 **/ 
     
    155151 
    156152 
    157 /**  
     153/** 
    158154 * iec61883_plug_set - Write a node's plug register. 
    159155 * @h: A raw1394 handle. 
     
    204200}; 
    205201 
    206 #endif /* __FREEBOB_IEC61883__ */ 
    207  
    208  
     202#endif /* __FFADO_IEC61883__ */ 
     203 
     204 
  • trunk/libffado/src/libieee1394/ieee1394service.cpp

    r436 r445  
    1 /* ieee1394service.cpp 
    2  * Copyright (C) 2005,07 by Daniel Wagner 
    3  * Copyright (C) 2007 by Pieter Palmers 
    4  * 
    5  * This file is part of FreeBoB. 
    6  * 
    7  * FreeBoB is free software; you can redistribute it and/or modify 
    8  * it under the terms of the GNU General Public License as published by 
    9  * the Free Software Foundation; either version 2 of the License, or 
    10  * (at your option) any later version. 
    11  * FreeBoB is distributed in the hope that it will be useful, 
     1/* 
     2 * Copyright (C) 2005-2007 by Daniel Wagner 
     3 * Copyright (C) 2005-2007 by Pieter Palmers 
     4 * 
     5 * This file is part of FFADO 
     6 * FFADO = Free Firewire (pro-)audio drivers for linux 
     7 * 
     8 * FFADO is based upon FreeBoB 
     9 * 
     10 * This library is free software; you can redistribute it and/or 
     11 * modify it under the terms of the GNU Lesser General Public 
     12 * License version 2.1, as published by the Free Software Foundation; 
     13 * 
     14 * This library is distributed in the hope that it will be useful, 
    1215 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    14  * GNU General Public License for more details. 
    15  * 
    16  * You should have received a copy of the GNU General Public License 
    17  * along with FreeBoB; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
    19  * MA 02111-1307 USA. 
     16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     17 * Lesser General Public License for more details. 
     18 * 
     19 * You should have received a copy of the GNU Lesser General Public 
     20 * License along with this library; if not, write to the Free Software 
     21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     22 * MA 02110-1301 USA 
    2023 */ 
     24 
    2125#include "ieee1394service.h" 
    2226#include "ARMHandler.h" 
     
    4246{ 
    4347    pthread_mutex_init( &m_mutex, 0 ); 
    44      
     48 
    4549    for (unsigned int i=0; i<64; i++) { 
    4650        m_channels[i].channel=-1; 
     
    7377        raw1394_destroy_handle( m_handle ); 
    7478    } 
    75      
     79 
    7680    if ( m_resetHandle ) { 
    7781        raw1394_destroy_handle( m_resetHandle ); 
     
    117121    m_default_arm_handler = raw1394_set_arm_tag_handler( m_resetHandle, 
    118122                                   this->armHandlerLowLevel ); 
    119      
     123 
    120124    startRHThread(); 
    121125 
     
    230234} 
    231235 
    232 bool  
     236bool 
    233237Ieee1394Service::lockCompareSwap64(  fb_nodeid_t nodeId, 
    234238                        fb_nodeaddr_t addr, 
     
    244248    fb_octlet_t buffer; 
    245249    if(!read_octlet( nodeId, addr,&buffer )) { 
    246         debugOutput(DEBUG_LEVEL_VERBOSE,"Could not read owner register\n"); 
     250        debugWarning("Could not read register\n"); 
    247251    } else { 
    248         debugOutput(DEBUG_LEVEL_VERBOSE,"Owner register before = 0x%016llX\n", buffer); 
    249     } 
    250      
    251     buffer=0x123456789ABCDEF0LL; 
    252         debugOutput(DEBUG_LEVEL_VERBOSE,"before byteswap = 0x%016llX\n", buffer); 
    253     buffer=byteSwap_octlet(buffer); 
    254         debugOutput(DEBUG_LEVEL_VERBOSE,"after byteswap = 0x%016llX\n", buffer); 
    255      
    256      
     252        debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016llX\n", buffer); 
     253    } 
     254 
    257255    #endif 
    258      
     256 
    259257    // do endiannes swapping 
    260258    compare_value=byteSwap_octlet(compare_value); 
    261259    swap_value=byteSwap_octlet(swap_value); 
    262      
     260 
    263261    int retval=raw1394_lock64(m_handle, nodeId, addr, RAW1394_EXTCODE_COMPARE_SWAP, 
    264262                          swap_value, compare_value, result); 
    265      
     263 
    266264    #ifdef DEBUG 
    267265    if(!read_octlet( nodeId, addr,&buffer )) { 
    268         debugOutput(DEBUG_LEVEL_VERBOSE,"Could not read owner register\n"); 
     266        debugWarning("Could not read register\n"); 
    269267    } else { 
    270         debugOutput(DEBUG_LEVEL_VERBOSE,"Owner register after = 0x%016llX\n", buffer); 
     268        debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016llX\n", buffer); 
    271269    } 
    272270    #endif 
    273      
     271 
    274272    *result=byteSwap_octlet(*result); 
    275      
     273 
    276274    return (retval == 0); 
    277275} 
     
    286284        buf[i] = ntohl( buf[i] ); 
    287285    } 
    288  
    289     #ifdef DEBUG 
    290     debugOutputShort(DEBUG_LEVEL_VERY_VERBOSE, "  pre avc1394_transaction_block2\n" ); 
    291     printBuffer( DEBUG_LEVEL_VERY_VERBOSE, len, buf ); 
    292     #endif 
    293286 
    294287    fb_quadlet_t* result = 
     
    300293                                    10 ); 
    301294 
    302     #ifdef DEBUG 
    303     debugOutputShort(DEBUG_LEVEL_VERY_VERBOSE, "  post avc1394_transaction_block2\n" ); 
    304     printBuffer( DEBUG_LEVEL_VERY_VERBOSE, *resp_len, result ); 
    305     #endif 
    306  
    307295    for ( unsigned int i = 0; i < *resp_len; ++i ) { 
    308296        result[i] = htonl( result[i] ); 
     
    389377        h, h->getStart(), h->getLength()); 
    390378 
    391     int err=raw1394_arm_register(m_resetHandle, h->getStart(),  
     379    int err=raw1394_arm_register(m_resetHandle, h->getStart(), 
    392380                         h->getLength(), h->getBuffer(), (octlet_t)h, 
    393381                         h->getAccessRights(), 
     
    399387        return false; 
    400388    } 
    401      
     389 
    402390    m_armHandlers.push_back( h ); 
    403391 
     
    406394 
    407395bool Ieee1394Service::unregisterARMHandler( ARMHandler *h ) { 
    408     debugOutput(DEBUG_LEVEL_VERBOSE, "Unregistering ARM handler (%p) for 0x%016llX\n",  
     396    debugOutput(DEBUG_LEVEL_VERBOSE, "Unregistering ARM handler (%p) for 0x%016llX\n", 
    409397        h, h->getStart()); 
    410      
     398 
    411399    for ( arm_handler_vec_t::iterator it = m_armHandlers.begin(); 
    412400          it != m_armHandlers.end(); 
     
    439427    debugOutput(DEBUG_LEVEL_VERBOSE, "Finding free ARM block of %d bytes, from 0x%016llX in steps of %d bytes\n", 
    440428        length, start, step); 
    441          
     429 
    442430    int cnt=0; 
    443431    const int maxcnt=10; 
     
    446434        // try to register 
    447435        err=raw1394_arm_register(m_resetHandle, start, length, 0, 0, 0, 0, 0); 
    448          
     436 
    449437        if (err) { 
    450438            debugOutput(DEBUG_LEVEL_VERBOSE, " -> cannot use 0x%016llX\n", start); 
     
    466454} 
    467455 
    468 int  
    469 Ieee1394Service::armHandlerLowLevel(raw1394handle_t handle,  
     456int 
     457Ieee1394Service::armHandlerLowLevel(raw1394handle_t handle, 
    470458                     unsigned long arm_tag, 
    471459                     byte_t request_type, unsigned int requested_length, 
     
    493481            raw1394_arm_request_t arm_req=arm_req_resp->request; 
    494482            raw1394_arm_response_t arm_resp=arm_req_resp->response; 
    495              
     483 
    496484            debugOutput(DEBUG_LEVEL_VERBOSE,"ARM handler for address 0x%016llX called\n", 
    497485                (*it)->getStart()); 
    498486            debugOutput(DEBUG_LEVEL_VERBOSE," request type   : 0x%02X\n",request_type); 
    499487            debugOutput(DEBUG_LEVEL_VERBOSE," request length : %04d\n",requested_length); 
    500              
     488 
    501489            switch(request_type) { 
    502490                case RAW1394_ARM_READ: 
     
    583571{ 
    584572    debugOutput(DEBUG_LEVEL_VERBOSE, "Removing busreset handler (%p)\n", functor); 
    585      
     573 
    586574    for ( reset_handler_vec_t::iterator it = m_busResetHandlers.begin(); 
    587575          it != m_busResetHandlers.end(); 
     
    603591 * or an allocated channel number. 
    604592 * 
    605  * Does not perform anything other than registering the channel and the  
     593 * Does not perform anything other than registering the channel and the 
    606594 * bandwidth at the IRM 
    607595 * 
    608596 * Also allocates the necessary bandwidth (in ISO allocation units). 
    609  *  
     597 * 
    610598 * FIXME: As in libiec61883, channel 63 is not requested; this is either a 
    611599 * bug or it's omitted since that's the channel preferred by video devices. 
     
    616604signed int Ieee1394Service::allocateIsoChannelGeneric(unsigned int bandwidth) { 
    617605    debugOutput(DEBUG_LEVEL_VERBOSE, "Allocating ISO channel using generic method...\n" ); 
    618      
     606 
    619607    struct ChannelInfo cinfo; 
    620608 
     
    627615        if (raw1394_bandwidth_modify(m_handle, bandwidth, RAW1394_MODIFY_ALLOC) < 0) { 
    628616            debugFatal("Could not allocate bandwidth of %d\n", bandwidth); 
    629              
     617 
    630618            raw1394_channel_modify (m_handle, c, RAW1394_MODIFY_FREE); 
    631619            return -1; 
     
    634622            cinfo.bandwidth=bandwidth; 
    635623            cinfo.alloctype=AllocGeneric; 
    636              
     624 
     625            cinfo.xmit_node=-1; 
     626            cinfo.xmit_plug=-1; 
     627            cinfo.recv_node=-1; 
     628            cinfo.recv_plug=-1; 
     629 
    637630            if (registerIsoChannel(c, cinfo)) { 
    638631                return c; 
     
    667660 
    668661signed int Ieee1394Service::allocateIsoChannelCMP( 
    669     nodeid_t xmit_node, int xmit_plug,  
     662    nodeid_t xmit_node, int xmit_plug, 
    670663    nodeid_t recv_node, int recv_plug 
    671664    ) { 
    672665 
    673666    debugOutput(DEBUG_LEVEL_VERBOSE, "Allocating ISO channel using IEC61883 CMP...\n" ); 
    674      
     667 
    675668    struct ChannelInfo cinfo; 
    676      
     669 
    677670    int c = -1; 
    678671    int bandwidth=1; 
    679      
     672 
    680673    // do connection management: make connection 
    681674    c = iec61883_cmp_connect( 
     
    697690    cinfo.bandwidth=bandwidth; 
    698691    cinfo.alloctype=AllocCMP; 
    699      
     692 
    700693    cinfo.xmit_node=xmit_node; 
    701694    cinfo.xmit_plug=xmit_plug; 
    702695    cinfo.recv_node=recv_node; 
    703696    cinfo.recv_plug=recv_plug; 
    704          
     697 
    705698    if (registerIsoChannel(c, cinfo)) { 
    706699        return c; 
     
    711704 
    712705/** 
    713  * Deallocates an iso channel.  Silently ignores a request to deallocate  
     706 * Deallocates an iso channel.  Silently ignores a request to deallocate 
    714707 * a negative channel number. 
    715708 * 
     
    717710 * and uses the appropriate method to deallocate. Also frees the bandwidth 
    718711 * that was reserved along with this channel. 
    719  *  
     712 * 
    720713 * @param c channel number 
    721714 * @return true if successful 
     
    723716bool Ieee1394Service::freeIsoChannel(signed int c) { 
    724717    debugOutput(DEBUG_LEVEL_VERBOSE, "Freeing ISO channel %d...\n", c ); 
    725      
     718 
    726719    if (c < 0 || c > 63) { 
    727720        debugWarning("Invalid channel number: %d\n", c); 
    728721        return false; 
    729722    } 
    730      
     723 
    731724    switch (m_channels[c].alloctype) { 
    732725        default: 
    733726            debugError(" BUG: invalid allocation type!\n"); 
    734727            return false; 
    735              
    736         case AllocFree:  
     728 
     729        case AllocFree: 
    737730            debugWarning(" Channel %d not registered\n", c); 
    738731            return false; 
    739              
     732 
    740733        case AllocGeneric: 
    741734            debugOutput(DEBUG_LEVEL_VERBOSE, " allocated using generic routine...\n" ); 
     
    751744                return false; 
    752745            return true; 
    753              
     746 
    754747        case AllocCMP: 
    755748            debugOutput(DEBUG_LEVEL_VERBOSE, " allocated using IEC61883 CMP...\n" ); 
    756749            debugOutput(DEBUG_LEVEL_VERBOSE, " performing IEC61883 CMP disconnect...\n" ); 
    757750            if(iec61883_cmp_disconnect( 
    758                     m_handle,  
     751                    m_handle, 
    759752                    m_channels[c].xmit_node | 0xffc0, 
    760753                    m_channels[c].xmit_plug, 
     
    769762            return true; 
    770763    } 
    771      
     764 
    772765    // unreachable 
    773766    debugError("BUG: unreachable code reached!\n"); 
    774      
     767 
    775768    return false; 
    776769} 
     
    788781                m_channels[c].channel, m_channels[c].bandwidth); 
    789782        } 
    790          
     783 
    791784        memcpy(&m_channels[c], &cinfo, sizeof(struct ChannelInfo)); 
    792          
     785 
    793786    } else return false; 
    794787    return true; 
     
    806799            return false; 
    807800        } 
    808          
     801 
    809802        m_channels[c].channel=-1; 
    810803        m_channels[c].bandwidth=-1; 
     
    814807        m_channels[c].recv_node=0xFFFF; 
    815808        m_channels[c].recv_plug=-1; 
    816          
     809 
    817810    } else return false; 
    818811    return true; 
     
    822815 * Returns the current value of the `bandwidth available' register on 
    823816 * the IRM, or -1 on error. 
    824  * @return  
     817 * @return 
    825818 */ 
    826819signed int Ieee1394Service::getAvailableBandwidth() { 
     
    836829 
    837830void 
    838 Ieee1394Service::setVerboseLevel(int l)  
     831Ieee1394Service::setVerboseLevel(int l) 
    839832{ 
    840833    setDebugLevel(l); 
  • trunk/libffado/src/libieee1394/ieee1394service.h

    r436 r445  
    1 /* Ieee1394Service.cpp 
    2  * Copyright (C) 2005,06 by Daniel Wagner 
    3  * Copyright (C) 2007 by Pieter Palmers 
    4  * 
    5  * This file is part of FreeBoB. 
    6  * 
    7  * FreeBoB is free software; you can redistribute it and/or modify 
    8  * it under the terms of the GNU General Public License as published by 
    9  * the Free Software Foundation; either version 2 of the License, or 
    10  * (at your option) any later version. 
    11  * FreeBoB is distributed in the hope that it will be useful, 
     1/* 
     2 * Copyright (C) 2005-2007 by Daniel Wagner 
     3 * Copyright (C) 2005-2007 by Pieter Palmers 
     4 * 
     5 * This file is part of FFADO 
     6 * FFADO = Free Firewire (pro-)audio drivers for linux 
     7 * 
     8 * FFADO is based upon FreeBoB 
     9 * 
     10 * This library is free software; you can redistribute it and/or 
     11 * modify it under the terms of the GNU Lesser General Public 
     12 * License version 2.1, as published by the Free Software Foundation; 
     13 * 
     14 * This library is distributed in the hope that it will be useful, 
    1215 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    14  * GNU General Public License for more details. 
    15  * 
    16  * You should have received a copy of the GNU General Public License 
    17  * along with FreeBoB; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
    19  * MA 02111-1307 USA. 
     16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     17 * Lesser General Public License for more details. 
     18 * 
     19 * You should have received a copy of the GNU Lesser General Public 
     20 * License along with this library; if not, write to the Free Software 
     21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
     22 * MA 02110-1301 USA 
    2023 */ 
    2124 
    22 #ifndef FREEBOBIEEE1394SERVICE_H 
    23 #define FREEBOBIEEE1394SERVICE_H 
     25#ifndef FFADO_IEEE1394SERVICE_H 
     26#define FFADO_IEEE1394SERVICE_H 
    2427 
    2528#include "fbtypes.h" 
     
    4548 
    4649    int getPort() 
    47        { return m_port; } 
     50    { return m_port; } 
    4851   /** 
    4952    * @brief get number of nodes on the bus 
     
    5760    */ 
    5861    int getNodeCount(); 
    59      
     62 
    6063   /** 
    6164    * @brief get the node id of the local node 
     
    6770    */ 
    6871    nodeid_t getLocalNodeId(); 
    69      
     72 
    7073   /** 
    7174    * @brief send async read request to a node and wait for response. 
     
    7780    * @param length amount of data to read in quadlets 
    7881    * @param buffer pointer to buffer where data will be saved 
    79      
     82 
    8083    * @return true on success or false on failure (sets errno) 
    8184    */ 
    8285    bool read( fb_nodeid_t nodeId, 
    83               fb_nodeaddr_t addr, 
    84               size_t length, 
    85               fb_quadlet_t* buffer ); 
     86           fb_nodeaddr_t addr, 
     87           size_t length, 
     88           fb_quadlet_t* buffer ); 
    8689 
    8790    bool read_quadlet( fb_nodeid_t nodeId, 
     
    106109    */ 
    107110    bool write( fb_nodeid_t nodeId, 
    108                fb_nodeaddr_t addr, 
    109                size_t length, 
    110                fb_quadlet_t* data ); 
     111        fb_nodeaddr_t addr, 
     112        size_t length, 
     113        fb_quadlet_t* data ); 
    111114 
    112115    bool write_quadlet( fb_nodeid_t nodeId, 
     
    143146                                    fb_quadlet_t* buf, 
    144147                                    int len, 
    145                                    unsigned int* resp_len ); 
     148                    unsigned int* resp_len ); 
    146149 
    147150    bool transactionBlockClose(); 
     
    153156    bool addBusResetHandler( Functor* functor ); 
    154157    bool remBusResetHandler( Functor* functor ); 
    155      
     158 
    156159    /** 
    157160     * @brief register an AddressRangeMapping Handler 
     
    169172     */ 
    170173    bool unregisterARMHandler( ARMHandler *h ); 
    171      
     174 
    172175    nodeaddr_t findFreeARMBlock( nodeaddr_t start, size_t length, size_t step ); 
    173176 
     
    176179    signed int getAvailableBandwidth(); 
    177180    signed int allocateIsoChannelGeneric(unsigned int bandwidth); 
    178     signed int allocateIsoChannelCMP(nodeid_t xmit_node, int xmit_plug,  
     181    signed int allocateIsoChannelCMP(nodeid_t xmit_node, int xmit_plug, 
    179182                                     nodeid_t recv_node, int recv_plug); 
    180183    bool freeIsoChannel(signed int channel); 
    181      
     184 
    182185private: 
    183186    enum EAllocType { 
     
    196199        int recv_plug; 
    197200    }; 
    198      
     201 
    199202    // the info for the channels we manage 
    200203    struct ChannelInfo m_channels[64]; 
    201      
     204 
    202205    bool unregisterIsoChannel(unsigned int c); 
    203206    bool registerIsoChannel(unsigned int c, struct ChannelInfo cinfo); 
     
    211214    void printBuffer( unsigned int level, size_t length, fb_quadlet_t* buffer ) const; 
    212215    void printBufferBytes( unsigned int level, size_t length, byte_t* buffer ) const; 
    213      
     216 
    214217    static int resetHandlerLowLevel( raw1394handle_t handle, 
    215218                    unsigned int generation ); 
    216219    bool resetHandler( unsigned int generation ); 
    217      
     220 
    218221    static int armHandlerLowLevel(raw1394handle_t handle, unsigned long arm_tag, 
    219222                     byte_t request_type, unsigned int requested_length, 
    220                      void *data);  
     223                     void *data); 
    221224    bool armHandler(  unsigned long arm_tag, 
    222225                     byte_t request_type, unsigned int requested_length, 
     
    234237    typedef std::vector< Functor* > reset_handler_vec_t; 
    235238    reset_handler_vec_t m_busResetHandlers; 
    236      
     239 
    237240    // ARM stuff 
    238241    arm_tag_handler_t m_default_arm_handler; 
    239      
     242 
    240243    typedef std::vector< ARMHandler * > arm_handler_vec_t; 
    241244    arm_handler_vec_t m_armHandlers; 
    242      
     245 
    243246    fb_octlet_t byteSwap_octlet(fb_octlet_t value); 
    244      
     247 
    245248public: 
    246249    void setVerboseLevel(int l); 
     
    249252}; 
    250253 
    251 #endif 
     254#endif // FFADO_IEEE1394SERVICE_H