root/branches/libffado-2.0/src/libavc/ccm/avc_signal_source.h

Revision 1371, 2.9 kB (checked in by ppalmers, 15 years ago)

* implement our own code to do FCP transactions. the code from libavc had too much side-effects.
* remove libavc1394 as a dependency
* set the SPLIT_TIMEOUT value for the host controller such that late responses by the DM1x00 based devices are not discarded. Should fix the issues with FA-101 discovery. (re:
#155, #162)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2008 by Daniel Wagner
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 program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
13  *
14  * This program 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
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef AVCSIGNALSOURCE_H
25 #define AVCSIGNALSOURCE_H
26
27 #include "../general/avc_generic.h"
28 #include "../avc_definitions.h"
29
30 namespace AVC {
31
32
33 class SignalAddress: public IBusData
34 {
35 public:
36     enum EPlugId {
37         ePI_AnyAvailableSerialBusPlug = 0x7e,
38         ePI_Invalid                   = 0xfe,
39         ePI_AnyAvailableExternalPlug  = 0xff,
40     };
41 };
42
43 class SignalUnitAddress: public SignalAddress
44 {
45 public:
46     SignalUnitAddress();
47
48     virtual bool serialize( Util::Cmd::IOSSerialize& se );
49     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
50     virtual SignalUnitAddress* clone() const;
51
52     byte_t m_plugId;
53 };
54
55 class SignalSubunitAddress: public SignalAddress
56 {
57 public:
58     SignalSubunitAddress();
59
60     virtual bool serialize( Util::Cmd::IOSSerialize& se );
61     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
62     virtual SignalSubunitAddress* clone() const;
63
64     byte_t m_subunitType;
65     byte_t m_subunitId;
66     byte_t m_plugId;
67 };
68
69 class SignalSourceCmd: public AVCCommand
70 {
71 public:
72     enum eOutputStatus {
73         eOS_Effective = 0,
74         eOS_NotEffective = 1,
75         eOS_InsufficientResource = 2,
76         eOS_Ready = 3,
77         eOS_Output = 4,
78     };
79 public:
80     SignalSourceCmd( Ieee1394Service& ieee1394service );
81     virtual ~SignalSourceCmd();
82
83     virtual bool serialize( Util::Cmd::IOSSerialize& se );
84     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
85
86     virtual const char* getCmdName() const
87     { return "SignalSourceCmd"; }
88
89     bool setSignalSource( SignalUnitAddress& signalAddress );
90     bool setSignalSource( SignalSubunitAddress& signalAddress );
91     bool setSignalDestination( SignalUnitAddress& signalAddress );
92     bool setSignalDestination( SignalSubunitAddress& signalAddress );
93
94     SignalAddress* getSignalSource();
95     SignalAddress* getSignalDestination();
96
97     // Control response
98     byte_t m_resultStatus;
99
100     // Status response
101     byte_t m_outputStatus;
102     byte_t m_conv;
103     byte_t m_signalStatus;
104
105     SignalAddress* m_signalSource;
106     SignalAddress* m_signalDestination;
107 };
108
109 }
110
111 #endif // AVCSIGNALSOURCE_H
Note: See TracBrowser for help on using the browser.