root/trunk/libffado/src/bebob/bebob_avplug.h

Revision 554, 2.4 kB (checked in by ppalmers, 17 years ago)

Merge echoaudio branch into trunk.

This adds support for the Echo Audiofire devices to FFADO. Possibly also other devices working with the Apple Class Driver will work with this code. It is not fully complete yet, but the main rework is
done.

First of all the IAvDevice class/interface is renamed to FFADODevice, in order to separate the AV/C code from the FFADO API code. A device supported by FFADO implements a FFADODevice.

The BeBoB device has been split up into three groups:
- libavc/* : all code and commands that are specified by AV/C specs. Note that a lot of the code that used to be in BeBoB::AvDevice? now resides in AVC::Unit
- genericavc/* : a FFADODevice that uses AV/C descriptors & commands for discovery and config
- bebob/* : the bebob FFADODevice that inherits from GenericAVC::AvDevice? but that uses BridgeCo? commands for discovery

Everything has been moved as high as possible in the class hierarchy. If necessary, a subclass that uses device specific commands is introduced (e.g. BeBoB::Plug inherits from AVC::Plug and uses the
BridgeCo? extended plug info command to discover it's properties).

There are some other fixes along the way that have been done too.

Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
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 library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef BEBOB_AVPLUG_H
25 #define BEBOB_AVPLUG_H
26
27 #include "libavc/ccm/avc_signal_source.h"
28 #include "libavc/streamformat/avc_extended_stream_format.h"
29 #include "libavc/general/avc_extended_plug_info.h"
30 #include "libavc/general/avc_extended_cmd_generic.h"
31 #include "libavc/avc_definitions.h"
32 #include "libavc/general/avc_generic.h"
33 #include "libavc/general/avc_plug.h"
34
35 #include "libutil/serialize.h"
36
37 #include "debugmodule/debugmodule.h"
38
39 #include <glibmm/ustring.h>
40
41 class Ieee1394Service;
42 class ConfigRom;
43
44 namespace BeBoB {
45
46 class AvDevice;
47
48 class Plug : public AVC::Plug {
49 public:
50
51     // \todo This constructors sucks. too many parameters. fix it.
52     Plug( AVC::Unit* unit,
53           AVC::Subunit* subunit,
54           AVC::function_block_type_t functionBlockType,
55           AVC::function_block_type_t functionBlockId,
56           AVC::Plug::EPlugAddressType plugAddressType,
57           AVC::Plug::EPlugDirection plugDirection,
58           AVC::plug_id_t plugId );
59     Plug( const Plug& rhs );
60     virtual ~Plug();
61
62     bool discover();
63     bool discoverConnections();
64
65  public:
66
67 protected:
68     Plug();
69
70     bool discoverPlugType();
71     bool discoverName();
72     bool discoverNoOfChannels();
73     bool discoverChannelPosition();
74     bool discoverChannelName();
75     bool discoverClusterInfo();
76     bool discoverConnectionsInput();
77     bool discoverConnectionsOutput();
78
79 private:
80     bool copyClusterInfo(AVC::ExtendedPlugInfoPlugChannelPositionSpecificData&
81                          channelPositionData );
82     AVC::ExtendedPlugInfoCmd setPlugAddrToPlugInfoCmd();
83
84
85 };
86
87 }
88
89 #endif // BEBOB_AVPLUG_H
Note: See TracBrowser for help on using the browser.