Index: /branches/libffado-2.0/src/SConscript =================================================================== --- /branches/libffado-2.0/src/SConscript (revision 1198) +++ /branches/libffado-2.0/src/SConscript (revision 1213) @@ -110,4 +110,5 @@ bebob/edirol/edirol_fa66.cpp \ bebob/esi/quatafire610.cpp \ + bebob/mackie/onyxmixer.cpp \ ' ) bebob_pkgdata = env.Split( '\ Index: /branches/libffado-2.0/src/bebob/mackie/onyxmixer.cpp =================================================================== --- /branches/libffado-2.0/src/bebob/mackie/onyxmixer.cpp (revision 1210) +++ /branches/libffado-2.0/src/bebob/mackie/onyxmixer.cpp (revision 1210) @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2005-2008 by Pieter Palmers + * + * This file is part of FFADO + * FFADO = Free Firewire (pro-)audio drivers for linux + * + * FFADO is based upon FreeBoB. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "onyxmixer.h" + +#include "debugmodule/debugmodule.h" + +namespace BeBoB { +namespace Mackie { + +OnyxMixerDevice::OnyxMixerDevice( DeviceManager& d, std::auto_ptr( configRom )) + : BeBoB::AvDevice( d, configRom) +{ + m_fixed_clocksource.type = FFADODevice::eCT_Internal; + m_fixed_clocksource.valid = true; + m_fixed_clocksource.locked = true; + m_fixed_clocksource.id = 0; + m_fixed_clocksource.slipping = false; + m_fixed_clocksource.description = "Internal"; + + debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::Mackie::OnyxMixerDevice (NodeID %d)\n", + getConfigRom().getNodeId() ); + + // needs a lot of time + if (AVC::AVCCommand::getSleepAfterAVCCommand() < 1000) { + AVC::AVCCommand::setSleepAfterAVCCommand( 1000 ); + } +} + +OnyxMixerDevice::~OnyxMixerDevice() +{ +} + +void +OnyxMixerDevice::showDevice() +{ + debugOutput(DEBUG_LEVEL_VERBOSE, "This is a BeBoB::Mackie::OnyxMixerDevice\n"); + BeBoB::AvDevice::showDevice(); +} + +FFADODevice::ClockSource +OnyxMixerDevice::getActiveClockSource() { + return m_fixed_clocksource; +} + +bool +OnyxMixerDevice::setActiveClockSource(ClockSource s) { + // can't change, hence only succeed when identical + return s.id == m_fixed_clocksource.id; +} + +FFADODevice::ClockSourceVector +OnyxMixerDevice::getSupportedClockSources() { + FFADODevice::ClockSourceVector r; + r.push_back(m_fixed_clocksource); + return r; +} + +} // Mackie +} // BeBoB Index: /branches/libffado-2.0/src/bebob/mackie/onyxmixer.h =================================================================== --- /branches/libffado-2.0/src/bebob/mackie/onyxmixer.h (revision 1210) +++ /branches/libffado-2.0/src/bebob/mackie/onyxmixer.h (revision 1210) @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2005-2008 by Daniel Wagner + * Copyright (C) 2005-2008 by Pieter Palmers + * + * This file is part of FFADO + * FFADO = Free Firewire (pro-)audio drivers for linux + * + * FFADO is based upon FreeBoB. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef BEBOB_ONYX_MIXER_DEVICE_H +#define BEBOB_ONYX_MIXER_DEVICE_H + +#include "bebob/bebob_avdevice.h" + +namespace BeBoB { +namespace Mackie { + +class OnyxMixerDevice : public BeBoB::AvDevice { + +public: + OnyxMixerDevice( DeviceManager& d, std::auto_ptr( configRom )); + virtual ~OnyxMixerDevice(); + + // override these since the mackie does not report + // any the clock sources (it only supports internal clocking) + virtual ClockSourceVector getSupportedClockSources(); + virtual bool setActiveClockSource(ClockSource); + virtual ClockSource getActiveClockSource(); + + virtual void showDevice(); +private: + ClockSource m_fixed_clocksource; +}; + +} // namespace Mackie +} // namespace BeBoB + +#endif Index: /branches/libffado-2.0/src/bebob/bebob_avdevice.cpp =================================================================== --- /branches/libffado-2.0/src/bebob/bebob_avdevice.cpp (revision 1198) +++ /branches/libffado-2.0/src/bebob/bebob_avdevice.cpp (revision 1213) @@ -31,4 +31,5 @@ #include "bebob/focusrite/focusrite_saffirepro.h" #include "bebob/terratec/terratec_device.h" +#include "bebob/mackie/onyxmixer.h" #include "bebob/edirol/edirol_fa101.h" #include "bebob/edirol/edirol_fa66.h" @@ -99,4 +100,8 @@ switch (vendorId) { + case FW_VENDORID_MACKIE: + if (modelId == 0x00010065 ) { + return new Mackie::OnyxMixerDevice(d, configRom); + } case FW_VENDORID_EDIROL: switch (modelId) { Index: /branches/libffado-2.0/src/devicemanager.cpp =================================================================== --- /branches/libffado-2.0/src/devicemanager.cpp (revision 1190) +++ /branches/libffado-2.0/src/devicemanager.cpp (revision 1213) @@ -298,4 +298,5 @@ DeviceManager::discover( bool useCache, bool rediscover ) { + useCache = useCache && ENABLE_DISCOVERY_CACHE; m_used_cache_last_time = useCache; bool slaveMode=false; Index: /branches/libffado-2.0/config.h.in =================================================================== --- /branches/libffado-2.0/config.h.in (revision 1186) +++ /branches/libffado-2.0/config.h.in (revision 1213) @@ -82,4 +82,7 @@ // debug logging in the critical sections #define DEBUG_EXTREME_ENABLE 0 + +// discovery +#define ENABLE_DISCOVERY_CACHE 0 // watchdog