root/trunk/libffado/src/bebob/mackie/onyxmixer.cpp

Revision 1210, 2.2 kB (checked in by ppalmers, 16 years ago)

add Onyx Mixer FireWire? expansion device

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 "onyxmixer.h"
25
26 #include "debugmodule/debugmodule.h"
27
28 namespace BeBoB {
29 namespace Mackie {
30
31 OnyxMixerDevice::OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ))
32     : BeBoB::AvDevice( d, configRom)
33 {
34     m_fixed_clocksource.type = FFADODevice::eCT_Internal;
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 = "Internal";
40
41     debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::Mackie::OnyxMixerDevice (NodeID %d)\n",
42                  getConfigRom().getNodeId() );
43
44     // needs a lot of time
45     if (AVC::AVCCommand::getSleepAfterAVCCommand() < 1000) {
46         AVC::AVCCommand::setSleepAfterAVCCommand( 1000 );
47     }
48 }
49
50 OnyxMixerDevice::~OnyxMixerDevice()
51 {
52 }
53
54 void
55 OnyxMixerDevice::showDevice()
56 {
57     debugOutput(DEBUG_LEVEL_VERBOSE, "This is a BeBoB::Mackie::OnyxMixerDevice\n");
58     BeBoB::AvDevice::showDevice();
59 }
60
61 FFADODevice::ClockSource
62 OnyxMixerDevice::getActiveClockSource() {
63     return m_fixed_clocksource;
64 }
65
66 bool
67 OnyxMixerDevice::setActiveClockSource(ClockSource s) {
68     // can't change, hence only succeed when identical
69     return s.id == m_fixed_clocksource.id;
70 }
71
72 FFADODevice::ClockSourceVector
73 OnyxMixerDevice::getSupportedClockSources() {
74     FFADODevice::ClockSourceVector r;
75     r.push_back(m_fixed_clocksource);
76     return r;
77 }
78
79 } // Mackie
80 } // BeBoB
Note: See TracBrowser for help on using the browser.