[BeBoB/MAudio] Add PreSonus::FireboxDevice class to support functionality to switch...
[ffado.git] / libffado / src / bebob / mackie / onyxmixer.cpp
blobe5a0b57762e50d581e6db7976cc6f1298c4cfa5d
1 /*
2 * Copyright (C) 2005-2008 by Pieter Palmers
4 * This file is part of FFADO
5 * FFADO = Free Firewire (pro-)audio drivers for linux
7 * FFADO is based upon FreeBoB.
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.
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.
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/>.
24 #include "onyxmixer.h"
26 #include "debugmodule/debugmodule.h"
28 namespace BeBoB {
29 namespace Mackie {
31 OnyxMixerDevice::OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ))
32 : BeBoB::Device( d, configRom)
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";
41 debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::Mackie::OnyxMixerDevice (NodeID %d)\n",
42 getConfigRom().getNodeId() );
45 OnyxMixerDevice::~OnyxMixerDevice()
49 void
50 OnyxMixerDevice::showDevice()
52 debugOutput(DEBUG_LEVEL_VERBOSE, "This is a BeBoB::Mackie::OnyxMixerDevice\n");
53 BeBoB::Device::showDevice();
56 FFADODevice::ClockSource
57 OnyxMixerDevice::getActiveClockSource() {
58 return m_fixed_clocksource;
61 bool
62 OnyxMixerDevice::setActiveClockSource(ClockSource s) {
63 // can't change, hence only succeed when identical
64 return s.id == m_fixed_clocksource.id;
67 FFADODevice::ClockSourceVector
68 OnyxMixerDevice::getSupportedClockSources() {
69 FFADODevice::ClockSourceVector r;
70 r.push_back(m_fixed_clocksource);
71 return r;
74 } // Mackie
75 } // BeBoB