root/trunk/libffado/src/bounce/bounce_slave_avdevice.h

Revision 2803, 2.9 kB (checked in by jwoithe, 1 year 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  * Copyright (C) 2005-2008 by Daniel Wagner
4  *
5  * This file is part of FFADO
6  * FFADO = Free FireWire (pro-)audio drivers for Linux
7  *
8  * FFADO is based upon FreeBoB
9  *
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.
14  *
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.
19  *
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/>.
22  *
23  */
24
25 #ifndef __FFADO_BOUNCESLAVEDEVICE__
26 #define __FFADO_BOUNCESLAVEDEVICE__
27
28 #include "debugmodule/debugmodule.h"
29 #include "bounce_avdevice.h"
30
31 #define FFADO_MAX_NAME_LEN 256
32
33 #define FFADO_BOUNCE_SERVER_VENDORNAME  "FFADO Server"
34 #define FFADO_BOUNCE_SERVER_MODELNAME   "ffado-server"
35
36 // NOTE: this is currently free, but it is not really allowed to use
37 #define FFADO_BOUNCE_SERVER_VENDORID    0x000B0001
38 #define FFADO_BOUNCE_SERVER_MODELID     0x000B0001
39 #define FFADO_BOUNCE_SERVER_SPECID      0x000B0001
40
41 namespace Bounce {
42
43 class SlaveDevice : public Device {
44     class BounceSlaveNotifier;
45 public:
46
47     SlaveDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) );
48     virtual ~SlaveDevice();
49
50     static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false );
51     static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ));
52
53     bool discover();
54     bool prepare();
55     bool lock();
56     bool unlock();
57
58     bool startStreamByIndex(int i);
59     bool stopStreamByIndex(int i);
60
61 private:
62     bool waitForRegisterNotEqualTo(nodeaddr_t offset, fb_quadlet_t v);
63     bool initMemSpace();
64     bool restoreMemSpace();
65
66 private: // configrom shit
67
68     struct configrom_backup {
69         quadlet_t rom[0x100];
70         size_t rom_size;
71         unsigned char rom_version;
72     };
73     struct configrom_backup m_original_config_rom;
74
75     struct configrom_backup
76         save_config_rom(raw1394handle_t handle);
77     int restore_config_rom(raw1394handle_t handle, struct configrom_backup old);
78     int init_config_rom(raw1394handle_t handle);
79
80 private:
81     BounceSlaveNotifier *m_Notifier;
82     /**
83      * this class reacts on the other side writing to the
84      * hosts address space
85      */
86     class BounceSlaveNotifier : public Ieee1394Service::ARMHandler
87     {
88     public:
89         BounceSlaveNotifier(SlaveDevice &, nodeaddr_t start);
90         virtual ~BounceSlaveNotifier();
91
92     private:
93         SlaveDevice &m_bounceslavedevice;
94     };
95 };
96
97 } // end of namespace Bounce
98
99 #endif /* __FFADO_BOUNCESLAVEDEVICE__ */
100
101
Note: See TracBrowser for help on using the browser.