root/trunk/libffado/src/dice/maudio/profire_2626.h

Revision 2803, 3.6 kB (checked in by jwoithe, 3 years ago)

Cosmetic: capitalise "L" in "Linux".

"Linux" is a proper noun so it should start with a capital letter. These
changes are almost all within comments.

This patch was originally proposed by pander on the ffado-devel mailing
list. It has been expanded to cover all similar cases to maintain
consistency throughout the source tree.

Line 
1 /*
2  * Copyright (C) 2009 by Pieter Palmers
3  * Copyright (C) 2012 by Philippe Carriere
4  * Copyright (C) 2012 by Jano Svitok
5  *
6  * This file is part of FFADO
7  * FFADO = Free FireWire (pro-)audio drivers for Linux
8  *
9  * FFADO is based upon FreeBoB.
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 2 of the License, or
14  * (at your option) version 3 of the License.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25
26 #ifndef DICE_MAUDIO_PROFIRE_2626_H
27 #define DICE_MAUDIO_PROFIRE_2626_H
28
29 #include "dice/dice_avdevice.h"
30 #include "dice/dice_eap.h"
31
32 #include "libieee1394/configrom.h"
33
34 // Global monitor registers (application space)
35 #define MAUDIO_PROFIRE2626_REGISTER_APP_VOLUME_KNOB_OFFSET 0x00
36 #define MAUDIO_PROFIRE2626_REGISTER_APP_VOLUME_KNOB_SIZE 4
37 #define MAUDIO_PROFIRE2626_REGISTER_APP_VOLUME_KNOB_VALUE 1
38 #define MAUDIO_PROFIRE2626_REGISTER_APP_VOLUME_KNOB_SHIFT 0
39
40 namespace Dice {
41 namespace Maudio {
42
43 class Profire2626 : public Dice::Device {
44 public:
45     Profire2626( DeviceManager& d,
46                   ffado_smartptr<ConfigRom>( configRom ));
47     virtual ~Profire2626();
48
49     bool discover();
50
51     virtual void showDevice();
52
53     bool canChangeNickname() { return false; }
54
55     class Profire2626EAP : public Dice::EAP
56     {
57     public:
58         Profire2626EAP(Dice::Device& dev);
59
60         void setupSources_low();
61         void setupDestinations_low();
62         void setupSources_mid();
63         void setupDestinations_mid();
64         void setupSources_high();
65         void setupDestinations_high();
66         void setupDefaultRouterConfig_low();
67         void setupDefaultRouterConfig_mid();
68         void setupDefaultRouterConfig_high();
69
70         bool readApplicationReg(unsigned, quadlet_t*);
71         bool writeApplicationReg(unsigned, quadlet_t);
72
73        /**
74         * @brief A standard-switch for boolean.
75         *
76         * If you don't like True and False for the labels, subclass and return your own.
77         * \internal copy&paste from focusrite_eap.h
78         */
79         class Switch : public Control::Boolean
80         {
81         public:
82             Switch(Profire2626EAP*, std::string, size_t, int);
83             bool selected();
84             bool select(bool);
85         private:
86             Profire2626EAP* m_eap;
87             std::string m_name;
88             size_t m_offset;
89             int m_activevalue;
90         };
91
92         class SettingsSection : public Control::Container
93         {
94         public:
95             SettingsSection(Profire2626EAP*, std::string);
96         private:
97             Profire2626EAP * m_eap;
98         };
99     };
100
101     class Profire610EAP : public Profire2626EAP
102     {
103     public:
104         Profire610EAP(Dice::Device& dev);
105
106         void setupSources_low() override;
107         void setupDestinations_low() override;
108         void setupSources_mid() override;
109         void setupDestinations_mid() override;
110         void setupSources_high() override;
111         void setupDestinations_high() override;
112         void setupDefaultRouterConfig_low() override;
113         void setupDefaultRouterConfig_mid() override;
114         void setupDefaultRouterConfig_high() override;
115     };
116
117 private:
118     Dice::EAP* createEAP();
119 };
120
121 }
122 }
123
124 #endif
125 // vim: et
Note: See TracBrowser for help on using the browser.