root/branches/libffado-2.0/src/bebob/edirol/edirol_fa66.cpp

Revision 1198, 2.1 kB (checked in by wagi, 13 years ago)

Set clock source always to 'Device Controlled'. The FA-66 doesn't support
switching clock source by software.

It might be possible to read out the current setting though. This is
a open TODO.

Furthermore, re-enable device discovering. This fixes a previous checkin r1183.

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