root/trunk/libffado/src/libavc/ccm/avc_signal_source.h

Revision 824, 2.7 kB (checked in by wagi, 15 years ago)

- moved cmd_serialize.h Util:: namespace to Util::Cmd:: in order to avoid ambiguities with serialize.h
- bebob: enhanced mixer stuff added (not finished)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2007 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 3 of the License, or
12  * (at your option) any later version.
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 #include <libavc1394/avc1394.h>
31
32 namespace AVC {
33
34
35 class SignalAddress: public IBusData
36 {
37 public:
38     enum EPlugId {
39         ePI_AnyAvailableSerialBusPlug = 0x7e,
40         ePI_Invalid                   = 0xfe,
41         ePI_AnyAvailableExternalPlug  = 0xff,
42     };
43 };
44
45 class SignalUnitAddress: public SignalAddress
46 {
47 public:
48     SignalUnitAddress();
49
50     virtual bool serialize( Util::Cmd::IOSSerialize& se );
51     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
52     virtual SignalUnitAddress* clone() const;
53
54     byte_t m_plugId;
55 };
56
57 class SignalSubunitAddress: public SignalAddress
58 {
59 public:
60     SignalSubunitAddress();
61
62     virtual bool serialize( Util::Cmd::IOSSerialize& se );
63     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
64     virtual SignalSubunitAddress* clone() const;
65
66     byte_t m_subunitType;
67     byte_t m_subunitId;
68     byte_t m_plugId;
69 };
70
71 class SignalSourceCmd: public AVCCommand
72 {
73 public:
74     SignalSourceCmd( Ieee1394Service& ieee1394service );
75     virtual ~SignalSourceCmd();
76
77     virtual bool serialize( Util::Cmd::IOSSerialize& se );
78     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
79
80     virtual const char* getCmdName() const
81     { return "SignalSourceCmd"; }
82
83     bool setSignalSource( SignalUnitAddress& signalAddress );
84     bool setSignalSource( SignalSubunitAddress& signalAddress );
85     bool setSignalDestination( SignalUnitAddress& signalAddress );
86     bool setSignalDestination( SignalSubunitAddress& signalAddress );
87
88     SignalAddress* getSignalSource();
89     SignalAddress* getSignalDestination();
90
91     // Control response
92     byte_t m_resultStatus;
93
94     // Status response
95     byte_t m_outputStatus;
96     byte_t m_conv;
97     byte_t m_signalStatus;
98
99     SignalAddress* m_signalSource;
100     SignalAddress* m_signalDestination;
101 };
102
103 }
104
105 #endif // AVCSIGNALSOURCE_H
Note: See TracBrowser for help on using the browser.