root/trunk/libffado/src/bebob/esi/quatafire610.cpp

Revision 1066, 2.1 kB (checked in by ppalmers, 16 years ago)

the quatafire doesn't support setting a clock source, altough discovery gives some.

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 #include "quatafire610.h"
25
26 #include "debugmodule/debugmodule.h"
27
28 namespace BeBoB {
29 namespace ESI {
30
31 QuataFireDevice::QuataFireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ))
32     : BeBoB::AvDevice( d, configRom)
33 {
34     m_fixed_clocksource.type = FFADODevice::eCT_Auto;
35     m_fixed_clocksource.valid = true;
36     m_fixed_clocksource.locked = true;
37     m_fixed_clocksource.id = 0;
38     m_fixed_clocksource.slipping = false;
39     m_fixed_clocksource.description = "Autoselect";
40
41     debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::ESI::QuataFireDevice (NodeID %d)\n",
42                  getConfigRom().getNodeId() );
43 }
44
45 QuataFireDevice::~QuataFireDevice()
46 {
47 }
48
49 void
50 QuataFireDevice::showDevice()
51 {
52     debugOutput(DEBUG_LEVEL_VERBOSE, "This is a BeBoB::ESI::QuataFireDevice\n");
53     BeBoB::AvDevice::showDevice();
54 }
55
56 FFADODevice::ClockSource
57 QuataFireDevice::getActiveClockSource() {
58     return m_fixed_clocksource;
59 }
60
61 bool
62 QuataFireDevice::setActiveClockSource(ClockSource s) {
63     // can't change, hence only succeed when identical
64     return s.id == m_fixed_clocksource.id;
65 }
66
67 FFADODevice::ClockSourceVector
68 QuataFireDevice::getSupportedClockSources() {
69     FFADODevice::ClockSourceVector r;
70     r.push_back(m_fixed_clocksource);
71     return r;
72 }
73
74 } // ESI
75 } // BeBoB
Note: See TracBrowser for help on using the browser.