root/branches/streaming-rework/src/rme/rme_avdevice.h

Revision 415, 3.2 kB (checked in by pieterpalmers, 16 years ago)

ieee1394service:
- implemented 64bit compare-swap-lock operation (needed for DICE)
- small name change of (un)registerARMhandler to (un)registerARMHandler

iavdevice.h:
- made the stream start/stop functions return bool instead of int
- updated function documentation for consistency and to reflect changes

BeBoB avdevice:
- replaced the 2 fixed streamprocessor pointers with a 2 vectors of streamprocessors
- implemented the 'snoop mode' (cannot be activated yet)

libstreaming:
- removed unused 'type' attribute from AmdtpPortInfo? & children

mh_avdevice, motu_avdevice, rme_avdevice:
- replaced m_1394service with m_p1394service for consistence

maudio_avdevice.cpp:
- removed unused code

Line 
1 /* rme_avdevice.h
2  * Copyright (C) 2006 Jonathan Woithe
3  * Copyright (C) 2006,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,
12  * 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.
20  */
21 #ifndef RMEDEVICE_H
22 #define RMEDEVICE_H
23
24 #include "iavdevice.h"
25
26 #include "debugmodule/debugmodule.h"
27 #include "libfreebobavc/avc_definitions.h"
28 #include "libfreebob/xmlparser.h"
29
30 // #include "libstreaming/RmeStreamProcessor.h"
31
32 class ConfigRom;
33 class Ieee1394Service;
34
35 namespace Rme {
36
37 // struct to define the supported devices
38 struct VendorModelEntry {
39     unsigned int vendor_id;
40     unsigned int model_id;
41     char *vendor_name;
42     char *model_name;
43 };
44
45 class RmeDevice : public IAvDevice {
46 public:
47
48     RmeDevice( std::auto_ptr<ConfigRom>( configRom ),
49               Ieee1394Service& ieee1394Service,
50                   int nodeId,
51                   int verboseLevel );
52     virtual ~RmeDevice();
53
54     static bool probe( ConfigRom& configRom );
55     virtual bool discover();
56     virtual ConfigRom& getConfigRom() const;
57
58     // obsolete, will be removed soon, unused
59     virtual bool addXmlDescription( xmlNodePtr deviceNode ) {return true;};
60
61     virtual void showDevice() const;
62
63     virtual bool setSamplingFrequency( ESamplingFrequency samplingFrequency );
64     virtual int getSamplingFrequency( );
65
66     virtual bool setId(unsigned int id);
67
68     virtual int getStreamCount();
69     virtual FreebobStreaming::StreamProcessor *getStreamProcessorByIndex(int i);
70
71     virtual bool prepare();
72     bool lock();
73     bool unlock();
74
75     bool startStreamByIndex(int i);
76     bool stopStreamByIndex(int i);
77
78     signed int getIsoRecvChannel(void);
79     signed int getIsoSendChannel(void);
80
81     signed int getEventSize(unsigned int dir);
82  
83 protected:
84     std::auto_ptr<ConfigRom>( m_configRom );
85     Ieee1394Service* m_p1394Service;
86    
87     struct VendorModelEntry *m_model;
88    
89     int              m_nodeId;
90     int              m_verboseLevel;
91     signed int m_id;
92     signed int m_iso_recv_channel, m_iso_send_channel;
93     signed int m_bandwidth;
94    
95 //      FreebobStreaming::RmeReceiveStreamProcessor *m_receiveProcessor;
96 //      FreebobStreaming::RmeTransmitStreamProcessor *m_transmitProcessor;
97
98 private:
99 //      bool addPort(FreebobStreaming::StreamProcessor *s_processor,
100 //              char *name,
101 //              enum FreebobStreaming::Port::E_Direction direction,
102 //              int position, int size);
103 //      bool addDirPorts(
104 //              enum FreebobStreaming::Port::E_Direction direction,
105 //              unsigned int sample_rate, unsigned int optical_mode);
106        
107         unsigned int ReadRegister(unsigned int reg);
108         signed int WriteRegister(unsigned int reg, quadlet_t data);
109
110     // debug support
111     DECLARE_DEBUG_MODULE;
112 };
113
114 }
115
116 #endif
Note: See TracBrowser for help on using the browser.