root/trunk/libffado/src/fireworks/efc/efc_cmds_monitor.h

Revision 663, 3.8 kB (checked in by ppalmers, 13 years ago)

- Implement backend for ECHO FireWorks? mixer support

Line 
1 /*
2  * Copyright (C) 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 FIREWORKS_EFC_CMD_MONITOR_H
25 #define FIREWORKS_EFC_CMD_MONITOR_H
26
27 #include "efc_cmd.h"
28
29 namespace FireWorks {
30
31 enum eMonitorCommand {
32     eMoC_Gain,
33     eMoC_Solo,
34     eMoC_Mute,
35     eMoC_Pan,
36 };
37
38 class EfcGenericMonitorCmd : public EfcCmd
39 {
40 public:
41     enum eCmdType {
42         eCT_Get,
43         eCT_Set,
44     };
45 public:
46     EfcGenericMonitorCmd(enum eCmdType, enum eMonitorCommand);
47     virtual ~EfcGenericMonitorCmd() {};
48
49     virtual bool serialize( Util::IOSSerialize& se );
50     virtual bool deserialize( Util::IISDeserialize& de );
51
52     virtual void showEfcCmd();
53
54     int32_t     m_input;
55     int32_t     m_output;
56     uint32_t    m_value;
57
58 private:
59     enum eCmdType         m_type;
60     enum eMonitorCommand  m_command;
61 };
62
63 // --- Specific implementations
64 class EfcGetMonitorGainCmd : public EfcGenericMonitorCmd
65 {
66 public:
67     EfcGetMonitorGainCmd()
68     : EfcGenericMonitorCmd(eCT_Get, eMoC_Gain) {};
69     virtual ~EfcGetMonitorGainCmd() {};
70
71     virtual const char* getCmdName() const
72     { return "EfcGetMonitorGainCmd"; }
73 };
74 class EfcSetMonitorGainCmd : public EfcGenericMonitorCmd
75 {
76 public:
77     EfcSetMonitorGainCmd()
78     : EfcGenericMonitorCmd(eCT_Set, eMoC_Gain) {};
79     virtual ~EfcSetMonitorGainCmd() {};
80
81     virtual const char* getCmdName() const
82     { return "EfcSetMonitorGainCmd"; }
83 };
84
85 class EfcGetMonitorSoloCmd : public EfcGenericMonitorCmd
86 {
87 public:
88     EfcGetMonitorSoloCmd()
89     : EfcGenericMonitorCmd(eCT_Get, eMoC_Solo) {};
90     virtual ~EfcGetMonitorSoloCmd() {};
91
92     virtual const char* getCmdName() const
93     { return "EfcGetMonitorSoloCmd"; }
94 };
95 class EfcSetMonitorSoloCmd : public EfcGenericMonitorCmd
96 {
97 public:
98     EfcSetMonitorSoloCmd()
99     : EfcGenericMonitorCmd(eCT_Set, eMoC_Solo) {};
100     virtual ~EfcSetMonitorSoloCmd() {};
101
102     virtual const char* getCmdName() const
103     { return "EfcSetMonitorSoloCmd"; }
104 };
105
106 class EfcGetMonitorMuteCmd : public EfcGenericMonitorCmd
107 {
108 public:
109     EfcGetMonitorMuteCmd()
110     : EfcGenericMonitorCmd(eCT_Get, eMoC_Mute) {};
111     virtual ~EfcGetMonitorMuteCmd() {};
112
113     virtual const char* getCmdName() const
114     { return "EfcGetMonitorMuteCmd"; }
115 };
116 class EfcSetMonitorMuteCmd : public EfcGenericMonitorCmd
117 {
118 public:
119     EfcSetMonitorMuteCmd()
120     : EfcGenericMonitorCmd(eCT_Set, eMoC_Mute) {};
121     virtual ~EfcSetMonitorMuteCmd() {};
122
123     virtual const char* getCmdName() const
124     { return "EfcSetMonitorMuteCmd"; }
125 };
126
127 class EfcGetMonitorPanCmd : public EfcGenericMonitorCmd
128 {
129 public:
130     EfcGetMonitorPanCmd()
131     : EfcGenericMonitorCmd(eCT_Get, eMoC_Pan) {};
132     virtual ~EfcGetMonitorPanCmd() {};
133
134     virtual const char* getCmdName() const
135     { return "EfcGetMonitorPanCmd"; }
136 };
137 class EfcSetMonitorPanCmd : public EfcGenericMonitorCmd
138 {
139 public:
140     EfcSetMonitorPanCmd()
141     : EfcGenericMonitorCmd(eCT_Set, eMoC_Pan) {};
142     virtual ~EfcSetMonitorPanCmd() {};
143
144     virtual const char* getCmdName() const
145     { return "EfcSetMonitorPanCmd"; }
146 };
147
148
149 } // namespace FireWorks
150
151 #endif // FIREWORKS_EFC_CMD_MONITOR_H
Note: See TracBrowser for help on using the browser.