root/trunk/libffado/src/rme/fireface_settings_ctrls.cpp

Revision 1598, 2.4 kB (checked in by jwoithe, 14 years ago)

RME: minor boilerplate additions to the settings control object.

Line 
1 /*
2  * Copyright (C) 2005-2008 by Pieter Palmers
3  * Copyright (C) 2008-2009 by Jonathan Woithe
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 program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 2 of the License, or
13  * (at your option) version 3 of the License.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 #include "rme/rme_avdevice.h"
25 #include "rme/fireface_settings_ctrls.h"
26
27 namespace Rme {
28
29 #define RME_CTRL_PHANTOM_SW            0x00
30 #define RME_CTRL_SPDIF_INPUT_MODE      0x01
31 #define RME_CTRL_SPDIF_OUTPUT_OPTIONS  0x02
32 #define RME_CTRL_CLOCK_MODE            0x03
33 #define RME_CTRL_SYNC_REF              0x04
34 #define RME_CTRL_DEV_OPTIONS           0x05
35 #define RME_CTRL_LIMIT_BANDWIDTH       0x06
36 #define RME_CTRL_INPUT_LEVEL           0x07
37 #define RME_CTRL_OUTPUT_LEVEL          0x08
38 #define RME_CTRL_INSTRUMENT_OPTIONS    0x09
39 #define RME_CTRL_WCLK_SINGLE_SPEED     0x0a
40 #define RME_CTRL_PHONES_LEVEL          0x0b
41 #define RME_CTRL_INPUT0_OPTIONS        0x0c
42 #define RME_CTRL_INPUT1_OPTIONS        0x0d
43 #define RME_CTRL_INPUT2_OPTIONS        0x0e
44
45 RmeSettingsCtrl::RmeSettingsCtrl(Device &parent, unsigned int type,
46     unsigned int info)
47 : Control::Discrete(&parent)
48 , m_parent(parent)
49 , m_type(type)
50 , m_value(0)
51 , m_info(info)
52 {
53 }
54
55 RmeSettingsCtrl::RmeSettingsCtrl(Device &parent, unsigned int type,
56     unsigned int info,
57     std::string name, std::string label, std::string descr)
58 : Control::Discrete(&parent)
59 , m_parent(parent)
60 , m_type(type)
61 , m_value(0)
62 , m_info(info)
63 {
64     setName(name);
65     setLabel(label);
66     setDescription(descr);
67 }
68
69 bool
70 RmeSettingsCtrl::setValue(int v) {
71
72     switch (m_type) {
73         case RME_CTRL_PHANTOM_SW:
74             break;
75     }
76     return true;
77 }
78
79 int
80 RmeSettingsCtrl::getValue() {
81
82     switch (m_type) {
83         case RME_CTRL_PHANTOM_SW:
84             break;
85     }
86     return 0;
87 }
88
89 }
Note: See TracBrowser for help on using the browser.