motu: implement block async functions since they are ultimately required when dealing...
[ffado.git] / libffado / src / motu / motu_avdevice.h
blob1e754c2e7ded0400e07afc3fa3ad69fdcbc69e77
1 /*
2 * Copyright (C) 2005-2008 by Pieter Palmers
3 * Copyright (C) 2005-2008 by Jonathan Woithe
5 * This file is part of FFADO
6 * FFADO = Free Firewire (pro-)audio drivers for linux
8 * FFADO is based upon FreeBoB.
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.
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.
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/>.
25 #ifndef MOTUDEVICE_H
26 #define MOTUDEVICE_H
28 #include "ffadodevice.h"
30 #include "debugmodule/debugmodule.h"
31 #include "libavc/avc_definitions.h"
33 #include "libstreaming/motu/MotuReceiveStreamProcessor.h"
34 #include "libstreaming/motu/MotuTransmitStreamProcessor.h"
36 #include "motu_controls.h"
37 #include "motu_mark3_controls.h"
39 /* Bitmasks and values used when setting MOTU device registers. Note that
40 * the only "generation 1" device presently supported is the original 828.
41 * "Generation 2" devices include the original Traveler, the 828Mk2, the
42 * original Ultralite, the 896/896HD and so forth. "Generation 3" devices
43 * are all those which carry the "Mark 3" moniker.
45 #define MOTU_RATE_BASE_44100 (0<<3)
46 #define MOTU_RATE_BASE_48000 (1<<3)
47 #define MOTU_RATE_MULTIPLIER_1X (0<<4)
48 #define MOTU_RATE_MULTIPLIER_2X (1<<4)
49 #define MOTU_RATE_MULTIPLIER_4X (2<<4)
50 #define MOTU_RATE_BASE_MASK (0x00000008)
51 #define MOTU_RATE_MULTIPLIER_MASK (0x00000030)
53 #define MOTU_G2_OPTICAL_MODE_OFF 0x00
54 #define MOTU_G2_OPTICAL_MODE_ADAT 0x01
55 #define MOTU_G2_OPTICAL_MODE_TOSLINK 0x02
56 #define MOTU_G2_OPTICAL_IN_MODE_MASK (0x00000300)
57 #define MOTU_G2_OPTICAL_IN_MODE_BIT0 8
58 #define MOTU_G2_OPTICAL_OUT_MODE_MASK (0x00000c00)
59 #define MOTU_G2_OPTICAL_OUT_MODE_BIT0 10
60 #define MOTU_G2_OPTICAL_MODE_MASK (MOTU_G2_OPTICAL_IN_MODE_MASK|MOTU_G2_OPTICAL_MODE_MASK)
62 #define MOTU_G2_CLKSRC_MASK 0x00000007
63 #define MOTU_G2_CLKSRC_INTERNAL 0
64 #define MOTU_G2_CLKSRC_ADAT_OPTICAL 1
65 #define MOTU_G2_CLKSRC_SPDIF_TOSLINK 2
66 #define MOTU_G2_CLKSRC_SMPTE 3
67 #define MOTU_G2_CLKSRC_WORDCLOCK 4
68 #define MOTU_G2_CLKSRC_ADAT_9PIN 5
69 #define MOTU_G2_CLKSRC_AES_EBU 7
71 #define MOTU_METER_PEAKHOLD_MASK 0x3800
72 #define MOTU_METER_PEAKHOLD_SHIFT 11
73 #define MOTU_METER_CLIPHOLD_MASK 0x0700
74 #define MOTU_METER_CLIPHOLD_SHIFT 8
75 #define MOTU_METER_AESEBU_SRC_MASK 0x0004
76 #define MOTU_METER_AESEBU_SRC_SHIFT 2
77 #define MOTU_METER_PROG_SRC_MASK 0x0003
78 #define MOTU_METER_PROG_SRC_SHIFT 0
80 /* Device registers. The "base" registers (that is, those shared
81 * between the G1, G2 and G3 interfaces) are specified and assumed to
82 * be relative to MOTU_REG_BASE_ADDR. The following block is notionally
83 * for G2 devices, although some of these are shared with G1 and G3
84 * units too.
86 #define MOTU_REG_BASE_ADDR 0xfffff0000000ULL
87 #define MOTU_REG_ISOCTRL 0x0b00
88 #define MOTU_REG_OPTICAL_CTRL 0x0b10
89 #define MOTU_REG_CLK_CTRL 0x0b14
90 #define MOTU_REG_896HD_METER_REG 0x0b1c
91 #define MOTU_REG_896HD_METER_CONF 0x0b24
92 #define MOTU_REG_ROUTE_PORT_CONF 0x0c04
93 #define MOTU_REG_INPUT_LEVEL 0x0c08
94 #define MOTU_REG_INPUT_BOOST 0x0c14
95 #define MOTU_REG_INPUT_GAIN_PAD_0 0x0c1c
96 #define MOTU_REG_CLKSRC_NAME0 0x0c60
97 #define MOTU_REG_INPUT_GAIN_PHINV0 0x0c70
98 #define MOTU_REG_INPUT_GAIN_PHINV1 0x0c74
99 #define MOTU_REG_INPUT_GAIN_PHINV2 0x0c78
101 /* Device register definitions for the earliest generation devices */
102 #define MOTU_G1_REG_CONFIG 0x0b00
103 #define MOTU_G1_REG_UNKNOWN_1 0x0b04 // Precise function unknown
104 #define MOTU_G1_REG_UNKNOWN_2 0x0b08 // Precise function unknown
105 #define MOTU_G1_REG_CONFIG_2 0x0b10
107 /* Values written to registers in G1 devices.
109 * Control of the optical mode on the G1 devices (such as the 828mk1) is
110 * strange in that it's split across two configration registers.
111 * Furthermore, while the toslink mode is controlled by "enable" bits, the
112 * ADAT mode is controlled by "disable" bits (that is, the mode is active if
113 * the bits are clear.
115 #define MOTU_G1_C1_ISO_ENABLE 0x00000080
116 #define MOTU_G1_C1_OPT_TOSLINK_IN 0x00008000
117 #define MOTU_G1_C1_OPT_TOSLINK_OUT 0x00004000
118 #define MOTU_G1_C1_ISO_TX_CH_MASK 0x000f0000
119 #define MOTU_G1_C1_ISO_TX_CH_BIT0 16
120 #define MOTU_G1_C1_ISO_TX_ACTIVE 0x00400000
121 #define MOTU_G1_C1_ISO_TX_WREN 0x00800000 // Enable iso tx conf changes
122 #define MOTU_G1_C1_ISO_RX_CH_MASK 0x0f000000
123 #define MOTU_G1_C1_ISO_RX_CH_BIT0 24
124 #define MOTU_G1_C1_ISO_RX_ACTIVE 0x40000000
125 #define MOTU_G1_C1_ISO_RX_WREN 0x80000000 // Enable iso rx conf changes
126 #define MOTU_G1_C1_ISO_INFO_MASK 0xffff0000
127 #define MOTU_G1_C2_OPT_nADAT_IN 0x00000080
128 #define MOTU_G1_C2_OPT_nADAT_OUT 0x00000040
129 #define MOTU_G1_C2_OPT_nADAT_WREN 0x00000002 // Purpose to be confirmed
131 // Rate control bits in MOTU_G1_REG_CONFIG
132 #define MOTU_G1_RATE_MASK 0x0004
133 #define MOTU_G1_RATE_44100 0x0000
134 #define MOTU_G1_RATE_48000 0x0004
136 // Clock source control bits in MOTU_G1_REG_CONFIG
137 #define MOTU_G1_CLKSRC_MASK 0x0027
138 #define MOTU_G1_CLKSRC_ADAT_9PIN 0x0001
139 #define MOTU_G1_CLKSRC_INTERNAL 0x0020
140 #define MOTU_G1_CLKSRC_SPDIF 0x0022
141 #define MOTU_G1_CLKSRC_TOSLINK 0x0022
142 #define MOTU_G1_CLKSRC_ADAT_OPTICAL 0x0026
143 #define MOTU_G1_CLKSRC_UNCHANGED MOTU_CLKSRC_UNCHANGED
145 // Monitor control bits in MOTU_G1_REG_CONFIG
146 #define MOTU_G1_MONIN_MUTE 0x0040
147 #define MOTU_G1_MONIN_MASK 0x3f00
148 #define MOTU_G1_MONIN_L_SRC_MASK 0x0700
149 #define MOTU_G1_MONIN_R_SRC_MASK 0x3800
150 #define MOTU_G1_MONIN_L_CH_BIT0 8
151 #define MOTU_G1_MONIN_R_CH_BIT0 11
152 #define MOTU_G1_MONIN_L_CH1 0x0000
153 #define MOTU_G1_MONIN_L_CH2 0x0100
154 #define MOTU_G1_MONIN_L_CH3 0x0200
155 #define MOTU_G1_MONIN_L_CH4 0x0300
156 #define MOTU_G1_MONIN_L_CH5 0x0400
157 #define MOTU_G1_MONIN_L_CH6 0x0500
158 #define MOTU_G1_MONIN_L_CH7 0x0600
159 #define MOTU_G1_MONIN_L_CH8 0x0700
160 #define MOTU_G1_MONIN_R_CH1 0x0000
161 #define MOTU_G1_MONIN_R_CH2 0x0800
162 #define MOTU_G1_MONIN_R_CH3 0x1000
163 #define MOTU_G1_MONIN_R_CH4 0x1800
164 #define MOTU_G1_MONIN_R_CH5 0x2000
165 #define MOTU_G1_MONIN_R_CH6 0x2800
166 #define MOTU_G1_MONIN_R_CH7 0x3000
167 #define MOTU_G1_MONIN_R_CH8 0x3800
169 // Other control bits in MOTU_G1_REG_CONFIG
170 #define MOTU_G1_IO_ENABLE_0 0x0008 // To be confirmed
172 /* Mark3 device registers - these don't always have MOTU_BASE_ADDR as the
173 * base address so for now we'll define them as absolute addresses. The
174 * "Mark 3" (aka G3) devices share a number of control registers with the G2
175 * devices. Where this occurs we just use the G2 definitions since there's
176 * little to be gained by adding duplicate defines.
178 #define MOTU_G3_REG_MIXER 0xffff00010000ULL
179 #define MOTU_G3_REG_OPTICAL_CTRL 0xfffff0000c94ULL
181 /* Mark3 (aka G3) register constants for cases where the G3 devices differ
182 * from the G2s.
184 #define MOTU_G3_CLKSRC_MASK 0x0000001b
185 #define MOTU_G3_CLKSRC_INTERNAL 0x00000000
186 #define MOTU_G3_CLKSRC_WORDCLOCK 0x00000001
187 #define MOTU_G3_CLKSRC_SMPTE 0x00000002
188 #define MOTU_G3_CLKSRC_SPDIF 0x00000010
189 #define MOTU_G3_CLKSRC_OPTICAL_A 0x00000018
190 #define MOTU_G3_CLKSRC_OPTICAL_B 0x00000019
191 #define MOTU_G3_CLKSRC_ADAT_A MOTU_G3_CLKSRC_OPTICAL_A
192 #define MOTU_G3_CLKSRC_ADAT_B MOTU_G3_CLKSRC_OPTICAL_B
193 #define MOTU_G3_CLKSRC_TOSLINK_A MOTU_G3_CLKSRC_OPTICAL_A
194 #define MOTU_G3_CLKSRC_TOSLINK_B MOTU_G3_CLKSRC_OPTICAL_A
196 #define MOTU_G3_RATE_BASE_44100 (0<<8)
197 #define MOTU_G3_RATE_BASE_48000 (1<<8)
198 #define MOTU_G3_RATE_MULTIPLIER_1X (0<<9)
199 #define MOTU_G3_RATE_MULTIPLIER_2X (1<<9)
200 #define MOTU_G3_RATE_MULTIPLIER_4X (2<<9)
201 #define MOTU_G3_RATE_BASE_MASK (0x00000100)
202 #define MOTU_G3_RATE_MULTIPLIER_MASK (0x00000600)
204 #define MOTU_G3_OPT_A_IN_ENABLE 0x00000001
205 #define MOTU_G3_OPT_B_IN_ENABLE 0x00000002
206 #define MOTU_G3_OPT_A_OUT_ENABLE 0x00000100
207 #define MOTU_G3_OPT_B_OUT_ENABLE 0x00000200
208 #define MOTU_G3_OPT_A_IN_TOSLINK 0x00010000 // If these mode bits are not
209 #define MOTU_G3_OPT_A_OUT_TOSLINK 0x00040000 // set the mode is ADAT if
210 #define MOTU_G3_OPT_B_IN_TOSLINK 0x00100000 // the port is enabled
211 #define MOTU_G3_OPT_B_OUT_TOSLINK 0x00400000
212 #define MOTU_G3_OPT_A_IN_MASK (MOTU_G3_OPT_A_IN_ENABLE|MOTU_G3_OPT_A_IN_TOSLINK)
213 #define MOTU_G3_OPT_A_OUT_MASK (MOTU_G3_OPT_A_OUT_ENABLE|MOTU_G3_OPT_A_OUT_TOSLINK)
214 #define MOTU_G3_OPT_B_IN_MASK (MOTU_G3_OPT_B_IN_ENABLE|MOTU_G3_OPT_B_IN_TOSLINK)
215 #define MOTU_G3_OPT_B_OUT_MASK (MOTU_G3_OPT_B_OUT_ENABLE|MOTU_G3_OPT_B_OUT_TOSLINK)
217 /* The following values are used when defining configuration structures and
218 * calling driver functions. They are generally not raw values written to
219 * registers.
222 /* Port Active Flags (ports declaration) */
223 #define MOTU_PA_RATE_1x 0x0001 /* 44k1 or 48k */
224 #define MOTU_PA_RATE_2x 0x0002 /* 88k2 or 96k */
225 #define MOTU_PA_RATE_4x 0x0004 /* 176k4 or 192k */
226 #define MOTU_PA_RATE_1x2x (MOTU_PA_RATE_1x|MOTU_PA_RATE_2x)
227 #define MOTU_PA_RATE_2x4x (MOTU_PA_RATE_2x|MOTU_PA_RATE_4x)
228 #define MOTU_PA_RATE_ANY (MOTU_PA_RATE_1x|MOTU_PA_RATE_2x|MOTU_PA_RATE_4x)
229 #define MOTU_PA_RATE_MASK MOTU_PA_RATE_ANY
230 #define MOTU_PA_OPTICAL_OFF 0x0010 /* Optical port off */
231 #define MOTU_PA_OPTICAL_ADAT 0x0020 /* Optical port in ADAT mode */
232 #define MOTU_PA_OPTICAL_TOSLINK 0x0040 /* Optical port in SPDIF/Toslink mode */
233 #define MOTU_PA_OPTICAL_ON (MOTU_PA_OPTICAL_ADAT|MOTU_PA_OPTICAL_TOSLINK)
234 #define MOTU_PA_OPTICAL_ANY (MOTU_PA_OPTICAL_OFF|MOTU_PA_OPTICAL_ON)
235 #define MOTU_PA_OPTICAL_MASK MOTU_PA_OPTICAL_ANY
236 #define MOTU_PA_PADDING 0x0100
237 #define MOTU_PA_IN 0x0200
238 #define MOTU_PA_OUT 0x0400
239 #define MOTU_PA_INOUT (MOTU_PA_IN | MOTU_PA_OUT)
240 /* The Mark3 devices have two optical ports */
241 #define MOTU_PA_MK3_OPT_A_OFF MOTU_PA_OPTICAL_OFF
242 #define MOTU_PA_MK3_OPT_A_ADAT MOTU_PA_OPTICAL_ADAT
243 #define MOTU_PA_MK3_OPT_A_TOSLINK MOTU_PA_OPTICAL_TOSLINK
244 #define MOTU_PA_MK3_OPT_A_ON (MOTU_PA_MK3_OPT_A_ADAT|MOTU_PA_MK3_OPT_A_TOSLINK)
245 #define MOTU_PA_MK3_OPT_A_ANY (MOTU_PA_MK3_OPT_A_OFF|MOTU_PA_MK3_OPT_A_ON)
246 #define MOTU_PA_MK3_OPT_A_MASK MOTU_PA_MK3_OPT_A_ANY
247 #define MOTU_PA_MK3_OPT_B_OFF 0x1000
248 #define MOTU_PA_MK3_OPT_B_ADAT 0x2000
249 #define MOTU_PA_MK3_OPT_B_TOSLINK 0x4000
250 #define MOTU_PA_MK3_OPT_B_ON (MOTU_PA_MK3_OPT_B_ADAT|MOTU_PA_MK3_OPT_B_TOSLINK)
251 #define MOTU_PA_MK3_OPT_B_ANY (MOTU_PA_MK3_OPT_B_OFF|MOTU_PA_MK3_OPT_B_ON)
252 #define MOTU_PA_MK3_OPT_B_MASK MOTU_PA_MK3_OPT_B_ANY
253 #define MOTU_PA_MK3_OPT_ANY (MOTU_PA_MK3_OPT_A_ANY|MOTU_PA_MK3_OPT_B_ANY)
255 /* Generic "direction" flags */
256 #define MOTU_DIR_IN 1
257 #define MOTU_DIR_OUT 2
258 #define MOTU_DIR_INOUT (MOTU_DIR_IN | MOTU_DIR_OUT)
260 /* Optical port mode settings/flags */
261 #define MOTU_OPTICAL_MODE_OFF 0x0000
262 #define MOTU_OPTICAL_MODE_ADAT 0x0001
263 #define MOTU_OPTICAL_MODE_TOSLINK 0x0002
264 #define MOTU_OPTICAL_MODE_KEEP 0xffff
265 #define MOTU_OPTICAL_MODE_NONE 0xffffffff
267 /* Clock source settings/flags */
268 #define MOTU_CLKSRC_INTERNAL 0
269 #define MOTU_CLKSRC_ADAT_OPTICAL 1
270 #define MOTU_CLKSRC_SPDIF_TOSLINK 2
271 #define MOTU_CLKSRC_SMPTE 3
272 #define MOTU_CLKSRC_WORDCLOCK 4
273 #define MOTU_CLKSRC_ADAT_9PIN 5
274 #define MOTU_CLKSRC_AES_EBU 6
275 #define MOTU_CLKSRC_OPTICAL_A 7
276 #define MOTU_CLKSRC_OPTICAL_B 8
277 #define MOTU_CLKSRC_LAST 8
278 #define MOTU_CLKSRC_NONE 0xffff
279 #define MOTU_CLKSRC_UNCHANGED MOTU_CLKSRC_NONE
281 /* Device generation identifiers */
282 #define MOTU_DEVICE_G1 0x0001
283 #define MOTU_DEVICE_G2 0x0002
284 #define MOTU_DEVICE_G3 0x0003
286 class ConfigRom;
287 class Ieee1394Service;
289 namespace Util {
290 class Configuration;
293 namespace Motu {
295 enum EMotuModel {
296 MOTU_MODEL_NONE = 0x0000,
297 MOTU_MODEL_828mkII = 0x0001,
298 MOTU_MODEL_TRAVELER = 0x0002,
299 MOTU_MODEL_ULTRALITE = 0x0003,
300 MOTU_MODEL_8PRE = 0x0004,
301 MOTU_MODEL_828MkI = 0x0005,
302 MOTU_MODEL_896HD = 0x0006,
303 MOTU_MODEL_828mk3 = 0x0007,
304 MOTU_MODEL_ULTRALITEmk3 = 0x0008,
305 MOTU_MODEL_ULTRALITEmk3_HYB = 0x0009,
306 MOTU_MODEL_TRAVELERmk3 = 0x000a, // Placeholder only at present
307 MOTU_MODEL_896mk3 = 0x000b, // Placeholder only at present
310 struct VendorModelEntry {
311 unsigned int vendor_id;
312 unsigned int model_id;
313 unsigned int unit_version;
314 unsigned int unit_specifier_id;
315 enum EMotuModel model;
316 const char *vendor_name;
317 const char *model_name;
320 struct PortEntry {
321 const char *port_name;
322 unsigned int port_flags;
323 unsigned int port_offset;
326 struct PortGroupEntry {
327 const char *group_name_format;
328 signed int n_channels;
329 unsigned int flags;
330 signed int port_order;
331 signed int port_num_offset;
332 signed int group_pkt_offset[2];
335 // Structures used for pre-Mark3 device mixer definitions
336 struct MixerCtrl {
337 const char *name, *label, *desc;
338 unsigned int type;
339 unsigned int dev_register;
341 struct MatrixMixBus {
342 const char *name;
343 unsigned int address;
345 struct MatrixMixChannel {
346 const char *name;
347 unsigned int flags;
348 unsigned int addr_ofs;
350 struct MotuMixer {
351 const MixerCtrl *mixer_ctrl;
352 unsigned int n_mixer_ctrls;
353 const MatrixMixBus *mixer_buses;
354 unsigned int n_mixer_buses;
355 const MatrixMixChannel *mixer_channels;
356 unsigned int n_mixer_channels;
359 // Structures used for devices which use the "Mark3" mixer protocol
360 struct MotuMark3Mixer {
363 struct DevicePropertyEntry {
364 PortGroupEntry *portgroup_entry;
365 unsigned int n_portgroup_entries;
366 const PortEntry* port_entry;
367 unsigned int n_port_entries;
368 signed int MaxSampleRate;
369 // A device will set at most one of the *mixer fields
370 const struct MotuMixer *mixer;
371 const struct MotuMark3Mixer *m3mixer;
372 // Others features can be added here like MIDI port presence.
375 extern const DevicePropertyEntry DevicesProperty[];
377 /* Macro to calculate the size of an array */
378 #define N_ELEMENTS(_array) (sizeof(_array) / sizeof((_array)[0]))
380 /* Macro to define a MotuMixer structure succintly */
381 #define MOTUMIXER(_ctrls, _buses, _channels) \
382 { _ctrls, N_ELEMENTS(_ctrls), _buses, N_ELEMENTS(_buses), _channels, N_ELEMENTS(_channels), }
384 class MotuDevice : public FFADODevice {
385 public:
387 MotuDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) );
388 virtual ~MotuDevice();
390 virtual bool buildMixer();
391 virtual bool destroyMixer();
393 static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false );
394 static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ));
395 static int getConfigurationId( );
396 virtual bool discover();
398 virtual void showDevice();
400 unsigned int getHwClockSource();
401 bool setClockCtrlRegister(signed int samplingFrequency, unsigned int clock_source);
402 virtual bool setSamplingFrequency( int samplingFrequency );
403 virtual int getSamplingFrequency( );
404 virtual std::vector<int> getSupportedSamplingFrequencies();
406 FFADODevice::ClockSource clockIdToClockSource(unsigned int id);
407 virtual ClockSourceVector getSupportedClockSources();
408 virtual bool setActiveClockSource(ClockSource);
409 virtual ClockSource getActiveClockSource();
411 virtual int getStreamCount();
412 virtual Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
413 virtual enum FFADODevice::eStreamingState getStreamingState();
415 virtual bool prepare();
416 virtual bool lock();
417 virtual bool unlock();
419 virtual bool startStreamByIndex(int i);
420 virtual bool stopStreamByIndex(int i);
422 signed int getDeviceGeneration(void);
424 signed int getIsoRecvChannel(void);
425 signed int getIsoSendChannel(void);
426 unsigned int getOpticalMode(unsigned int dir, unsigned int *port_a_mode,
427 unsigned int *port_b_mode);
428 signed int setOpticalMode(unsigned int dir,
429 unsigned int port_a_mode, unsigned int port_b_mode);
431 signed int getEventSize(unsigned int dir);
433 signed int m_motu_model;
434 protected:
435 struct VendorModelEntry * m_model;
436 signed int m_iso_recv_channel, m_iso_send_channel;
437 signed int m_rx_bandwidth, m_tx_bandwidth;
439 signed int m_rx_event_size, m_tx_event_size;
441 Streaming::MotuReceiveStreamProcessor *m_receiveProcessor;
442 Streaming::MotuTransmitStreamProcessor *m_transmitProcessor;
444 private:
445 bool buildMixerAudioControls(void);
446 bool buildMark3MixerAudioControls(void);
447 bool addPort(Streaming::StreamProcessor *s_processor,
448 char *name,
449 enum Streaming::Port::E_Direction direction,
450 int position, int size);
451 bool addDirPorts(
452 enum Streaming::Port::E_Direction direction, unsigned int sample_rate,
453 unsigned int optical_a_mode, unsigned int optical_b_mode);
454 bool initDirPortGroups(
455 enum Streaming::Port::E_Direction direction, unsigned int sample_rate,
456 unsigned int optical_a_mode, unsigned int optical_b_mode);
457 bool addDirPortGroups(
458 enum Streaming::Port::E_Direction direction, unsigned int sample_rate,
459 unsigned int optical_a_mode, unsigned int optical_b_mode);
461 public:
462 unsigned int ReadRegister(fb_nodeaddr_t reg);
463 signed int readBlock(fb_nodeaddr_t reg, quadlet_t *buf, signed int n_quads);
464 signed int WriteRegister(fb_nodeaddr_t reg, quadlet_t data);
465 signed int writeBlock(fb_nodeaddr_t reg, quadlet_t *data, signed int n_quads);
467 private:
468 Control::Container *m_MixerContainer;
469 Control::Container *m_ControlContainer;
474 #endif