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 |
/** |
---|
25 |
* Implements the AV/C Descriptors/InfoBlocks for the Audio Subunit as in TA1999008 |
---|
26 |
* |
---|
27 |
*/ |
---|
28 |
|
---|
29 |
#ifndef AVCDESCRIPTORAUDIO_H |
---|
30 |
#define AVCDESCRIPTORAUDIO_H |
---|
31 |
|
---|
32 |
#include "../descriptors/avc_descriptor.h" |
---|
33 |
#include "../avc_definitions.h" |
---|
34 |
|
---|
35 |
#include "../general/avc_generic.h" |
---|
36 |
#include "../general/avc_plug.h" |
---|
37 |
|
---|
38 |
#include "debugmodule/debugmodule.h" |
---|
39 |
|
---|
40 |
#include <vector> |
---|
41 |
#include <string> |
---|
42 |
|
---|
43 |
class Ieee1394Service; |
---|
44 |
|
---|
45 |
// forward declarations |
---|
46 |
namespace Util { |
---|
47 |
namespace Cmd { |
---|
48 |
class IOSSerialize; |
---|
49 |
class IISDeserialize; |
---|
50 |
} |
---|
51 |
} |
---|
52 |
|
---|
53 |
namespace AVC { |
---|
54 |
|
---|
55 |
class AVCAudioClusterInformation |
---|
56 |
{ |
---|
57 |
public: |
---|
58 |
|
---|
59 |
virtual bool serialize( Util::Cmd::IOSSerialize& se ); |
---|
60 |
virtual bool deserialize( Util::Cmd::IISDeserialize& de ); |
---|
61 |
|
---|
62 |
AVCAudioClusterInformation( ) {}; |
---|
63 |
virtual ~AVCAudioClusterInformation() {}; |
---|
64 |
|
---|
65 |
protected: |
---|
66 |
|
---|
67 |
private: |
---|
68 |
uint16_t m_cluster_info_length; |
---|
69 |
byte_t m_number_of_channels; |
---|
70 |
byte_t m_ChConfigType; |
---|
71 |
uint16_t m_Predefined_ChannelConfig; |
---|
72 |
std::vector<uint16_t> m_channel_name_IDs; |
---|
73 |
}; |
---|
74 |
|
---|
75 |
class AVCAudioConfigurationDependentInformation |
---|
76 |
{ |
---|
77 |
public: |
---|
78 |
|
---|
79 |
virtual bool serialize( Util::Cmd::IOSSerialize& se ); |
---|
80 |
virtual bool deserialize( Util::Cmd::IISDeserialize& de ); |
---|
81 |
|
---|
82 |
AVCAudioConfigurationDependentInformation( ) {}; |
---|
83 |
virtual ~AVCAudioConfigurationDependentInformation() {}; |
---|
84 |
|
---|
85 |
protected: |
---|
86 |
|
---|
87 |
private: |
---|
88 |
uint16_t m_configuration_dependent_info_length; |
---|
89 |
uint16_t m_configuration_ID; |
---|
90 |
|
---|
91 |
AVCAudioClusterInformation m_master_cluster_information; |
---|
92 |
|
---|
93 |
byte_t m_number_of_subunit_source_plug_link_information; |
---|
94 |
std::vector<uint16_t> m_subunit_source_plug_link_informations; |
---|
95 |
|
---|
96 |
byte_t m_number_of_function_block_dependent_information; |
---|
97 |
}; |
---|
98 |
|
---|
99 |
class AVCAudioSubunitDependentInformation |
---|
100 |
{ |
---|
101 |
public: |
---|
102 |
|
---|
103 |
virtual bool serialize( Util::Cmd::IOSSerialize& se ); |
---|
104 |
virtual bool deserialize( Util::Cmd::IISDeserialize& de ); |
---|
105 |
|
---|
106 |
AVCAudioSubunitDependentInformation( ) {}; |
---|
107 |
virtual ~AVCAudioSubunitDependentInformation() {}; |
---|
108 |
|
---|
109 |
protected: |
---|
110 |
|
---|
111 |
private: |
---|
112 |
uint16_t m_audio_subunit_dependent_info_fields_length; |
---|
113 |
byte_t m_audio_subunit_version; |
---|
114 |
byte_t m_number_of_configurations; |
---|
115 |
std::vector<AVCAudioConfigurationDependentInformation> m_configurations; |
---|
116 |
}; |
---|
117 |
|
---|
118 |
/** |
---|
119 |
* Audio Subunit Identifier Descriptor |
---|
120 |
*/ |
---|
121 |
class AVCAudioIdentifierDescriptor : public AVCDescriptor |
---|
122 |
{ |
---|
123 |
|
---|
124 |
public: |
---|
125 |
virtual bool serialize( Util::Cmd::IOSSerialize& se ); |
---|
126 |
virtual bool deserialize( Util::Cmd::IISDeserialize& de ); |
---|
127 |
|
---|
128 |
AVCAudioIdentifierDescriptor( Unit* unit, Subunit* subunit ); |
---|
129 |
virtual ~AVCAudioIdentifierDescriptor() {} |
---|
130 |
|
---|
131 |
virtual const char* getDescriptorName() const |
---|
132 |
{return "AVCAudioIdentifierDescriptor";}; |
---|
133 |
|
---|
134 |
private: |
---|
135 |
byte_t m_generation_ID; |
---|
136 |
byte_t m_size_of_list_ID; |
---|
137 |
byte_t m_size_of_object_ID; |
---|
138 |
byte_t m_size_of_object_position; |
---|
139 |
|
---|
140 |
uint16_t m_number_of_root_object_lists; |
---|
141 |
std::vector<byte_t> m_root_object_list_IDs; |
---|
142 |
|
---|
143 |
uint16_t m_audio_subunit_dependent_length; |
---|
144 |
AVCAudioSubunitDependentInformation m_audio_subunit_dependent_info; |
---|
145 |
}; |
---|
146 |
|
---|
147 |
} |
---|
148 |
|
---|
149 |
#endif |
---|