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

Revision 2803, 4.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) 2005-2008 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 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 FIREWORKS_EFC_CMDS_HARDWARE_H
25 #define FIREWORKS_EFC_CMDS_HARDWARE_H
26
27 #include "efc_cmd.h"
28
29 namespace FireWorks {
30
31 #define HWINFO_NAME_SIZE_BYTES      32
32 #define HWINFO_MAX_CAPS_GROUPS      8
33 #define POLLED_MAX_NB_METERS        100
34
35 class EfcHardwareInfoCmd : public EfcCmd
36 {
37     typedef struct
38     {
39         uint8_t type;
40         uint8_t count;
41     } caps_phys_group;
42
43 public:
44     EfcHardwareInfoCmd();
45     virtual ~EfcHardwareInfoCmd() {};
46
47     virtual bool serialize( Util::Cmd::IOSSerialize& se );
48     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
49
50     virtual const char* getCmdName() const
51     { return "EfcHardwareInfoCmd"; }
52    
53     virtual void showEfcCmd();
54    
55     bool hasPlaybackRouting() const
56         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_HAS_PLAYBACK_ROUTING);};
57     bool hasSoftwarePhantom() const
58         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_HAS_PHANTOM);};
59     bool hasDSP() const
60         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_HAS_DSP);};
61     bool hasFPGA() const
62         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_HAS_FPGA);};
63     bool hasOpticalInterface() const
64         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_OPTICAL_INTERFACE_SUPPORTED);};
65     bool hasSpdifAESEBUXLR() const
66         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_SPDIF_AESEBUXLR_SUPPORTED);};
67     bool hasMirroring() const
68         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_MIRRORING_SUPPORTED);};
69     bool hasDynAddr() const
70         {return EFC_CMD_HW_CHECK_FLAG(m_flags, EFC_CMD_HW_DYNADDR_SUPPORTED);};
71
72     uint32_t            m_flags;
73    
74     uint64_t            m_guid;
75     uint32_t            m_type;
76     uint32_t            m_version;
77     char                m_vendor_name[ HWINFO_NAME_SIZE_BYTES ];
78     char                m_model_name[ HWINFO_NAME_SIZE_BYTES ];
79
80     uint32_t            m_supported_clocks;
81
82     uint32_t            m_nb_1394_playback_channels;
83     uint32_t            m_nb_1394_record_channels;
84
85     uint32_t            m_nb_phys_audio_out;
86     uint32_t            m_nb_phys_audio_in;
87    
88     uint32_t            m_nb_out_groups;
89     caps_phys_group     out_groups[ HWINFO_MAX_CAPS_GROUPS ];
90
91     uint32_t            m_nb_in_groups;
92     caps_phys_group     in_groups[ HWINFO_MAX_CAPS_GROUPS ];
93    
94     uint32_t            m_nb_midi_out;
95     uint32_t            m_nb_midi_in;
96    
97     uint32_t            m_max_sample_rate;
98     uint32_t            m_min_sample_rate;
99    
100     uint32_t            m_dsp_version;
101     uint32_t            m_arm_version;
102
103     uint32_t            num_mix_play_chan;
104     uint32_t            num_mix_rec_chan;
105
106     // Only present when efc_version == 1 (?or >= 1?)
107     uint32_t            m_fpga_version;    // version # for FPGA
108
109     uint32_t            m_nb_1394_play_chan_2x;
110     uint32_t            m_nb_1394_rec_chan_2x;
111
112     uint32_t            m_nb_1394_play_chan_4x;
113     uint32_t            m_nb_1394_rec_chan_4x;
114
115     uint32_t            m_reserved[16];
116
117 };
118
119
120 class EfcPolledValuesCmd : public EfcCmd
121 {
122
123 public:
124     EfcPolledValuesCmd();
125     virtual ~EfcPolledValuesCmd() {};
126
127     virtual bool serialize( Util::Cmd::IOSSerialize& se );
128     virtual bool deserialize( Util::Cmd::IISDeserialize& de );
129
130     virtual const char* getCmdName() const
131     { return "EfcPolledValuesCmd"; }
132    
133     virtual void showEfcCmd();
134
135
136     uint32_t            m_status;
137    
138     uint32_t            m_detect_spdif;
139     uint32_t            m_detect_adat;
140     uint32_t            m_reserved3;
141     uint32_t            m_reserved4;
142    
143     uint32_t            m_nb_output_meters;
144     uint32_t            m_nb_input_meters;
145     uint32_t            m_reserved5;
146     uint32_t            m_reserved6;
147     int32_t             m_meters[POLLED_MAX_NB_METERS];
148
149 };
150
151 } // namespace FireWorks
152
153 #endif // FIREWORKS_EFC_CMDS_HARDWARE_H
Note: See TracBrowser for help on using the browser.