Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(22) |
Aug
(97) |
Sep
(33) |
Oct
(30) |
Nov
(79) |
Dec
(41) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(85) |
Feb
(21) |
Mar
(94) |
Apr
(83) |
May
(159) |
Jun
(30) |
Jul
(41) |
Aug
(11) |
Sep
(30) |
Oct
(46) |
Nov
(93) |
Dec
(21) |
2009 |
Jan
|
Feb
(4) |
Mar
(14) |
Apr
(15) |
May
(23) |
Jun
(18) |
Jul
(17) |
Aug
(40) |
Sep
(26) |
Oct
(23) |
Nov
(38) |
Dec
(30) |
2010 |
Jan
(26) |
Feb
(10) |
Mar
(3) |
Apr
(13) |
May
(23) |
Jun
(17) |
Jul
(11) |
Aug
(10) |
Sep
(23) |
Oct
(17) |
Nov
(2) |
Dec
(20) |
2011 |
Jan
(6) |
Feb
(8) |
Mar
(10) |
Apr
(15) |
May
(2) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(3) |
Oct
(5) |
Nov
(8) |
Dec
(10) |
2012 |
Jan
(3) |
Feb
(31) |
Mar
(52) |
Apr
(26) |
May
(27) |
Jun
(16) |
Jul
(17) |
Aug
(5) |
Sep
(41) |
Oct
(5) |
Nov
(9) |
Dec
(5) |
2013 |
Jan
(4) |
Feb
(6) |
Mar
(12) |
Apr
(30) |
May
(9) |
Jun
(17) |
Jul
(15) |
Aug
(34) |
Sep
(29) |
Oct
(38) |
Nov
(5) |
Dec
(9) |
2014 |
Jan
(7) |
Feb
(9) |
Mar
(13) |
Apr
(2) |
May
(39) |
Jun
(4) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
(1) |
3
(1) |
4
|
5
|
6
|
7
|
8
|
9
(2) |
10
|
11
(1) |
12
(2) |
13
|
14
(2) |
15
(7) |
16
(3) |
17
|
18
(1) |
19
|
20
|
21
|
22
(8) |
23
(6) |
24
|
25
(1) |
26
|
27
|
28
|
29
|
30
(3) |
|
|
|
|
|
From: <trac@ff...> - 2009-11-30 21:44:00
|
Author: arnonym Date: 2009-11-30 13:44:23 -0800 (Mon, 30 Nov 2009) New Revision: 1738 Modified: trunk/libffado/support/dbus/ffado-dbus-server.cpp Log: No need to name this a "test" server. Modified: trunk/libffado/support/dbus/ffado-dbus-server.cpp =================================================================== --- trunk/libffado/support/dbus/ffado-dbus-server.cpp 2009-11-30 21:43:03 UTC (rev 1737) +++ trunk/libffado/support/dbus/ffado-dbus-server.cpp 2009-11-30 21:44:23 UTC (rev 1738) @@ -312,7 +312,7 @@ DBus::_init_threading(); - // test DBUS stuff + // set up DBUS stuff DBus::default_dispatcher = &dispatcher; DBus::Connection conn = DBus::Connection::SessionBus(); global_conn = &conn; @@ -325,7 +325,7 @@ // unlock the control tree since the tree is built m_deviceManager->unlockControl(); - printMessage("DBUS test service running\n"); + printMessage("DBUS service running\n"); printMessage("press ctrl-c to stop it & exit\n"); while(run) { |
From: <trac@ff...> - 2009-11-30 21:42:41
|
Author: arnonym Date: 2009-11-30 13:43:03 -0800 (Mon, 30 Nov 2009) New Revision: 1737 Modified: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp Log: Be less noisy. And output a wanring if writing to the application space fails. Modified: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/focusrite_eap.cpp 2009-11-30 21:31:56 UTC (rev 1736) +++ trunk/libffado/src/dice/focusrite/focusrite_eap.cpp 2009-11-30 21:43:03 UTC (rev 1737) @@ -35,7 +35,7 @@ , m_offset(offset) { m_eap->readApplicationReg(m_offset, &m_tmp); - printf("%s: Value: %i\n", name.c_str(), m_tmp); + //printf("%s: Value: %i\n", name.c_str(), m_tmp); m_value = /*127*/-m_tmp; } @@ -58,7 +58,10 @@ } bool FocusriteEAP::writeApplicationReg(unsigned offset, quadlet_t quadlet) { bool ret = writeReg(eRT_Application, offset, quadlet); - if (!ret) return false; + if (!ret) { + debugWarning("Couldn't write %i to register %x!\n", quadlet, offset); + return false; + } debugOutput(DEBUG_LEVEL_VERBOSE, "Will sent command %i.\n", commandToFix(offset)); return writeReg(eRT_Application, msgSet, commandToFix(offset)); } @@ -72,8 +75,8 @@ , m_activevalue(activevalue) { m_eap->readApplicationReg(m_offset, &m_state_tmp); - printf("%s: %s\n", name.c_str(), (m_state_tmp&m_activevalue)?"true":"false"); - debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); + //printf("%s: %s\n", name.c_str(), (m_state_tmp&m_activevalue)?"true":"false"); + //debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); m_selected = (m_state_tmp&m_activevalue)?true:false; } @@ -103,7 +106,7 @@ quadlet_t tmp; m_eap->readApplicationReg(m_offset, &tmp); m_value = - ((tmp>>m_bitshift)&0xff); - printf("%s: %i -> %i\n", name.c_str(), tmp, m_value); + //printf("%s: %i -> %i\n", name.c_str(), tmp, m_value); } int getValue(int) { return getValue(); } |
From: <trac@ff...> - 2009-11-30 21:40:39
|
Author: arnonym Date: 2009-11-30 13:31:56 -0800 (Mon, 30 Nov 2009) New Revision: 1736 Added: trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui Modified: trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py Log: Add a widget to control the monitoring section of the Saffire Pro24 and Pro40. This also controls the line/inst and level switches of the pro24. Modified: trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py =================================================================== --- trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py 2009-11-25 21:09:04 UTC (rev 1735) +++ trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py 2009-11-30 21:31:56 UTC (rev 1736) @@ -18,12 +18,184 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -from PyQt4 import QtGui, QtCore +from PyQt4 import QtGui, QtCore, Qt import dbus from ffado.widgets.matrixmixer import MatrixMixer from ffado.widgets.crossbarrouter import * +from ffado.config import * + +class BooleanControl: + def __init__(self, hw, path): + self.iface = dbus.Interface( + hw.bus.get_object(hw.servername, path), + dbus_interface="org.ffado.Control.Element.Boolean") + self.value = self.iface.selected() + + def selected(self): + return self.value + + def select(self, n): + if self.iface.select(n): + self.value = n + return True + return False + +class DiscreteControl: + def __init__(self, hw, path): + self.iface = dbus.Interface( + hw.bus.get_object(hw.servername, path), + dbus_interface="org.ffado.Control.Element.Discrete") + self.value = self.iface.getValue() + + def getvalue(self): + return self.value + + def setvalue(self, v): + if v != self.value: + self.iface.setValue(v) + self.value = v + +class MonitoringModel(QtCore.QAbstractTableModel): + def __init__(self, hw, parent): + QtCore.QAbstractTableModel.__init__(self, parent) + + self.hw = hw + + self.mutestates = ("Global", "True", "False") + + self.globaldims = [] + self.globalmutes = [] + self.perchannelmutes = [] + self.globalvolumes = [] + self.perchannelvolumes = [] + for i in range(10): + self.globaldims.append(BooleanControl(self.hw, self.hw.basepath + ("/EAP/Monitoring/GlobalDim/AffectsCh%i" % i))) + self.globalmutes.append(BooleanControl(self.hw, self.hw.basepath + ("/EAP/Monitoring/GlobalMute/AffectsCh%i" % i))) + self.perchannelmutes.append(BooleanControl(self.hw, self.hw.basepath + ("/EAP/Monitoring/PerChannel/Mute%i" % i))) + self.globalvolumes.append(BooleanControl(self.hw, self.hw.basepath + ("/EAP/Monitoring/GlobalVolume/AffectsCh%i" % i))) + self.perchannelvolumes.append(DiscreteControl(self.hw, self.hw.basepath + ("/EAP/Monitoring/PerChannel/Volume%i" % i))) + + def rowCount(self, parent): + return 3 + + def columnCount(self, parent): + return 10 + + def headerData(self, section, orientation, role=Qt.Qt.DisplayRole): + if role != Qt.Qt.DisplayRole: + #print "headerData will return nothing" + return None + #print "headerData() Will return a label" + if orientation == Qt.Qt.Horizontal: + return "Ch. %i" % section + if orientation == Qt.Qt.Vertical: + return ("Mute", "Dim", "Volume")[section] + return None + + def data(self, index, role): + if not role in (Qt.Qt.DisplayRole, Qt.Qt.EditRole): + return None + row = index.row() + col = index.column() + if role == Qt.Qt.DisplayRole: + if row is 0: + if self.perchannelmutes[col].selected(): + return self.mutestates[1] + else: + if self.globalmutes[col].selected(): + return self.mutestates[0] + return self.mutestates[2] + if row is 1: + if self.globaldims[col].selected(): + return "Enabled" + else: + return "Disabled" + if row is 2: + if self.globalvolumes[col].selected(): + return "Global" + else: + return self.perchannelvolumes[col].getvalue() + if role == Qt.Qt.EditRole: + if row is 0: + return QtCore.QStringList(self.mutestates) + if row is 1: + return QtCore.QStringList(("Enabled","Disabled")) + if row is 2: + if self.globalvolumes[col].selected(): + return 1 + return self.perchannelvolumes[col].getvalue() + return "%i,%i" % (row,col) + + def setData(self, index, value, role=Qt.Qt.EditRole): + col = index.column() + row = index.row() + if row == 0: + if value == "Global": + self.globalmutes[col].select(True) + self.perchannelmutes[col].select(False) + else: + self.globalmutes[col].select(False) + if value == "True": value = True + if value == "False": value = False + self.perchannelmutes[col].select(value) + return True + if row == 1: + if value == "Enabled": value = True + if value == "Disabled": value = False + return self.globaldims[col].select(value) + if row == 2: + #print "setData() value=%s" % value.toString() + v = int(value.toString()) + #print " integer is %i" % v + if v > 0: + return self.globalvolumes[col].select(True) + else: + self.globalvolumes[col].select(False) + self.perchannelvolumes[col].setvalue(v) + return False + + def flags(self, index): + ret = QtCore.QAbstractTableModel.flags(self, index) + if index.row() in (0,1,2): + ret |= Qt.Qt.ItemIsEditable + return ret + + + +class MonitoringDelegate(QtGui.QStyledItemDelegate): + def __init__(self, parent): + QtGui.QStyledItemDelegate.__init__(self, parent) + + def createEditor(self, parent, option, index): + if index.data(Qt.Qt.EditRole).type() == QtCore.QVariant.StringList: + combo = QtGui.QComboBox(parent) + self.connect(combo, QtCore.SIGNAL("activated(int)"), self.currentChanged) + return combo + else: + return QtGui.QStyledItemDelegate.createEditor(self, parent, option, index) + + def setEditorData(self, editor, index): + if isinstance(editor, QtGui.QComboBox): + list = index.data(Qt.Qt.EditRole).toStringList() + editor.addItems(list) + editor.setCurrentIndex(list.indexOf(index.data(Qt.Qt.DisplayRole).toString())) + else: + QtGui.QStyledItemDelegate.setEditorData(self, editor, index) + + def setModelData(self, editor, model, index): + if isinstance(editor, QtGui.QComboBox): + model.setData(index, editor.currentText(), Qt.Qt.EditRole) + else: + QtGui.QStyledItemDelegate.setModelData(self, editor, model, index) + + def currentChanged(self): + #print "currentChanged() sender=%s" % (str(self.sender())) + editor = self.sender() + self.emit(QtCore.SIGNAL("commitData(QWidget*)"), editor) + self.emit(QtCore.SIGNAL("closeEditor(QWidget*)"), editor) + class Saffire_Dice(QtGui.QWidget): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) @@ -47,9 +219,60 @@ scrollarea.setWidget(self.router) self.tabs.addTab(scrollarea, "Routing") + model = MonitoringModel(self.hw, self) + + widget = QtGui.QWidget() + uicLoad("ffado/mixer/saffire_dice_monitoring.ui", widget) + widget.monitoringView.setModel(model) + widget.monitoringView.setItemDelegate(MonitoringDelegate(self)) + self.tabs.addTab(widget, "Monitoring") + + self.muteInterface = BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalMute/State") + widget.btnMute.setChecked(self.muteInterface.selected()) + self.connect(widget.btnMute, QtCore.SIGNAL("toggled(bool)"), self.muteToggle) + self.dimInterface = BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalDim/State") + widget.btnDim.setChecked(self.dimInterface.selected()) + self.connect(widget.btnDim, QtCore.SIGNAL("toggled(bool)"), self.dimToggle) + + self.dimLevelInterface = DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalDim/Level") + widget.dimLevel.setValue(self.dimLevelInterface.getvalue()) + self.connect(widget.dimLevel, QtCore.SIGNAL("valueChanged(int)"), self.dimLevelChanged) + self.volumeInterface = DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalVolume/Level") + widget.volumeKnob.setValue(self.volumeInterface.getvalue()) + self.connect(widget.volumeKnob, QtCore.SIGNAL("valueChanged(int)"), self.volumeChanged) + + if self.configrom.getModelName() == "SAFFIRE_PRO_24": + self.ch1inst = BooleanControl(self.hw, self.hw.basepath + "/EAP/Ch1LineInst") + widget.chkInst1.setChecked(self.ch1inst.selected()) + self.connect(widget.chkInst1, QtCore.SIGNAL("toggled(bool)"), self.ch1inst.select) + self.ch2inst = BooleanControl(self.hw, self.hw.basepath + "/EAP/Ch2LineInst") + widget.chkInst2.setChecked(self.ch2inst.selected()) + self.connect(widget.chkInst2, QtCore.SIGNAL("toggled(bool)"), self.ch2inst.select) + self.ch3level = BooleanControl(self.hw, self.hw.basepath + "/EAP/Ch3Level") + widget.chkLevel3.setChecked(self.ch3level.selected()) + self.connect(widget.chkLevel3, QtCore.SIGNAL("toggled(bool)"), self.ch3level.select) + self.ch4level = BooleanControl(self.hw, self.hw.basepath + "/EAP/Ch4Level") + widget.chkLevel4.setChecked(self.ch4level.selected()) + self.connect(widget.chkLevel4, QtCore.SIGNAL("toggled(bool)"), self.ch4level.select) + else: + widget.chkInst1.deleteLater() + widget.chkInst2.deleteLater() + widget.chkLevel3.deleteLater() + widget.chkLevel4.deleteLater() + + + def muteToggle(self, mute): + self.muteInterface.select(mute) + def dimToggle(self, mute): + self.dimInterface.select(mute) + + def dimLevelChanged(self, value): + self.dimLevelInterface.setvalue(value) + def volumeChanged(self, value): + self.volumeInterface.setvalue(value) + def getDisplayTitle(self): return "Saffire PRO40/PRO24 Mixer" - # # vim: et ts=4 sw=4 Added: trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui =================================================================== --- trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui (rev 0) +++ trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui 2009-11-30 21:31:56 UTC (rev 1736) @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>599</width> + <height>657</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QSplitter" name="splitter"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <widget class="QTableView" name="monitoringView"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QWidget" name="layoutWidget"> + <layout class="QGridLayout" name="gridLayout"> + <item row="2" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Dim Level:</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="buddy"> + <cstring>dimLevel</cstring> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="dimLevel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="suffix"> + <string> dB</string> + </property> + <property name="minimum"> + <number>-127</number> + </property> + <property name="maximum"> + <number>0</number> + </property> + </widget> + </item> + <item row="0" column="2" rowspan="5"> + <widget class="QGroupBox" name="groupBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>4</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Volume</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + <property name="checkable"> + <bool>false</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QDial" name="volumeKnob"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>4</verstretch> + </sizepolicy> + </property> + <property name="minimum"> + <number>-127</number> + </property> + <property name="maximum"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="volumeBox"> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="suffix"> + <string> dB</string> + </property> + <property name="minimum"> + <number>-127</number> + </property> + <property name="maximum"> + <number>0</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="3" column="0" colspan="2"> + <widget class="QPushButton" name="btnDim"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>4</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Dim</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> + <widget class="QPushButton" name="btnMute"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>4</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Mute</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="chkInst1"> + <property name="text"> + <string>Ch 1 Instrument</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QCheckBox" name="chkLevel3"> + <property name="text"> + <string>Ch 3 High Level</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QCheckBox" name="chkInst2"> + <property name="text"> + <string>Ch 2 Instrument</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QCheckBox" name="chkLevel4"> + <property name="text"> + <string>Ch 4 High Level</string> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>volumeKnob</sender> + <signal>valueChanged(int)</signal> + <receiver>volumeBox</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>492</x> + <y>531</y> + </hint> + <hint type="destinationlabel"> + <x>488</x> + <y>635</y> + </hint> + </hints> + </connection> + <connection> + <sender>volumeBox</sender> + <signal>valueChanged(int)</signal> + <receiver>volumeKnob</receiver> + <slot>setValue(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>551</x> + <y>630</y> + </hint> + <hint type="destinationlabel"> + <x>559</x> + <y>539</y> + </hint> + </hints> + </connection> + </connections> +</ui> |
From: <trac@ff...> - 2009-11-25 21:09:50
|
Author: arnonym Date: 2009-11-25 13:09:04 -0800 (Wed, 25 Nov 2009) New Revision: 1735 Modified: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp Log: Lots more controls. Should be ready for the gui now... Modified: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/focusrite_eap.cpp 2009-11-24 22:30:28 UTC (rev 1734) +++ trunk/libffado/src/dice/focusrite/focusrite_eap.cpp 2009-11-25 21:09:04 UTC (rev 1735) @@ -43,12 +43,13 @@ return m_value; } bool FocusriteEAP::Poti::setValue(int n) { - if ( n == m_value ) + if (n == m_value) return true; + m_value = n; return m_eap->writeApplicationReg(m_offset, -n); - //return false; } + FocusriteEAP::FocusriteEAP(Dice::Device& dev) : Dice::Device::EAP(dev) { } @@ -71,7 +72,7 @@ , m_activevalue(activevalue) { m_eap->readApplicationReg(m_offset, &m_state_tmp); - printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); + printf("%s: %s\n", name.c_str(), (m_state_tmp&m_activevalue)?"true":"false"); debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); m_selected = (m_state_tmp&m_activevalue)?true:false; } @@ -90,40 +91,115 @@ } +class VolumeControl : public Control::Discrete +{ +public: + VolumeControl(FocusriteEAP* eap, std::string name, size_t offset, int bitshift) + : Control::Discrete(eap, name) + , m_eap(eap) + , m_offset(offset) + , m_bitshift(bitshift) + { + quadlet_t tmp; + m_eap->readApplicationReg(m_offset, &tmp); + m_value = - ((tmp>>m_bitshift)&0xff); + printf("%s: %i -> %i\n", name.c_str(), tmp, m_value); + } + int getValue(int) { return getValue(); } + bool setValue(int, int n) { return setValue(n); } + + int getMinimum() { return -255; } + int getMaximum() { return 0; } + + int getValue() { return m_value; } + bool setValue(int n) { + if (n == m_value) + return true; + m_value = n; + return m_eap->writeApplicationReg(m_offset, (-n)<<m_bitshift); + } +private: + FocusriteEAP* m_eap; + size_t m_offset; + int m_bitshift; + int m_value; +}; + + FocusriteEAP::MonitorSection::MonitorSection(Dice::Focusrite::FocusriteEAP* eap, std::string name) : Control::Container(eap, name) , m_eap(eap) , m_monitorlevel(0) , m_dimlevel(0) { - m_mute = new Switch(m_eap, "Mute", 0x0C, 1); - addElement(m_mute); - m_dim = new Switch(m_eap, "Dim", 0x10, 1); - addElement(m_dim); + Control::Container* grp_globalmute = new Control::Container(m_eap, "GlobalMute"); + addElement(grp_globalmute); + m_mute = new Switch(m_eap, "State", 0x0C, 1); + grp_globalmute->addElement(m_mute); + + Control::Container* grp_globaldim = new Control::Container(m_eap, "GlobalDim"); + addElement(grp_globaldim); + m_dim = new Switch(m_eap, "State", 0x10, 1); + grp_globaldim->addElement(m_dim); + m_dimlevel = m_eap->getDimPoti("Level"); + grp_globaldim->addElement(m_dimlevel); + + Control::Container* grp_mono = new Control::Container(m_eap, "Mono"); + addElement(grp_mono); + + Control::Container* grp_globalvolume = new Control::Container(m_eap, "GlobalVolume"); + addElement(grp_globalvolume); + m_monitorlevel = m_eap->getMonitorPoti("Level"); + grp_globalvolume->addElement(m_monitorlevel); + + Control::Container* grp_perchannel = new Control::Container(m_eap, "PerChannel"); + addElement(grp_perchannel); + for (int i=0; i<10; ++i) { std::stringstream stream; - stream << "MuteAffectsCh" << i; + stream << "AffectsCh" << i; Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<i); - addElement(s); - m_mute_affected.push_back(s); - stream.str(std::string()); - stream << "DimAffectsCh" << i; + grp_globalmute->addElement(s); + //m_mute_affected.push_back(s); s = new Switch(m_eap, stream.str(), 0x3C, 1<<(10+i)); - addElement(s); - m_dim_affected.push_back(s); + grp_globaldim->addElement(s); + //m_dim_affected.push_back(s); } for (int i=0; i<5; ++i) { std::stringstream stream; - stream << "Mono_" << i*2 << "_" << i*2+1; + stream << "Ch" << i*2 << "Ch" << i*2+1; Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<(20+i)); - addElement(s); - m_mono.push_back(s); + grp_mono->addElement(s); + //m_mono.push_back(s); + + stream.str(std::string()); + stream << "AffectsCh" << i*2; + s = new Switch(m_eap, stream.str(), 0x28+i*4, 1); + grp_globalvolume->addElement(s); + stream.str(std::string()); + stream << "AffectsCh" << i*2+1; + s = new Switch(m_eap, stream.str(), 0x28+i*4, 2); + grp_globalvolume->addElement(s); + + stream.str(std::string()); + stream << "Mute" << i*2; + s = new Switch(m_eap, stream.str(), 0x28+i*4, 4); + grp_perchannel->addElement(s); + stream.str(std::string()); + stream << "Mute" << i*2+1; + s = new Switch(m_eap, stream.str(), 0x28+i*4, 8); + grp_perchannel->addElement(s); + + stream.str(std::string()); + stream << "Volume" << i*2; + VolumeControl* vol = new VolumeControl(m_eap, stream.str(), 0x14+i*4, 0); + grp_perchannel->addElement(vol); + stream.str(std::string()); + stream << "Volume" << i*2+1; + vol = new VolumeControl(m_eap, stream.str(), 0x14+i*4, 8); + grp_perchannel->addElement(vol); } - m_monitorlevel = m_eap->getMonitorPoti("MonitorLevel"); - addElement(m_monitorlevel); - m_dimlevel = m_eap->getDimPoti("DimLevel"); - addElement(m_dimlevel); } } |
From: <trac@ff...> - 2009-11-23 22:09:21
|
Author: arnonym Date: 2009-11-23 14:08:40 -0800 (Mon, 23 Nov 2009) New Revision: 1732 Modified: trunk/libffado/src/SConscript Log: Forgot to commit this file. Otherwise r1730 doesn't compile. Modified: trunk/libffado/src/SConscript =================================================================== --- trunk/libffado/src/SConscript 2009-11-23 22:05:19 UTC (rev 1731) +++ trunk/libffado/src/SConscript 2009-11-23 22:08:40 UTC (rev 1732) @@ -158,6 +158,7 @@ dice_source = env.Split( '\ dice/dice_avdevice.cpp \ dice/dice_eap.cpp \ + dice/focusrite/focusrite_eap.cpp \ dice/focusrite/saffire_pro40.cpp \ dice/focusrite/saffire_pro24.cpp \ ' ) |
From: <trac@ff...> - 2009-11-23 22:06:03
|
Author: arnonym Date: 2009-11-23 14:05:19 -0800 (Mon, 23 Nov 2009) New Revision: 1731 Modified: trunk/libffado/src/libieee1394/IsoHandler.cpp trunk/libffado/src/libieee1394/IsoHandler.h trunk/libffado/src/libieee1394/IsoHandlerManager.cpp Log: Looks as if this doesn't break using the old stack. see #240 Modified: trunk/libffado/src/libieee1394/IsoHandler.cpp =================================================================== --- trunk/libffado/src/libieee1394/IsoHandler.cpp 2009-11-23 21:55:36 UTC (rev 1730) +++ trunk/libffado/src/libieee1394/IsoHandler.cpp 2009-11-23 22:05:19 UTC (rev 1731) @@ -84,7 +84,6 @@ , m_Client( 0 ) , m_speed( RAW1394_ISO_SPEED_400 ) , m_prebuffers( 0 ) - , m_dont_exit_iterate_loop( true ) , m_State( eHS_Stopped ) , m_NextState( eHS_Stopped ) , m_switch_on_cycle(0) @@ -420,22 +419,8 @@ #endif // iterate the client if required - if(m_Client) { - enum raw1394_iso_disposition retval = m_Client->putPacket(data, length, channel, tag, sy, pkt_ctr, dropped_cycles); - if (retval == RAW1394_ISO_OK) { - if (m_dont_exit_iterate_loop) { - return RAW1394_ISO_OK; - } else { - m_dont_exit_iterate_loop = true; - debugOutput(DEBUG_LEVEL_VERBOSE, - "(%p) loop exit requested\n", - this); - return RAW1394_ISO_DEFER; - } - } else { - return retval; - } - } + if(m_Client) + return m_Client->putPacket(data, length, channel, tag, sy, pkt_ctr, dropped_cycles); return RAW1394_ISO_OK; } @@ -566,19 +551,7 @@ this, getTypeString(), *length, m_max_packet_size); } #endif - if (retval == RAW1394_ISO_OK) { - if (m_dont_exit_iterate_loop) { - return RAW1394_ISO_OK; - } else { - m_dont_exit_iterate_loop = true; - debugOutput(DEBUG_LEVEL_VERBOSE, - "(%p) loop exit requested\n", - this); - return RAW1394_ISO_DEFER; - } - } else { return retval; - } } *tag = 0; Modified: trunk/libffado/src/libieee1394/IsoHandler.h =================================================================== --- trunk/libffado/src/libieee1394/IsoHandler.h 2009-11-23 21:55:36 UTC (rev 1730) +++ trunk/libffado/src/libieee1394/IsoHandler.h 2009-11-23 22:05:19 UTC (rev 1731) @@ -142,22 +142,7 @@ bool canIterateClient(); // FIXME: implement with functor - /** - * @brief request that the handler exits the packet processing loop ASAP - * - * The raw1394 lib doesn't provide a means to stop the packet iteration loop - * except when the iterate callback returns a DEFER value. Calling this function - * will make the callback return DEFER ASAP. - */ - void requestIterateLoopExit() {m_dont_exit_iterate_loop = false;}; - /** - * @brief allow the handler to stay in the packet processing loop - * - * This resets the state set by requestIterateLoopExit() - */ - void allowIterateLoop() {m_dont_exit_iterate_loop = true;}; - /** * @brief get last cycle number seen by handler * @return cycle number @@ -202,7 +187,6 @@ enum raw1394_iso_speed m_speed; unsigned int m_prebuffers; - bool m_dont_exit_iterate_loop; // the state machine enum EHandlerStates { Modified: trunk/libffado/src/libieee1394/IsoHandlerManager.cpp =================================================================== --- trunk/libffado/src/libieee1394/IsoHandlerManager.cpp 2009-11-23 21:55:36 UTC (rev 1730) +++ trunk/libffado/src/libieee1394/IsoHandlerManager.cpp 2009-11-23 22:05:19 UTC (rev 1731) @@ -255,9 +255,6 @@ if (h->canIterateClient()) { events = POLLIN | POLLPRI; no_one_to_poll = false; - // if we are going to poll() it, let's ensure - // it can run until someone wants it to exit - h->allowIterateLoop(); } m_poll_fds_shadow[i].events = events; } |
From: <trac@ff...> - 2009-11-23 21:56:18
|
Author: arnonym Date: 2009-11-23 13:55:36 -0800 (Mon, 23 Nov 2009) New Revision: 1730 Added: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp trunk/libffado/src/dice/focusrite/focusrite_eap.h Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp trunk/libffado/src/dice/focusrite/saffire_pro24.h Log: Save code by creating another class. Next step is unified monitoring and switches for both the pro40 and the pro24. Copied: trunk/libffado/src/dice/focusrite/focusrite_eap.cpp (from rev 1726, trunk/libffado/src/dice/focusrite/saffire_pro24.cpp) =================================================================== --- trunk/libffado/src/dice/focusrite/focusrite_eap.cpp (rev 0) +++ trunk/libffado/src/dice/focusrite/focusrite_eap.cpp 2009-11-23 21:55:36 UTC (rev 1730) @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2009 by Pieter Palmers + * Copyright (C) 2009 by Arnold Krille + * + * 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 <http://www.gnu.org/licenses/>. + * + */ + +#include "focusrite_eap.h" + +namespace Dice { +namespace Focusrite { + +const int msgSet = 0x68; + +FocusriteEAP::FocusriteEAP(Dice::Device& dev) : Dice::Device::EAP(dev) { +} + +bool FocusriteEAP::readApplicationReg(unsigned offset, quadlet_t* quadlet) { + return readReg(eRT_Application, offset, quadlet); +} +bool FocusriteEAP::writeApplicationReg(unsigned offset, quadlet_t quadlet) { + bool ret = writeReg(eRT_Application, offset, quadlet); + if (!ret) return false; + return writeReg(eRT_Application, msgSet, commandToFix(offset)); +} + + +FocusriteEAP::Switch::Switch(Dice::Focusrite::FocusriteEAP* eap, std::string name, size_t offset, int activevalue ) + : Control::Boolean(eap, name) + , m_eap(eap) + , m_selected(0) + , m_offset(offset) + , m_activevalue(activevalue) +{ + m_eap->readApplicationReg(m_offset, &m_state_tmp); + printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); + debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); + m_selected = (m_state_tmp&m_activevalue)?true:false; +} + +bool FocusriteEAP::Switch::selected() { + return m_selected; +} + +bool FocusriteEAP::Switch::select(bool n) { + if ( n != m_selected ) { + m_selected = n; + m_eap->readApplicationReg(m_offset, &m_state_tmp); + m_eap->writeApplicationReg(m_offset, m_state_tmp^m_activevalue); + } + return true; +} + + + +FocusriteEAP::MonitorSection::MonitorSection(Dice::Focusrite::FocusriteEAP* eap, std::string name) + : Control::Container(eap, name) + , m_eap(eap) +{ + m_mute = new Switch(m_eap, "Mute", 0x0C, 1); + addElement(m_mute); + m_dim = new Switch(m_eap, "Dim", 0x10, 1); + addElement(m_dim); + for (int i=0; i<10; ++i) { + std::stringstream stream; + stream << "MuteAffectsCh" << i; + Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<i); + addElement(s); + m_mute_affected.push_back(s); + stream.str(std::string()); + stream << "DimAffectsCh" << i; + s = new Switch(m_eap, stream.str(), 0x3C, 1<<(10+i)); + addElement(s); + m_dim_affected.push_back(s); + } + for (int i=0; i<5; ++i) { + std::stringstream stream; + stream << "Mono_" << i*2 << "_" << i*2+1; + Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<(20+i)); + addElement(s); + m_mono.push_back(s); + } +} + +} +} + +// vim: et Copied: trunk/libffado/src/dice/focusrite/focusrite_eap.h (from rev 1726, trunk/libffado/src/dice/focusrite/saffire_pro24.h) =================================================================== --- trunk/libffado/src/dice/focusrite/focusrite_eap.h (rev 0) +++ trunk/libffado/src/dice/focusrite/focusrite_eap.h 2009-11-23 21:55:36 UTC (rev 1730) @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2009 by Pieter Palmers + * Copyright (C) 2009 by Arnold Krille + * + * 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 <http://www.gnu.org/licenses/>. + * + */ + +#ifndef DICE_FOCUSRITE_FOCUSRITE_EAP_H +#define DICE_FOCUSRITE_FOCUSRITE_EAP_H + +#include "dice/dice_avdevice.h" + +#include "libieee1394/configrom.h" + +namespace Dice { +namespace Focusrite { + +class FocusriteEAP : public Dice::Device::EAP +{ +public: + /** + * @brief A standard-switch for boolean. + * + * If you don't like True and False for the labels, subclass and return your own. + */ + class Switch : public Control::Boolean + { + public: + Switch(Dice::Focusrite::FocusriteEAP*, std::string name, size_t offset, int activevalue); + + bool selected(); + bool select(bool); + + private: + Dice::Focusrite::FocusriteEAP* m_eap; + bool m_selected; + size_t m_offset; + int m_activevalue; + fb_quadlet_t m_state_tmp; + }; + + class MonitorSection : public Control::Container + { + public: + MonitorSection(Dice::Focusrite::FocusriteEAP*, std::string name); + + private: + Dice::Focusrite::FocusriteEAP* m_eap; + Switch *m_mute, *m_dim; + std::vector<Switch*> m_mute_affected; + std::vector<Switch*> m_dim_affected; + std::vector<Switch*> m_mono; + }; + + +public: + FocusriteEAP(Dice::Device&); + + bool readApplicationReg(unsigned offset, quadlet_t*); + bool writeApplicationReg(unsigned offset, quadlet_t); + +protected: + virtual int commandToFix(unsigned offset) =0; +}; + +} +} + +#endif +// vim: et Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-23 21:50:44 UTC (rev 1729) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-23 21:55:36 UTC (rev 1730) @@ -23,60 +23,35 @@ */ #include "saffire_pro24.h" +#include "focusrite_eap.h" namespace Dice { namespace Focusrite { -const int msgSet = 0x68; - -SaffirePro24::Switch::Switch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue ) - : Control::Boolean(eap, name) - , m_eap(eap) - , m_selected(0) - , m_offset(offset) - , m_activevalue(activevalue) -{ - m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); - printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); - debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); - m_selected = (m_state_tmp&m_activevalue)?true:false; +int SaffirePro24::SaffirePro24EAP::commandToFix(unsigned offset) { + if (offset<0x14) return 2; + if (offset<0x3C && offset>=0x14) return 1; + if (offset<0x40 && offset>=0x3C) return 3; + if (offset<0x60 && offset>=0x58) return 4; + return 0; } -bool SaffirePro24::Switch::selected() { - return m_selected; -} -bool SaffirePro24::Switch::select(bool n) { - if ( n != m_selected ) { - m_selected = n; - m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); - m_eap->writeReg(Dice::Device::EAP::eRT_Application, m_offset, m_state_tmp^m_activevalue); - int msg = 0; - if (m_offset<0x14) msg = 2; - if (m_offset<0x3C && m_offset>=0x14) msg = 1; - if (m_offset<0x40 && m_offset>=0x3C) msg = 3; - if (m_offset<0x60 && m_offset>=0x58) msg = 4; - debugOutput(DEBUG_LEVEL_VERBOSE, "Switch will write the msg %i.\n", msg); - m_eap->writeReg(Dice::Device::EAP::eRT_Application, msgSet, msg); - } - return true; -} - -class SaffirePro24::LineInstSwitch : public Switch +class SaffirePro24::LineInstSwitch : public Dice::Focusrite::FocusriteEAP::Switch { public: - LineInstSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) - : Switch(eap, name, offset, activevalue) {} + LineInstSwitch(Dice::Focusrite::FocusriteEAP* eap, std::string name, size_t offset, int activevalue) + : Dice::Focusrite::FocusriteEAP::Switch(eap, name, offset, activevalue) {} std::string getBooleanLabel(bool n) { if ( n ) return "Instrument"; return "Line"; } }; -class SaffirePro24::LevelSwitch : public Switch +class SaffirePro24::LevelSwitch : public Dice::Focusrite::FocusriteEAP::Switch { public: - LevelSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) - : Switch(eap, name, offset, activevalue) {} + LevelSwitch(Dice::Focusrite::FocusriteEAP* eap, std::string name, size_t offset, int activevalue) + : Dice::Focusrite::FocusriteEAP::Switch(eap, name, offset, activevalue) {} std::string getBooleanLabel(bool n) { if ( n ) return "High"; return "Low"; @@ -119,16 +94,17 @@ //getEAP()->readRegBlock(Dice::Device::EAP::eRT_Command, 0x00, tmp, 2*sizeof(fb_quadlet_t)); // DEBUG //hexDumpQuadlets(tmp, 2); // DEBUG - m_ch1 = new LineInstSwitch(getEAP(), "Ch1LineInst", 0x58, 2); + FocusriteEAP* eap = dynamic_cast<FocusriteEAP*>(getEAP()); + m_ch1 = new LineInstSwitch(eap, "Ch1LineInst", 0x58, 2); getEAP()->addElement(m_ch1); - m_ch2 = new LineInstSwitch(getEAP(), "Ch2LineInst", 0x58, 2<<16); + m_ch2 = new LineInstSwitch(eap, "Ch2LineInst", 0x58, 2<<16); getEAP()->addElement(m_ch2); - m_ch3 = new LevelSwitch(getEAP(), "Ch3Level", 0x5C, 1); + m_ch3 = new LevelSwitch(eap, "Ch3Level", 0x5C, 1); getEAP()->addElement(m_ch3); - m_ch4 = new LevelSwitch(getEAP(), "Ch4Level", 0x5C, 1<<16); + m_ch4 = new LevelSwitch(eap, "Ch4Level", 0x5C, 1<<16); getEAP()->addElement(m_ch4); - m_monitor = new MonitorSection(getEAP(), "Monitoring"); + m_monitor = new FocusriteEAP::MonitorSection(eap, "Monitoring"); getEAP()->addElement(m_monitor); return true; } @@ -140,6 +116,9 @@ debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro24\n"); Dice::Device::showDevice(); } +Dice::Device::EAP* SaffirePro24::createEAP() { + return new SaffirePro24EAP(*this); +} bool SaffirePro24::setNickName( std::string name ) { return getEAP()->writeRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name.c_str(), name.size() ); @@ -151,37 +130,7 @@ return std::string( name ); } - -SaffirePro24::MonitorSection::MonitorSection(Dice::Device::EAP* eap, std::string name) - : Control::Container(eap, name) - , m_eap(eap) -{ - m_mute = new Switch(m_eap, "Mute", 0x0C, 1); - addElement(m_mute); - m_dim = new Switch(m_eap, "Dim", 0x10, 1); - addElement(m_dim); - for (int i=0; i<10; ++i) { - std::stringstream stream; - stream << "MuteAffectsCh" << i; - Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<i); - addElement(s); - m_mute_affected.push_back(s); - stream.str(std::string()); - stream << "DimAffectsCh" << i; - s = new Switch(m_eap, stream.str(), 0x3C, 1<<(10+i)); - addElement(s); - m_dim_affected.push_back(s); - } - for (int i=0; i<5; ++i) { - std::stringstream stream; - stream << "Mono_" << i*2 << "_" << i*2+1; - Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<(20+i)); - addElement(s); - m_mono.push_back(s); - } } - } -} // vim: et Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.h =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-23 21:50:44 UTC (rev 1729) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-23 21:55:36 UTC (rev 1730) @@ -29,6 +29,8 @@ #include "libieee1394/configrom.h" +#include "focusrite_eap.h" + namespace Dice { namespace Focusrite { @@ -46,47 +48,23 @@ bool setNickName( std::string name ); std::string getNickName(); - /** - * @brief A standard-switch for boolean. - * - * If you don't like True and False for the labels, subclass and return your own. - */ - class Switch : public Control::Boolean - { - protected: - friend class Dice::Focusrite::SaffirePro24; +private: - Switch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); + class SaffirePro24EAP : public FocusriteEAP + { public: - bool selected(); - bool select(bool); - private: - Dice::Device::EAP* m_eap; - bool m_selected; - size_t m_offset; - int m_activevalue; - fb_quadlet_t m_state_tmp; - }; + SaffirePro24EAP(Dice::Device& dev) : FocusriteEAP(dev) { + } - class MonitorSection : public Control::Container - { - protected: - friend class Dice::Focusrite::SaffirePro24; - - MonitorSection(Dice::Device::EAP*, std::string name); - private: - Dice::Device::EAP* m_eap; - Switch *m_mute, *m_dim; - std::vector<Switch*> m_mute_affected; - std::vector<Switch*> m_dim_affected; - std::vector<Switch*> m_mono; + int commandToFix(unsigned offset); }; -private: + Dice::Device::EAP* createEAP(); + class LineInstSwitch; LineInstSwitch *m_ch1, *m_ch2; class LevelSwitch; LevelSwitch *m_ch3, *m_ch4; - MonitorSection *m_monitor; + Dice::Focusrite::FocusriteEAP::MonitorSection *m_monitor; }; } |
From: <trac@ff...> - 2009-11-23 21:51:26
|
Author: arnonym Date: 2009-11-23 13:50:44 -0800 (Mon, 23 Nov 2009) New Revision: 1729 Modified: trunk/libffado/src/dice/focusrite/saffire_pro40.cpp trunk/libffado/src/dice/focusrite/saffire_pro40.h Log: This should enable nickname changes for the saffire pro40. ppalmers can you test this? On the pro24 the changes work and are written to the application space. Only they don't seem to last over a power-cycle. Don't yet know why... Modified: trunk/libffado/src/dice/focusrite/saffire_pro40.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro40.cpp 2009-11-23 21:40:01 UTC (rev 1728) +++ trunk/libffado/src/dice/focusrite/saffire_pro40.cpp 2009-11-23 21:50:44 UTC (rev 1729) @@ -45,5 +45,15 @@ Dice::Device::showDevice(); } +bool SaffirePro40::setNickName(std::string name) { + return getEAP()->writeRegBlock(Dice::Device::EAP::eRT_Application, 0x44, (quadlet_t*)name.c_str(), name.size()); } +std::string SaffirePro40::getNickName() { + char name[16]; + getEAP()->readRegBlock(Dice::Device::EAP::eRT_Application, 0x44, (quadlet_t*)name, 16); + return std::string(name); } + +} +} +// vim: et Modified: trunk/libffado/src/dice/focusrite/saffire_pro40.h =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro40.h 2009-11-23 21:40:01 UTC (rev 1728) +++ trunk/libffado/src/dice/focusrite/saffire_pro40.h 2009-11-23 21:50:44 UTC (rev 1729) @@ -39,6 +39,10 @@ virtual void showDevice(); + bool canChangeNickname() { return true; } + bool setNickName(std::string); + std::string getNickName(); + private: }; @@ -46,3 +50,4 @@ } #endif +// vim: et |
From: <trac@ff...> - 2009-11-23 21:40:45
|
Author: arnonym Date: 2009-11-23 13:40:01 -0800 (Mon, 23 Nov 2009) New Revision: 1728 Modified: trunk/libffado/src/dice/focusrite/ Log: ignore me Property changes on: trunk/libffado/src/dice/focusrite ___________________________________________________________________ Name: svn:ignore - *.os + *.os .*.swp |
From: <trac@ff...> - 2009-11-23 21:39:25
|
Author: arnonym Date: 2009-11-23 13:38:45 -0800 (Mon, 23 Nov 2009) New Revision: 1727 Modified: trunk/libffado/src/dice/dice_avdevice.cpp trunk/libffado/src/dice/dice_avdevice.h Log: Introduce a virtual factory function. That way subclasses can have subclassed EAPs created. Like EAPs dealing with the special Focusrite extensions... Modified: trunk/libffado/src/dice/dice_avdevice.cpp =================================================================== --- trunk/libffado/src/dice/dice_avdevice.cpp 2009-11-22 21:42:57 UTC (rev 1726) +++ trunk/libffado/src/dice/dice_avdevice.cpp 2009-11-23 21:38:45 UTC (rev 1727) @@ -163,7 +163,7 @@ bool supports_eap = Device::EAP::supportsEAP(*this); if (supports_eap) { // FIXME: move to buildMixer() ?? - m_eap = new Device::EAP(*this); + m_eap = createEAP(); if(m_eap == NULL) { debugError("Failed to allocate EAP.\n"); return false; @@ -183,6 +183,11 @@ return true; } +Device::EAP* +Device::createEAP() { + return new Device::EAP(*this); +} + enum Device::eDiceConfig Device::getCurrentConfig() { Modified: trunk/libffado/src/dice/dice_avdevice.h =================================================================== --- trunk/libffado/src/dice/dice_avdevice.h 2009-11-22 21:42:57 UTC (rev 1726) +++ trunk/libffado/src/dice/dice_avdevice.h 2009-11-23 21:38:45 UTC (rev 1727) @@ -548,6 +548,8 @@ // EAP stuff private: EAP* m_eap; +protected: + virtual EAP* createEAP(); public: EAP* getEAP() {return m_eap;}; |
From: <trac@ff...> - 2009-11-22 21:43:37
|
Author: arnonym Date: 2009-11-22 13:42:57 -0800 (Sun, 22 Nov 2009) New Revision: 1726 Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp trunk/libffado/src/dice/focusrite/saffire_pro24.h Log: Access more switches of the pro24. Dim and Mute work, Mono-monitoring somehow doesn't (yet). Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-22 21:40:24 UTC (rev 1725) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-22 21:42:57 UTC (rev 1726) @@ -29,6 +29,60 @@ const int msgSet = 0x68; +SaffirePro24::Switch::Switch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue ) + : Control::Boolean(eap, name) + , m_eap(eap) + , m_selected(0) + , m_offset(offset) + , m_activevalue(activevalue) +{ + m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); + printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); + debugOutput(DEBUG_LEVEL_VERBOSE, "Probably the initialization is the other way round.\n"); + m_selected = (m_state_tmp&m_activevalue)?true:false; +} + +bool SaffirePro24::Switch::selected() { + return m_selected; +} + +bool SaffirePro24::Switch::select(bool n) { + if ( n != m_selected ) { + m_selected = n; + m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); + m_eap->writeReg(Dice::Device::EAP::eRT_Application, m_offset, m_state_tmp^m_activevalue); + int msg = 0; + if (m_offset<0x14) msg = 2; + if (m_offset<0x3C && m_offset>=0x14) msg = 1; + if (m_offset<0x40 && m_offset>=0x3C) msg = 3; + if (m_offset<0x60 && m_offset>=0x58) msg = 4; + debugOutput(DEBUG_LEVEL_VERBOSE, "Switch will write the msg %i.\n", msg); + m_eap->writeReg(Dice::Device::EAP::eRT_Application, msgSet, msg); + } + return true; +} + +class SaffirePro24::LineInstSwitch : public Switch +{ +public: + LineInstSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) + : Switch(eap, name, offset, activevalue) {} + std::string getBooleanLabel(bool n) { + if ( n ) return "Instrument"; + return "Line"; + } +}; +class SaffirePro24::LevelSwitch : public Switch +{ +public: + LevelSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) + : Switch(eap, name, offset, activevalue) {} + std::string getBooleanLabel(bool n) { + if ( n ) return "High"; + return "Low"; + } +}; + SaffirePro24::SaffirePro24( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) : Dice::Device(d , configRom) @@ -41,6 +95,11 @@ SaffirePro24::~SaffirePro24() { + //debugOutput(DEBUG_LEVEL_VERBOSE, "Deleting the saffirePro24\n"); + /// I wonder whether we should really save only on clean exits or also each time a setting is + // changed. Or should we provide a function (and thus gui-button) to save the state of the + // device? + getEAP()->storeFlashConfig(); getEAP()->deleteElement(m_ch1); getEAP()->deleteElement(m_ch2); if (m_ch1) delete m_ch1; @@ -50,17 +109,27 @@ bool SaffirePro24::discover() { if (Dice::Device::discover()) { fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(2, sizeof(fb_quadlet_t)); - getEAP()->readRegBlock(Dice::Device::EAP::eRT_Application, 0x58, tmp, 2*sizeof(fb_quadlet_t)); - hexDumpQuadlets(tmp, 2); + getEAP()->readRegBlock(Dice::Device::EAP::eRT_Application, 0x00, tmp, 1*sizeof(fb_quadlet_t)); + //hexDumpQuadlets(tmp, 2); // DEBUG + if (tmp[0] != 0x00010004 ) { + debugError("This is a Focusrite Saffire Pro24 but not the right firmware. Better stop here before something goes wrong.\n"); + debugError("This device has firmware 0x%x while we only know about version 0x%x.\n", tmp[0], 0x10004); + return false; + } + //getEAP()->readRegBlock(Dice::Device::EAP::eRT_Command, 0x00, tmp, 2*sizeof(fb_quadlet_t)); // DEBUG + //hexDumpQuadlets(tmp, 2); // DEBUG - m_ch1 = new LineInstSwitch(getEAP(), "LineInstCh1", 0x58, 2); + m_ch1 = new LineInstSwitch(getEAP(), "Ch1LineInst", 0x58, 2); getEAP()->addElement(m_ch1); - m_ch2 = new LineInstSwitch(getEAP(), "LineInstCh2", 0x58, 2<<16); + m_ch2 = new LineInstSwitch(getEAP(), "Ch2LineInst", 0x58, 2<<16); getEAP()->addElement(m_ch2); - m_ch3 = new LevelSwitch(getEAP(), "LevelCh3", 0x5C, 1); + m_ch3 = new LevelSwitch(getEAP(), "Ch3Level", 0x5C, 1); getEAP()->addElement(m_ch3); - m_ch4 = new LevelSwitch(getEAP(), "LevelCh4", 0x5C, 1<<16); + m_ch4 = new LevelSwitch(getEAP(), "Ch4Level", 0x5C, 1<<16); getEAP()->addElement(m_ch4); + + m_monitor = new MonitorSection(getEAP(), "Monitoring"); + getEAP()->addElement(m_monitor); return true; } return false; @@ -82,55 +151,37 @@ return std::string( name ); } -SaffirePro24::LineInstSwitch::LineInstSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue ) - : Control::Enum(eap, name) + +SaffirePro24::MonitorSection::MonitorSection(Dice::Device::EAP* eap, std::string name) + : Control::Container(eap, name) , m_eap(eap) - , m_selected(0) - , m_offset(offset) - , m_activevalue(activevalue) { - m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); - printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); - m_selected = (m_state_tmp&m_activevalue)?1:0; -} - -int SaffirePro24::LineInstSwitch::selected() { - return m_selected; -} - -bool SaffirePro24::LineInstSwitch::select(int n) { - if ( n != m_selected ) { - m_selected = n; - m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); - m_eap->writeReg(Dice::Device::EAP::eRT_Application, m_offset, m_state_tmp^m_activevalue); - m_eap->writeReg(Dice::Device::EAP::eRT_Application, msgSet, 4); + m_mute = new Switch(m_eap, "Mute", 0x0C, 1); + addElement(m_mute); + m_dim = new Switch(m_eap, "Dim", 0x10, 1); + addElement(m_dim); + for (int i=0; i<10; ++i) { + std::stringstream stream; + stream << "MuteAffectsCh" << i; + Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<i); + addElement(s); + m_mute_affected.push_back(s); + stream.str(std::string()); + stream << "DimAffectsCh" << i; + s = new Switch(m_eap, stream.str(), 0x3C, 1<<(10+i)); + addElement(s); + m_dim_affected.push_back(s); } - return true; -} -std::string SaffirePro24::LineInstSwitch::getEnumLabel(int n) { - if ( n == 1 ) { - return "Instrument"; + for (int i=0; i<5; ++i) { + std::stringstream stream; + stream << "Mono_" << i*2 << "_" << i*2+1; + Switch* s = new Switch(m_eap, stream.str(), 0x3C, 1<<(20+i)); + addElement(s); + m_mono.push_back(s); } - return "Line"; } -SaffirePro24::LevelSwitch::LevelSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) - : LineInstSwitch(eap, name, offset, activevalue) -{ } -std::string SaffirePro24::LevelSwitch::getEnumLabel(int n) { - switch (n) { - case 0: - return "Low"; - case 1: - return "High"; - default: - return ""; - } } - -} -} - // vim: et Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.h =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-22 21:40:24 UTC (rev 1725) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-22 21:42:57 UTC (rev 1726) @@ -46,39 +46,47 @@ bool setNickName( std::string name ); std::string getNickName(); - class LineInstSwitch : public Control::Enum + /** + * @brief A standard-switch for boolean. + * + * If you don't like True and False for the labels, subclass and return your own. + */ + class Switch : public Control::Boolean { protected: friend class Dice::Focusrite::SaffirePro24; - LineInstSwitch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); + Switch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); public: - int count() { return 2; } - - int selected(); - bool select(int); - - std::string getEnumLabel(int); - + bool selected(); + bool select(bool); private: Dice::Device::EAP* m_eap; - int m_selected; + bool m_selected; size_t m_offset; int m_activevalue; fb_quadlet_t m_state_tmp; }; - class LevelSwitch : public LineInstSwitch + + class MonitorSection : public Control::Container { protected: friend class Dice::Focusrite::SaffirePro24; - LevelSwitch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); - public: - std::string getEnumLabel(int); + MonitorSection(Dice::Device::EAP*, std::string name); + private: + Dice::Device::EAP* m_eap; + Switch *m_mute, *m_dim; + std::vector<Switch*> m_mute_affected; + std::vector<Switch*> m_dim_affected; + std::vector<Switch*> m_mono; }; private: + class LineInstSwitch; LineInstSwitch *m_ch1, *m_ch2; + class LevelSwitch; LevelSwitch *m_ch3, *m_ch4; + MonitorSection *m_monitor; }; } |
From: <trac@ff...> - 2009-11-22 21:41:05
|
Author: arnonym Date: 2009-11-22 13:40:24 -0800 (Sun, 22 Nov 2009) New Revision: 1725 Modified: trunk/libffado/src/dice/dice_eap.cpp Log: As far as I can say this function works. Don't display the warning. But I think the control-interface needs to be extended to allow to call save and restore from gui. Modified: trunk/libffado/src/dice/dice_eap.cpp =================================================================== --- trunk/libffado/src/dice/dice_eap.cpp 2009-11-22 20:55:51 UTC (rev 1724) +++ trunk/libffado/src/dice/dice_eap.cpp 2009-11-22 21:40:24 UTC (rev 1725) @@ -386,7 +386,7 @@ bool Device::EAP::storeFlashConfig() { - debugWarning("Untested code\n"); + //debugWarning("Untested code\n") // Works. -Arnold; fb_quadlet_t cmd = DICE_EAP_CMD_OPCODE_ST_FLASH_CFG; cmd |= DICE_EAP_CMD_OPCODE_FLAG_LD_EXECUTE; return commandHelper(cmd); |
From: <trac@ff...> - 2009-11-22 20:56:34
|
Author: arnonym Date: 2009-11-22 12:55:51 -0800 (Sun, 22 Nov 2009) New Revision: 1724 Modified: trunk/libffado/src/libcontrol/BasicElements.h trunk/libffado/support/dbus/control-interface.xml trunk/libffado/support/dbus/controlserver.cpp trunk/libffado/support/dbus/controlserver.h Log: Introduce a Control::Boolean for simple switches. To be used in the SaffirePro24 first, but maybe others will follow? Using this instead of Control::Enum saves code. Modified: trunk/libffado/src/libcontrol/BasicElements.h =================================================================== --- trunk/libffado/src/libcontrol/BasicElements.h 2009-11-22 18:08:22 UTC (rev 1723) +++ trunk/libffado/src/libcontrol/BasicElements.h 2009-11-22 20:55:51 UTC (rev 1724) @@ -153,7 +153,25 @@ ///> get the name of the attribute with a certain index virtual std::string getAttributeName(int attridx) = 0; }; +/*! +@brief Base class for basic boolean control elements +*/ +class Boolean +: public Element +{ +public: + Boolean(Element *p) : Element(p) {}; + Boolean(Element *p, std::string n) : Element(p, n) {}; + virtual ~Boolean() {}; + virtual bool select(bool) = 0; + virtual bool selected() = 0; + virtual std::string getBooleanLabel(bool n) { + if (n) return "True"; + return "False"; + } +}; + }; // namespace Control #endif // CONTROL_BASICELEMENTS_H Modified: trunk/libffado/support/dbus/control-interface.xml =================================================================== --- trunk/libffado/support/dbus/control-interface.xml 2009-11-22 18:08:22 UTC (rev 1723) +++ trunk/libffado/support/dbus/control-interface.xml 2009-11-22 20:55:51 UTC (rev 1724) @@ -302,4 +302,17 @@ </method> </interface> + <interface name="org.ffado.Control.Element.Boolean"> + <method name="select"> + <arg type="b" name="value" direction="in"/> + <arg type="b" name="success" direction="out"/> + </method> + <method name="selected"> + <arg type="b" name="value" direction="out"/> + </method> + <method name="getBooleanLabel"> + <arg type="b" name="value" direction="in"/> + <arg type="s" name="label" direction="out"/> + </method> + </interface> </node> Modified: trunk/libffado/support/dbus/controlserver.cpp =================================================================== --- trunk/libffado/support/dbus/controlserver.cpp 2009-11-22 18:08:22 UTC (rev 1723) +++ trunk/libffado/support/dbus/controlserver.cpp 2009-11-22 20:55:51 UTC (rev 1724) @@ -409,6 +409,13 @@ parent, *dynamic_cast<Control::Enum *>(&e)); } + if (dynamic_cast<Control::Boolean *>(&e) != NULL) { + debugOutput( DEBUG_LEVEL_VERBOSE, "Source is a Control::Boolean\n"); + + return new Boolean(conn(), std::string(path()+"/"+e.getName()), + parent, *dynamic_cast<Control::Boolean *>(&e)); + } + if (dynamic_cast<ConfigRom *>(&e) != NULL) { debugOutput( DEBUG_LEVEL_VERBOSE, "Source is a ConfigRom\n"); @@ -1008,5 +1015,38 @@ return m_Slave.setConnectionMap(map_data); } +// --- Boolean +Boolean::Boolean( DBus::Connection& connection, std::string p, Element* parent, Control::Boolean &slave) +: Element(connection, p, parent, slave) +, m_Slave(slave) +{ + debugOutput( DEBUG_LEVEL_VERBOSE, "Created Boolean on '%s'\n", + path().c_str() ); +} + +DBus::Bool +Boolean::select( const DBus::Bool& value ) +{ + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "select(%d)\n", value ); + return m_Slave.select(value); +} + +DBus::Bool +Boolean::selected() +{ + bool retval = m_Slave.selected(); + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "selected() => %d\n", retval ); + return retval; +} + +DBus::String +Boolean::getBooleanLabel( const DBus::Bool& value ) +{ + std::string retval = m_Slave.getBooleanLabel(value); + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "getBooleanLabel(%d) => %s\n", value, retval.c_str() ); + return retval; +} + + } // end of namespace Control Modified: trunk/libffado/support/dbus/controlserver.h =================================================================== --- trunk/libffado/support/dbus/controlserver.h 2009-11-22 18:08:22 UTC (rev 1723) +++ trunk/libffado/support/dbus/controlserver.h 2009-11-22 20:55:51 UTC (rev 1724) @@ -366,6 +366,22 @@ Control::CrossbarRouter &m_Slave; }; +class Boolean +: public org::ffado::Control::Element::Boolean +, public Element +{ +public: + Boolean( DBus::Connection& connection, + std::string p, Element *, + Control::Boolean &slave ); + + DBus::Bool select( const DBus::Bool& value ); + DBus::Bool selected(); + DBus::String getBooleanLabel( const DBus::Bool& value ); + +private: + Control::Boolean &m_Slave; +}; } #endif // CONTROLSERVER_H |
From: <trac@ff...> - 2009-11-22 18:09:02
|
Author: ppalmers Date: 2009-11-22 10:08:22 -0800 (Sun, 22 Nov 2009) New Revision: 1723 Modified: branches/libffado-2.0/support/mixer-qt4/mixer_phase88.ui Log: fix phase88 front/back switch Modified: branches/libffado-2.0/support/mixer-qt4/mixer_phase88.ui =================================================================== --- branches/libffado-2.0/support/mixer-qt4/mixer_phase88.ui 2009-11-22 17:05:16 UTC (rev 1722) +++ branches/libffado-2.0/support/mixer-qt4/mixer_phase88.ui 2009-11-22 18:08:22 UTC (rev 1723) @@ -1,4 +1,5 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <comment>Copyright (C) 2005-2008 by Pieter Palmers This file is part of FFADO @@ -17,8 +18,8 @@ GNU General Public License for more details. </comment> <class>Phase88ControlUI</class> - <widget class="QWidget" name="Phase88ControlUI" > - <property name="geometry" > + <widget class="QWidget" name="Phase88ControlUI"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -26,324 +27,324 @@ <height>439</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Terratec Phase 88 Control</string> </property> - <layout class="QGridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="textLabel1" > - <property name="text" > + <layout class="QGridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="textLabel1"> + <property name="text"> <string>Mixer bus output:</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QComboBox" name="comboOutAssign" > + <item row="0" column="1"> + <widget class="QComboBox" name="comboOutAssign"> <item> - <property name="text" > + <property name="text"> <string>S/PDIF Out</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Line Out 1/2</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Line Out 3/4</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Line Out 5/6</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Line Out 7/8</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>None</string> </property> </item> </widget> </item> - <item row="1" column="0" colspan="2" > - <widget class="QGroupBox" name="groupBox1" > - <property name="title" > + <item row="1" column="0" colspan="2"> + <widget class="QGroupBox" name="groupBox1"> + <property name="title"> <string>Hardware Mixer</string> </property> - <layout class="QHBoxLayout" > + <layout class="QHBoxLayout"> <item> - <layout class="QGridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="textLabel2" > - <property name="text" > + <layout class="QGridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="textLabel2"> + <property name="text"> <string>1/2</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLabel" name="textLabel2_2" > - <property name="text" > + <item row="0" column="1"> + <widget class="QLabel" name="textLabel2_2"> + <property name="text"> <string>3/4</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="2" > - <widget class="QLabel" name="textLabel2_3" > - <property name="text" > + <item row="0" column="2"> + <widget class="QLabel" name="textLabel2_3"> + <property name="text"> <string>5/6</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="3" > - <widget class="QLabel" name="textLabel2_4" > - <property name="text" > + <item row="0" column="3"> + <widget class="QLabel" name="textLabel2_4"> + <property name="text"> <string>7/8</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="4" > - <widget class="QLabel" name="textLabel2_4_2" > - <property name="text" > + <item row="0" column="4"> + <widget class="QLabel" name="textLabel2_4_2"> + <property name="text"> <string>S/PDIF</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="5" > - <widget class="QLabel" name="textLabel2_4_2_2" > - <property name="text" > + <item row="0" column="5"> + <widget class="QLabel" name="textLabel2_4_2_2"> + <property name="text"> <string>WavePlay</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="0" column="6" > - <widget class="QLabel" name="textLabel2_4_2_2_2" > - <property name="text" > + <item row="0" column="6"> + <widget class="QLabel" name="textLabel2_4_2_2_2"> + <property name="text"> <string>Master</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="1" column="0" > - <widget class="QSlider" name="sldInput12" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="0"> + <widget class="QSlider" name="sldInput12"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QSlider" name="sldInput34" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="1"> + <widget class="QSlider" name="sldInput34"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="2" > - <widget class="QSlider" name="sldInput56" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="2"> + <widget class="QSlider" name="sldInput56"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="3" > - <widget class="QSlider" name="sldInput78" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="3"> + <widget class="QSlider" name="sldInput78"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="4" > - <widget class="QSlider" name="sldInputSPDIF" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="4"> + <widget class="QSlider" name="sldInputSPDIF"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="5" > - <widget class="QSlider" name="sldInputWavePlay" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="5"> + <widget class="QSlider" name="sldInputWavePlay"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> </item> - <item row="1" column="6" > - <widget class="QSlider" name="sldInputMaster" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <item row="1" column="6"> + <widget class="QSlider" name="sldInputMaster"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>0</number> </property> - <property name="maximum" > + <property name="maximum"> <number>32767</number> </property> - <property name="singleStep" > + <property name="singleStep"> <number>10000</number> </property> - <property name="pageStep" > + <property name="pageStep"> <number>1000</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="tickInterval" > + <property name="tickInterval"> <number>10000</number> </property> </widget> @@ -353,112 +354,112 @@ </layout> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="textLabel1_2" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="textLabel1_2"> + <property name="text"> <string>Waveplay Channel Source</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QComboBox" name="comboInAssign" > + <item row="2" column="1"> + <widget class="QComboBox" name="comboInAssign"> <item> - <property name="text" > + <property name="text"> <string>S/PDIF</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>CH 1/2</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>CH 3/4</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>CH5/6</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>CH7/8</string> </property> </item> </widget> </item> - <item row="3" column="0" > - <widget class="QLabel" name="textLabel1_2_2" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="textLabel1_2_2"> + <property name="text"> <string>In 7/8 Input Select</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QComboBox" name="comboFrontBack" > + <item row="3" column="1"> + <widget class="QComboBox" name="comboFrontBack"> <item> - <property name="text" > - <string>Front</string> + <property name="text"> + <string>Back</string> </property> </item> <item> - <property name="text" > - <string>Back</string> + <property name="text"> + <string>Front</string> </property> </item> </widget> </item> - <item row="4" column="0" > - <widget class="QLabel" name="textLabel1_2_3_2" > - <property name="text" > + <item row="4" column="0"> + <widget class="QLabel" name="textLabel1_2_3_2"> + <property name="text"> <string>Sync Source</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="4" column="1" > - <widget class="QComboBox" name="comboSyncSource" > + <item row="4" column="1"> + <widget class="QComboBox" name="comboSyncSource"> <item> - <property name="text" > + <property name="text"> <string>Internal</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>External</string> </property> </item> </widget> </item> - <item row="5" column="0" > - <widget class="QLabel" name="textLabel1_2_3" > - <property name="text" > + <item row="5" column="0"> + <widget class="QLabel" name="textLabel1_2_3"> + <property name="text"> <string>External Sync Source</string> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> </widget> </item> - <item row="5" column="1" > - <widget class="QComboBox" name="comboExtSync" > + <item row="5" column="1"> + <widget class="QComboBox" name="comboExtSync"> <item> - <property name="text" > + <property name="text"> <string>S/PDIF</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>WordClock</string> </property> </item> @@ -466,7 +467,7 @@ </item> </layout> </widget> - <layoutdefault spacing="6" margin="11" /> + <layoutdefault spacing="6" margin="11"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> <resources/> <connections> @@ -476,11 +477,11 @@ <receiver>Phase88ControlUI</receiver> <slot>switchOutAssign(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -492,11 +493,11 @@ <receiver>Phase88ControlUI</receiver> <slot>switchFrontState(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -508,11 +509,11 @@ <receiver>Phase88ControlUI</receiver> <slot>switchWaveInAssign(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -524,11 +525,11 @@ <receiver>Phase88ControlUI</receiver> <slot>switchSyncSource(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -540,11 +541,11 @@ <receiver>Phase88ControlUI</receiver> <slot>switchExtSyncSource(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -556,11 +557,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolume12(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -572,11 +573,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolume34(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -588,11 +589,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolume56(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -604,11 +605,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolume78(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -620,11 +621,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolumeMaster(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -636,11 +637,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolumeSPDIF(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> @@ -652,11 +653,11 @@ <receiver>Phase88ControlUI</receiver> <slot>setVolumeWavePlay(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>20</x> <y>20</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>20</x> <y>20</y> </hint> |
From: <trac@ff...> - 2009-11-22 17:05:56
|
Author: ppalmers Date: 2009-11-22 09:05:16 -0800 (Sun, 22 Nov 2009) New Revision: 1722 Modified: branches/libffado-2.0/src/DeviceStringParser.cpp branches/libffado-2.0/src/bebob/bebob_avdevice.cpp branches/libffado-2.0/src/bebob/bebob_avplug.cpp branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp branches/libffado-2.0/src/debugmodule/debugmodule.cpp branches/libffado-2.0/src/fbtypes.h branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp branches/libffado-2.0/src/libavc/general/avc_plug.cpp branches/libffado-2.0/src/libcontrol/Element.cpp branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp branches/libffado-2.0/src/libieee1394/IsoHandler.cpp branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp branches/libffado-2.0/src/libieee1394/configrom.cpp branches/libffado-2.0/src/libieee1394/cycletimer.h branches/libffado-2.0/src/libieee1394/ieee1394service.cpp branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp branches/libffado-2.0/src/libutil/Configuration.cpp branches/libffado-2.0/src/libutil/StreamStatistics.cpp branches/libffado-2.0/src/libutil/SystemTimeSource.cpp branches/libffado-2.0/src/libutil/Time.h branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp branches/libffado-2.0/src/libutil/serialize_expat.cpp branches/libffado-2.0/support/firmware/fireworks-downloader.cpp branches/libffado-2.0/tests/streaming/teststreaming3.cpp branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp branches/libffado-2.0/tests/test-ffado.cpp Log: fix format warnings for extreme debugging Modified: branches/libffado-2.0/src/DeviceStringParser.cpp =================================================================== --- branches/libffado-2.0/src/DeviceStringParser.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/DeviceStringParser.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -202,7 +202,7 @@ return retval; case eGUID: retval = m_guid && (m_guid == x.m_guid); - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016lX == 0x%016lX? %d\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016"PRIX64" == 0x%016"PRIX64"? %d\n", m_guid, x.m_guid, retval); return retval; case eInvalid: @@ -224,7 +224,7 @@ break; case eGUID: debugOutput(DEBUG_LEVEL_INFO, "type: eGUID\n"); - debugOutput(DEBUG_LEVEL_INFO, " GUID: %016lX\n", m_guid); + debugOutput(DEBUG_LEVEL_INFO, " GUID: %016"PRIX64"\n", m_guid); break; case eInvalid: default: Modified: branches/libffado-2.0/src/bebob/bebob_avdevice.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_avdevice.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/bebob/bebob_avdevice.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -723,7 +723,7 @@ std::string sDevicePath = getCachePath() + getConfigRom().getGuidString(); char* configId; - asprintf(&configId, "%016lx", getConfigurationId() ); + asprintf(&configId, "%016"PRIx64"", getConfigurationId() ); if ( !configId ) { debugError( "could not create id string\n" ); return false; @@ -799,7 +799,7 @@ // come up with an unique file name for the current settings char* configId; - asprintf(&configId, "%016lx", BeBoB::AvDevice::getConfigurationId() ); + asprintf(&configId, "%016"PRIx64"", BeBoB::AvDevice::getConfigurationId() ); if ( !configId ) { debugError( "Could not create id string\n" ); return false; Modified: branches/libffado-2.0/src/bebob/bebob_avplug.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_avplug.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/bebob/bebob_avplug.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -582,7 +582,7 @@ != infoType->m_plugOutput->m_outputPlugAddresses.size() ) { debugError( "number of output plugs (%d) disagree with " - "number of elements in plug address vector (%lu)\n", + "number of elements in plug address vector (%zd)\n", infoType->m_plugOutput->m_nrOfOutputPlugs, infoType->m_plugOutput->m_outputPlugAddresses.size()); } Modified: branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -153,7 +153,7 @@ bytes_read = fread( &m_bcd_version, 1, sizeof( fb_quadlet_t ), m_file ); if ( bytes_read != sizeof( fb_quadlet_t ) ) { - debugError( "parse: %lu bytes read at position %d failed\n", + debugError( "parse: %zd bytes read at position %d failed\n", sizeof( fb_quadlet_t ), BCDFileVersionOffset ); return false; @@ -244,7 +244,7 @@ size_t bytes_read = std::fread( q, 1, sizeof( *q ), m_file ); if ( bytes_read != sizeof( *q ) ) { - debugError( "read: %lu byte read failed at position 0x%08x\n", + debugError( "read: %zd byte read failed at position 0x%08x\n", sizeof( *q ), addr ); return false; } @@ -262,7 +262,7 @@ size_t bytes_read = std::fread( o, 1, sizeof( *o ), m_file ); if ( bytes_read != sizeof( *o ) ) { - debugError( "read: %lu byte read failed at position 0x%08x\n", + debugError( "read: %zd byte read failed at position 0x%08x\n", sizeof( *o ), addr ); return false; } @@ -280,7 +280,7 @@ size_t bytes_read = std::fread( b, 1, len, m_file ); if ( bytes_read != len ) { - debugError( "read: %lu byte read failed at position 0x%08x\n", + debugError( "read: %zd byte read failed at position 0x%08x\n", len, addr ); return false; } Modified: branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp =================================================================== --- branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -68,7 +68,7 @@ ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { ffado_microsecs_t wait = m_earliest_next_cmd_time - now; - debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); + debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %"PRIu64"\n", wait ); Util::SystemTimeSource::SleepUsecRelative(wait); } m_earliest_next_cmd_time = now + m_cmd_time_interval; @@ -93,7 +93,7 @@ ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { ffado_microsecs_t wait = m_earliest_next_cmd_time - now; - debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); + debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %"PRIu64"\n", wait ); Util::SystemTimeSource::SleepUsecRelative(wait); } m_earliest_next_cmd_time = now + m_cmd_time_interval; @@ -168,7 +168,7 @@ fb_nodeid_t nodeId = getNodeId() | 0xFFC0; if(!get1394Service().write_quadlet( nodeId, addr, CondSwapToBus32(data) ) ) { - debugError("Could not write to node 0x%04X addr 0x%012lX\n", nodeId, addr); + debugError("Could not write to node 0x%04X addr 0x%012"PRIX64"\n", nodeId, addr); return false; } return true; @@ -184,7 +184,7 @@ fb_nodeid_t nodeId = getNodeId() | 0xFFC0; if(!get1394Service().read_quadlet( nodeId, addr, &result ) ) { - debugError("Could not read from node 0x%04X addr 0x%012lX\n", nodeId, addr); + debugError("Could not read from node 0x%04X addr 0x%012"PRIX64"\n", nodeId, addr); return false; } @@ -384,7 +384,7 @@ bool RegisterControl::setValue(uint64_t addr, uint64_t v) { - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %lu to %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %"PRIu64" to %"PRIu64"\n", addr, v); if ( !m_Parent.setSpecificValue(addr, v) ) { @@ -402,7 +402,7 @@ debugError( "getSpecificValue failed\n" ); return 0; } else { - debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %lu = %u\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %"PRIu64" = %u\n", addr, val); return val; } Modified: branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp =================================================================== --- branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -47,11 +47,11 @@ int delaytime = 0; if(config.getValueForDeviceSetting(getConfigRom().getNodeVendorId(), getConfigRom().getModelId(), "cmd_interval_time", delaytime)) { m_cmd_time_interval = delaytime; - debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %lu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %"PRIu64"\n", m_cmd_time_interval ); } else { m_cmd_time_interval = 10000; - debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %lu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %"PRIu64"\n", m_cmd_time_interval ); } } Modified: branches/libffado-2.0/src/debugmodule/debugmodule.cpp =================================================================== --- branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -185,7 +185,7 @@ // format the message such that it remains together int chars_written=0; int retval=0; - retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4u] %s: ", + retval = snprintf(msg, MB_BUFFERSIZE, "%011"PRIu64": %s (%s)[%4u] %s: ", ts_usec, getPreSequence( level ), fname, line, function ); if (retval >= 0) chars_written += retval; // ignore errors Modified: branches/libffado-2.0/src/fbtypes.h =================================================================== --- branches/libffado-2.0/src/fbtypes.h 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/fbtypes.h 2009-11-22 17:05:16 UTC (rev 1722) @@ -24,6 +24,9 @@ #ifndef FBTYPES_H #define FBTYPES_H +#define __STDC_FORMAT_MACROS +#include <inttypes.h> + #include <libraw1394/raw1394.h> #define INVALID_NODE_ID 0xFF @@ -34,6 +37,10 @@ typedef nodeid_t fb_nodeid_t; typedef nodeaddr_t fb_nodeaddr_t; +#define FORMAT_FB_OCTLET_T "0x%016" PRIX64 +#define FORMAT_FB_NODEID_T "0x%016" PRIX64 +#define FORMAT_FB_NODEADDR_T "0x%016" PRIX64 + class DeviceManager; struct ffado_handle { Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -126,7 +126,7 @@ debugOutput(DEBUG_LEVEL_NORMAL, "EFC HW CAPS info:\n"); debugOutput(DEBUG_LEVEL_NORMAL, " Flags : 0x%08X\n", m_flags); - debugOutput(DEBUG_LEVEL_NORMAL, " GUID : %016lX\n", m_guid); + debugOutput(DEBUG_LEVEL_NORMAL, " GUID : %016"PRIX64"\n", m_guid); debugOutput(DEBUG_LEVEL_NORMAL, " HwType : 0x%08X\n", m_type); debugOutput(DEBUG_LEVEL_NORMAL, " Version : %u\n", m_version); debugOutput(DEBUG_LEVEL_NORMAL, " Vendor : %s\n", m_vendor_name); Modified: branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -254,7 +254,7 @@ memcpy(&s, raw+sizeof(SessionHeader), sizeof(SubSession)); if (len != h.size_quads*4) { - debugWarning("size not correct: got %lu, should be %d according to data\n", len, h.size_quads*4); + debugWarning("size not correct: got %zd, should be %d according to data\n", len, h.size_quads*4); } #if __BYTE_ORDER == __BIG_ENDIAN Modified: branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp =================================================================== --- branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -254,7 +254,7 @@ } debugOutput(DEBUG_LEVEL_VERBOSE, - " copying %u bytes to internal buffer offset %lu\n", + " copying %u bytes to internal buffer offset %zd\n", readDescCmd.m_data_length, bytes_read); memcpy(m_data+bytes_read,readDescCmd.m_data, readDescCmd.m_data_length); Modified: branches/libffado-2.0/src/libavc/general/avc_plug.cpp =================================================================== --- branches/libffado-2.0/src/libavc/general/avc_plug.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libavc/general/avc_plug.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -1343,7 +1343,6 @@ case eAPD_Output: return string("Output"); default: - case eAPT_Unknown: return string("Unknown"); } } Modified: branches/libffado-2.0/src/libcontrol/Element.cpp =================================================================== --- branches/libffado-2.0/src/libcontrol/Element.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libcontrol/Element.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -301,7 +301,7 @@ Container::show() { Util::MutexLockHelper lock(getLock()); - debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%lu Elements)\n", + debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%zd Elements)\n", getName().c_str(), m_Children.size()); for ( ElementVectorIterator it = m_Children.begin(); Modified: branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -163,10 +163,10 @@ "Bogus CTR: %08X on try %02d\n", m_cycle_timer_prev, maxtries2); } - debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11u, local: %17lu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", m_cycle_timer_prev, local_time); debugOutput(DEBUG_LEVEL_VERBOSE, - " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", (uint32_t)m_cycle_timer_prev, (uint64_t)CYCLE_TIMER_TO_TICKS(m_cycle_timer_prev), (unsigned int)CYCLE_TIMER_GET_SECS( m_cycle_timer_prev ), (unsigned int)CYCLE_TIMER_GET_CYCLES( m_cycle_timer_prev ), @@ -290,10 +290,10 @@ } cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(cycle_timer); - debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17lu\n", + debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", cycle_timer, local_time); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)cycle_timer_ticks ), @@ -350,7 +350,7 @@ #ifdef DEBUG ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); int sleep_time = m_sleep_until - now; - debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %ld/%f (now: %ld, diff=%d) ...\n", + debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %"PRId64"/%f (now: %"PRId64", diff=%d) ...\n", this, m_sleep_until, m_next_time_usecs, now, sleep_time); #endif Util::SystemTimeSource::SleepUsecAbsolute(m_sleep_until); @@ -389,7 +389,7 @@ not_good = (-err_ticks > 1*TICKS_PER_CYCLE || err_ticks > 1*TICKS_PER_CYCLE); if(not_good) { debugOutput(DEBUG_LEVEL_VERBOSE, - "(%p) have to retry CTR read, diff unrealistic: diff: %ld, max: +/- %u (try: %d) %ld\n", + "(%p) have to retry CTR read, diff unrealistic: diff: %"PRId64", max: +/- %u (try: %d) %"PRId64"\n", this, err_ticks, 1*TICKS_PER_CYCLE, ntries, expected_ticks); // sleep half a cycle to make sure the hardware moved on Util::SystemTimeSource::SleepUsecRelative(USECS_PER_CYCLE / 2); @@ -418,10 +418,10 @@ return true; } - debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17lu\n", + debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17"PRIu64"\n", cycle_timer, local_time); debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11"PRIu64" (%03us %04ucy %04uticks)\n", (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)cycle_timer_ticks ), @@ -435,7 +435,7 @@ m_first_run = false; } else if (diff_ticks > m_ticks_per_update * 20) { debugOutput(DEBUG_LEVEL_VERBOSE, - "re-init dll due to too large tick diff: %ld >> %f\n", + "re-init dll due to too large tick diff: %"PRId64" >> %f\n", diff_ticks, (float)(m_ticks_per_update * 20)); if(!initDLL()) { debugError("(%p) Could not init DLL\n", this); @@ -461,7 +461,7 @@ if (ticks_late >= 0) { diff_ticks_corr = diff_ticks - ticks_late; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "diff_ticks_corr=%d, diff_ticks = %ld, ticks_late = %ld\n", + "diff_ticks_corr=%"PRId64", diff_ticks = %"PRId64", ticks_late = %"PRId64"\n", diff_ticks_corr, diff_ticks, ticks_late); } else { debugError("Early wakeup, should not happen!\n"); @@ -472,7 +472,7 @@ #ifdef DEBUG // makes no sense if not running realtime if(m_realtime && usecs_late > 1000) { - debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %ld usecs\n", usecs_late); + debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %"PRId64" usecs\n", usecs_late); } #endif @@ -525,26 +525,26 @@ m_next_time_usecs += m_usecs_per_update; debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " usecs: current: %f next: %f usecs_late=%d ticks_late=%ld\n", + " usecs: current: %f next: %f usecs_late=%"PRId64" ticks_late=%"PRId64"\n", m_current_time_usecs, m_next_time_usecs, usecs_late, ticks_late); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: current: %f next: %f diff=%d\n", + " ticks: current: %f next: %f diff=%"PRId64"\n", m_current_time_ticks, m_next_time_ticks, diff_ticks); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: current: %011lu (%03us %04ucy %04uticks)\n", + " ticks: current: %011"PRIu64" (%03us %04ucy %04uticks)\n", (uint64_t)m_current_time_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)m_current_time_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)m_current_time_ticks ), (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_current_time_ticks ) ); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: next : %011lu (%03us %04ucy %04uticks)\n", + " ticks: next : %011"PRIu64" (%03us %04ucy %04uticks)\n", (uint64_t)m_next_time_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)m_next_time_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)m_next_time_ticks ), (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_next_time_ticks ) ); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " state: local: %11lu, dll_e2: %f, rate: %f\n", + " state: local: %11"PRIu64", dll_e2: %f, rate: %f\n", local_time, m_dll_e2, getRate()); } @@ -588,7 +588,7 @@ dll_time = substractTicks(offset_in_ticks_int, -y_step_in_ticks_int); } int32_t ctr_diff = cycle_timer_ticks-dll_time; - debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010lu - DLL %010u = %010d (%s)\n", + debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010"PRIu64" - DLL %010u = %010d (%s)\n", this, cycle_timer_ticks, dll_time, ctr_diff, (ctr_diff>0?"lag":"lead")); #endif @@ -791,19 +791,19 @@ if (diffTicks(cycle_timer_ticks, m_cycle_timer_ticks_prev) < 0) { debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - "non-monotonic CTR (try %02d): %lu -> %lu\n", + "non-monotonic CTR (try %02d): %"PRIu64" -> %"PRIu64"\n", maxtries, m_cycle_timer_ticks_prev, cycle_timer_ticks); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " : %08X -> %08X\n", m_cycle_timer_prev, *cycle_timer); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - " current: %011lu (%03us %04ucy %04uticks)\n", + " current: %011"PRIu64" (%03us %04ucy %04uticks)\n", cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( cycle_timer_ticks ), (unsigned int)TICKS_TO_OFFSET( cycle_timer_ticks ) ); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - " prev : %011lu (%03us %04ucy %04uticks)\n", + " prev : %011"PRIu64" (%03us %04ucy %04uticks)\n", m_cycle_timer_ticks_prev, (unsigned int)TICKS_TO_SECS( m_cycle_timer_ticks_prev ), (unsigned int)TICKS_TO_CYCLES( m_cycle_timer_ticks_prev ), Modified: branches/libffado-2.0/src/libieee1394/IsoHandler.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/IsoHandler.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/IsoHandler.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -396,9 +396,13 @@ if((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) { debugWarning("reconstructed CTR counter discrepancy\n"); - debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", - cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); - debugWarning(" diffcy = %ld \n", diff_cycles); + debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %"PRId64"\n", + cycle, pkt_ctr_ref, pkt_ctr, + now, m_last_now, now_secs_ref, + (long int)CYCLE_TIMER_GET_SECS(now), + (long int)CYCLE_TIMER_GET_SECS(m_last_now), + tmp); + debugWarning(" diffcy = %"PRId64" \n", diff_cycles); } #endif m_last_packet_handled_at = pkt_ctr; @@ -489,9 +493,13 @@ if(((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) && (m_packets > m_buf_packets)) { debugWarning("reconstructed CTR counter discrepancy\n"); - debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", - cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); - debugWarning(" diffcy = %ld \n", diff_cycles); + debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %"PRId64"\n", + cycle, pkt_ctr_ref, pkt_ctr, + now, m_last_now, now_secs_ref, + (long int)CYCLE_TIMER_GET_SECS(now), + (long int)CYCLE_TIMER_GET_SECS(m_last_now), + tmp); + debugWarning(" diffcy = %"PRId64" \n", diff_cycles); } #endif } Modified: branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -330,11 +330,11 @@ int64_t measured_diff_ticks = diffTicks(ctr_at_poll_return_ticks, last_packet_seen_ticks); debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "(%p, %s) check handler %d: diff = %ld, max = %lld, now: %08lX, last: %08lX\n", + "(%p, %s) check handler %d: diff = %"PRId64", max = %"PRId64", now: %08X, last: %08X\n", this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), i, measured_diff_ticks, max_diff_ticks, ctr_at_poll_return, last_packet_seen); if(measured_diff_ticks > max_diff_ticks) { - debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %ld (max: %ld)\n", + debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %"PRId64" (max: %"PRId64")\n", this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), ctr_at_poll_return, last_packet_seen, measured_diff_ticks, max_diff_ticks); m_IsoHandler_map_shadow[i]->notifyOfDeath(); @@ -415,14 +415,16 @@ } else if (errno == EINVAL) { debugError("(%p) sem_timedwait error (result=%d errno=EINVAL)\n", this, result); - debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", - this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); + debugError("(%p) timeout_nsec=%lld ts.sec=%"PRId64" ts.nsec=%"PRId64"\n", + this, m_activity_wait_timeout_nsec, + (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); return eAR_Error; } else { debugError("(%p) sem_timedwait error (result=%d errno=%d)\n", this, result, errno); - debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", - this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); + debugError("(%p) timeout_nsec=%lld ts.sec=%"PRId64" ts.nsec=%"PRId64"\n", + this, m_activity_wait_timeout_nsec, + (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); return eAR_Error; } } @@ -887,7 +889,7 @@ debugOutput( DEBUG_LEVEL_VERBOSE, " registered stream (%p) with handler (%p)\n", stream, h); m_StreamProcessors.push_back(stream); - debugOutput( DEBUG_LEVEL_VERBOSE, " %lu streams, %lu handlers registered\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " %zd streams, %zd handlers registered\n", m_StreamProcessors.size(), m_IsoHandlers.size()); return true; } Modified: branches/libffado-2.0/src/libieee1394/configrom.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/configrom.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/configrom.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -483,7 +483,7 @@ ConfigRom::updatedNodeId() { debugOutput( DEBUG_LEVEL_VERBOSE, - "Checking for updated node id for device with GUID 0x%016lX...\n", + "Checking for updated node id for device with GUID 0x%016"PRIX64"...\n", getGuid()); struct csr1212_csr* csr = NULL; @@ -514,14 +514,14 @@ | CSR1212_BE32_TO_CPU(csr->bus_info_data[4]); debugOutput( DEBUG_LEVEL_VERBOSE, - " Node has GUID 0x%016lX\n", + " Node has GUID 0x%016"PRIX64"\n", guid); if ( guid == getGuid() ) { debugOutput( DEBUG_LEVEL_VERBOSE, "GUID matches ours\n"); if ( nodeId != getNodeId() ) { debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016lX changed node id " + "Device with GUID 0x%016"PRIX64" changed node id " "from %d to %d\n", getGuid(), getNodeId(), @@ -529,7 +529,7 @@ m_nodeId = nodeId; } else { debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016lX kept node id %d\n", + "Device with GUID 0x%016"PRIX64" kept node id %d\n", getGuid(), getNodeId()); } @@ -546,7 +546,7 @@ } debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016lX could not be found on " + "Device with GUID 0x%016"PRIX64" could not be found on " "the bus anymore (removed?)\n", getGuid() ); m_nodeId = INVALID_NODE_ID; @@ -559,7 +559,7 @@ using namespace std; debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" ); debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n", getNodeId() ); - debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016lX\n", getGuid()); + debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016"PRIX64"\n", getGuid()); debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n", getVendorName().c_str() ); debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n", getModelName().c_str() ); debugOutput(DEBUG_LEVEL_NORMAL, "\tNode Vendor ID:\t\t0x%06x\n", getNodeVendorId() ); @@ -580,7 +580,7 @@ using namespace std; printMessage("Config ROM\n" ); printMessage("\tCurrent Node Id:\t%d\n", getNodeId() ); - printMessage("\tGUID:\t\t\t0x%016lX\n", getGuid()); + printMessage("\tGUID:\t\t\t0x%016"PRIX64"\n", getGuid()); printMessage("\tVendor Name:\t\t%s\n", getVendorName().c_str() ); printMessage("\tModel Name:\t\t%s\n", getModelName().c_str() ); printMessage("\tNode Vendor ID:\t\t0x%06x\n", getNodeVendorId() ); Modified: branches/libffado-2.0/src/libieee1394/cycletimer.h =================================================================== --- branches/libffado-2.0/src/libieee1394/cycletimer.h 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/cycletimer.h 2009-11-22 17:05:16 UTC (rev 1722) @@ -94,7 +94,7 @@ #ifdef DEBUG if (x >= TICKS_PER_SECOND * 128L) { - debugWarning("insufficient wrapping: %lu\n",x); + debugWarning("insufficient wrapping: %"PRIu64"\n",x); } #endif @@ -117,7 +117,7 @@ #ifdef DEBUG if (x < 0) { - debugWarning("insufficient wrapping: %ld\n",x); + debugWarning("insufficient wrapping: %"PRId64"\n",x); } #endif @@ -144,10 +144,10 @@ #ifdef DEBUG if (x >= (int64_t)(TICKS_PER_SECOND * 128L)) { - debugWarning("insufficient wrapping (max): %lu\n",x); + debugWarning("insufficient wrapping (max): %"PRIu64"\n",x); } if (x < 0) { - debugWarning("insufficient wrapping (min): %ld\n",x); + debugWarning("insufficient wrapping (min): %"PRId64"\n",x); } #endif return x; @@ -248,7 +248,7 @@ #ifdef DEBUG if(diff > max || diff < -max) { debugWarning("difference does not make any sense\n"); - debugWarning("diff=%ld max=%ld\n", diff, max); + debugWarning("diff=%"PRId64" max=%"PRId64"\n", diff, max); } #endif @@ -301,7 +301,7 @@ static inline uint64_t sytRecvToFullTicks(uint64_t syt_timestamp, unsigned int rcv_cycle, uint64_t ctr_now) { uint64_t timestamp; - debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04llX CY=%u CTR=%08llX\n", + debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%"PRIX64" CY=%u CTR=%08"PRIX64"\n", syt_timestamp, rcv_cycle, ctr_now); // reconstruct the full cycle @@ -312,7 +312,7 @@ // the cycle timer should be ahead of the receive timer int diff_cycles = diffCycles(cc_cycles, rcv_cycle); if (diff_cycles<0) { - debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %lu (%d)\n", + debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %"PRIu64" (%d)\n", rcv_cycle, cc_cycles, diff_cycles); } @@ -350,7 +350,7 @@ timestamp = new_cycles * TICKS_PER_CYCLE; } else { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Detected wraparound: %d + %d = %d\n", + "Detected wraparound: %u + %"PRId64" = %"PRId64"\n", rcv_cycle, delta_cycles, new_cycles); new_cycles-=8000; // wrap around @@ -371,7 +371,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", + debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif @@ -390,7 +390,7 @@ static inline uint64_t sytRecvToFullTicks2(uint64_t syt_timestamp, uint32_t rcv_ctr) { uint64_t timestamp; - debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04llX RCV_CTR=%08X\n", + debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%04"PRIX64" RCV_CTR=%08X\n", syt_timestamp, rcv_ctr); // reconstruct the top part of the timestamp using the current cycle number @@ -432,7 +432,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", + debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif @@ -456,7 +456,7 @@ static inline uint64_t sytXmitToFullTicks(uint64_t syt_timestamp, unsigned int xmt_cycle, uint64_t ctr_now) { uint64_t timestamp; - debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%08llX CY=%04X CTR=%08llX\n", + debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "SYT=%08"PRIX64" CY=%04X CTR=%08"PRIX64"\n", syt_timestamp, xmt_cycle, ctr_now); // reconstruct the full cycle @@ -466,7 +466,7 @@ // check for bogus CTR int diff_cycles = diffCycles(xmt_cycle, cc_cycles); if (diff_cycles<0) { - debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %lu (%d)\n", + debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %"PRIu64" (%d)\n", xmt_cycle, cc_cycles, diff_cycles); } @@ -504,7 +504,7 @@ timestamp = new_cycles * TICKS_PER_CYCLE; } else { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Detected wraparound: %d + %d = %d\n", + "Detected wraparound: %u + %"PRId64" = %"PRId64"\n", xmt_cycle, delta_cycles, new_cycles); new_cycles-=8000; // wrap around @@ -525,7 +525,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", + debugWarning("TS=%011"PRIu64" TSC=%08"PRIX64" SYT=%04"PRIX64"\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif Modified: branches/libffado-2.0/src/libieee1394/ieee1394service.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/ieee1394service.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libieee1394/ieee1394service.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -508,7 +508,7 @@ #ifdef DEBUG debugOutput(DEBUG_LEVEL_VERY_VERBOSE, - "read: node 0x%hX, addr = 0x%016lX, length = %lu\n", + "read: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", nodeId, addr, length); printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, buffer ); #endif @@ -517,7 +517,7 @@ } else { #ifdef DEBUG debugOutput(DEBUG_LEVEL_NORMAL, - "raw1394_read failed: node 0x%hX, addr = 0x%016lX, length = %lu\n", + "raw1394_read failed: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", nodeId, addr, length); #endif return false; @@ -563,7 +563,7 @@ } #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016lX, length = %lu\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016"PRIX64", length = %zd\n", nodeId, addr, length); printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, data ); #endif @@ -600,15 +600,15 @@ return false; } #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016lX\n", + debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016"PRIX64"\n", nodeId, addr); - debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016lX) *(addr)=0x%016lX\n", + debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016"PRIX64") *(addr)=0x%016"PRIX64"\n", compare_value, swap_value); fb_octlet_t buffer; if(!read_octlet( nodeId, addr,&buffer )) { debugWarning("Could not read register\n"); } else { - debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016lX\n", buffer); + debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016"PRIX64"\n", buffer); } #endif @@ -632,7 +632,7 @@ if(!read_octlet( nodeId, addr,&buffer )) { debugWarning("Could not read register\n"); } else { - debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016lX\n", buffer); + debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016"PRIX64"\n", buffer); } #endif @@ -826,7 +826,7 @@ fb_quadlet_t *data_quads = (fb_quadlet_t *)data; #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %lu bytes\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %zd bytes\n", nodeid, response, length); printBuffer(DEBUG_LEVEL_VERY_VERBOSE, (length+3)/4, data_quads ); #endif @@ -1380,7 +1380,7 @@ debugOutput( DEBUG_LEVEL_VERBOSE, " Name: %s\n", getPortName().c_str() ); debugOutput( DEBUG_LEVEL_VERBOSE, " CycleTimerHelper: %p, IsoManager: %p, WatchDog: %p\n", m_pCTRHelper, m_pIsoManager, m_pWatchdog ); - debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011lu (%03us %04ucy %04uticks)\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011"PRIu64" (%03us %04ucy %04uticks)\n", ctr, (unsigned int)TICKS_TO_SECS( ctr ), (unsigned int)TICKS_TO_CYCLES( ctr ), Modified: branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -191,14 +191,16 @@ } else if (errno == EINVAL) { debugError("(%p) sem_[timed]wait error (result=%d errno=EINVAL)\n", this, result); - debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", - this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); + debugError("(%p) timeout_nsec=%"PRId64" ts.sec=%"PRId64" ts.nsec=%"PRId64"\n", + this, m_activity_wait_timeout_nsec, + (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); return eAR_Error; } else { debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n", this, result, errno); - debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", - this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); + debugError("(%p) timeout_nsec=%"PRId64" ts.sec=%"PRId64" ts.nsec=%"PRId64"\n", + this, m_activity_wait_timeout_nsec, + (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); return eAR_Error; } } @@ -539,8 +541,8 @@ #ifdef DEBUG int64_t now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %"PRId64", syncdelay: %"PRId64", diff: %"PRId64"\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %"PRId64", now: %"PRId64", wait: %"PRId64"\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); #endif // wait until it's time to transfer @@ -548,7 +550,7 @@ #ifdef DEBUG now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %"PRId64", now: %"PRId64", excess: %"PRId64"\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); #endif } @@ -569,7 +571,7 @@ // determine a point in time where the system should start // figure out where we are now uint64_t time_of_first_sample = m_SyncSource->getTimeAtPeriod(); - debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011lu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", time_of_first_sample, (unsigned int)TICKS_TO_SECS(time_of_first_sample), (unsigned int)TICKS_TO_CYCLES(time_of_first_sample), @@ -586,10 +588,10 @@ time_of_first_sample = addTicks(time_of_first_sample, time_for_startup_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011lu ticks)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011"PRIu64" ticks)...\n", time_for_startup_frames, time_for_startup_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011lu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", time_of_first_sample, (unsigned int)TICKS_TO_SECS(time_of_first_sample), (unsigned int)TICKS_TO_CYCLES(time_of_first_sample), @@ -602,12 +604,12 @@ uint64_t time_to_start_recv = substractTicks(time_of_first_sample, prestart_cycles_for_recv * TICKS_PER_CYCLE); - debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011lu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", time_to_start_xmit, (unsigned int)TICKS_TO_SECS(time_to_start_xmit), (unsigned int)TICKS_TO_CYCLES(time_to_start_xmit), (unsigned int)TICKS_TO_OFFSET(time_to_start_xmit)); - debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011lu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", time_to_start_recv, (unsigned int)TICKS_TO_SECS(time_to_start_recv), (unsigned int)TICKS_TO_CYCLES(time_to_start_recv), @@ -659,7 +661,7 @@ ffado_timestamp_t ts; signed int fc; (*it)->getBufferHeadTimestamp ( &ts, &fc ); - debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010ld => head TS %010lu, fc=%d...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010"PRId64" => head TS %010"PRIu64", fc=%d...\n", time_of_first_sample, (uint64_t)ts, fc); } @@ -689,7 +691,7 @@ time_to_start_sync = time_to_start_xmit; } if(!m_SyncSource->scheduleStartRunning(time_to_start_sync)) { - debugError("m_SyncSource->scheduleStartRunning(%11lu) failed\n", time_to_start_sync); + debugError("m_SyncSource->scheduleStartRunning(%11"PRIu64") failed\n", time_to_start_sync); return false; } @@ -699,7 +701,7 @@ ++it ) { if(*it != m_SyncSource) { if(!(*it)->scheduleStartRunning(time_to_start_recv)) { - debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_recv); + debugError("%p->scheduleStartRunning(%11"PRIu64") failed\n", *it, time_to_start_recv); return false; } } @@ -709,7 +711,7 @@ ++it ) { if(*it != m_SyncSource) { if(!(*it)->scheduleStartRunning(time_to_start_xmit)) { - debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_xmit); + debugError("%p->scheduleStartRunning(%11"PRIu64") failed\n", *it, time_to_start_xmit); return false; } } @@ -742,7 +744,7 @@ m_time_of_transfer2 = substractTicks(m_time_of_transfer2, (uint64_t)(m_period * rate)); #endif - debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010ld, rate %f...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010"PRId64", rate %f...\n", m_time_of_transfer, rate); // FIXME: ideally we'd want the SP itself to account for the xmit_prebuffer_frames @@ -761,7 +763,7 @@ // that allows us to calculate the tail timestamp for the buffer. int64_t transmit_tail_timestamp = addTicks(m_time_of_transfer, delay_in_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010ld, rate %f...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010"PRId64", rate %f...\n", transmit_tail_timestamp, rate); for ( StreamProcessorVectorIterator it = m_TransmitProcessors.begin(); @@ -772,7 +774,7 @@ ffado_timestamp_t ts; signed int fc; (*it)->getBufferHeadTimestamp ( &ts, &fc ); - debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010ld, fc=%d...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010"PRId64", fc=%d...\n", (uint64_t)ts, fc); } @@ -829,7 +831,7 @@ for ( i = 0; i < nb_rcv_sp; i++) { StreamProcessor *s = m_ReceiveProcessors.at(i); diff = diffTicks(m_SyncSource->getTimeAtPeriod(), s->getTimeAtPeriod()); - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %ld ticks...\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %"PRId64" ticks...\n", m_SyncSource, s, diff); if ( nb_sync_runs == periods_per_align_try ) { diff_between_streams[i] = diff; @@ -849,7 +851,7 @@ diff_between_streams[i] /= periods_per_align_try; diff_between_streams_frames[i] = (int)roundf(diff_between_streams[i] / s->getTicksPerFrame()); - debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %ld ticks, %d frames...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %"PRId64" ticks, %d frames...\n", m_SyncSource, s, diff_between_streams[i], diff_between_streams_frames[i]); aligned &= (diff_between_streams_frames[i] == 0); @@ -1099,8 +1101,8 @@ #ifdef DEBUG int64_t now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %"PRId64", syncdelay: %"PRId64", diff: %"PRId64"\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %"PRId64", now: %"PRId64", wait: %"PRId64"\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); #endif // wait until it's time to transfer @@ -1108,7 +1110,7 @@ #ifdef DEBUG now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %"PRId64", now: %"PRId64", excess: %"PRId64"\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); #endif // the period should be ready now @@ -1238,14 +1240,14 @@ // values is more than 50 ticks. 1 sample at 48k is 512 ticks // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_period > 50 || diff-ticks_per_period < -50) { - debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", m_time_of_transfer2, m_time_of_transfer, diff, ticks_per_period); } m_time_of_transfer2 = m_time_of_transfer; #endif debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "transfer period %d at %lu ticks...\n", + "transfer period %d at %"PRIu64" ticks...\n", m_nbperiods, m_time_of_transfer); #ifdef DEBUG @@ -1261,7 +1263,7 @@ xmt_bf = (*it)->getBufferFill(); } debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, - "XF at %011lu ticks, RBF=%d, XBF=%d, SUM=%d...\n", + "XF at %011"PRIu64" ticks, RBF=%d, XBF=%d, SUM=%d...\n", m_time_of_transfer, rcv_bf, xmt_bf, rcv_bf+xmt_bf); // check if xruns occurred on the Iso side. @@ -1334,7 +1336,7 @@ bool StreamProcessorManager::transfer(enum StreamProcessor::eProcessorType t) { if(m_SyncSource == NULL) return false; debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, - "transfer(%d) at TS=%011lu (%03us %04uc %04ut)...\n", + "transfer(%d) at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", t, m_time_of_transfer, (unsigned int)TICKS_TO_SECS(m_time_of_transfer), (unsigned int)TICKS_TO_CYCLES(m_time_of_transfer), @@ -1348,7 +1350,7 @@ it != m_ReceiveProcessors.end(); ++it ) { if(!(*it)->getFrames(m_period, m_time_of_transfer)) { - debugWarning("could not getFrames(%u, %11lu) from stream processor (%p)\n", + debugWarning("could not getFrames(%u, %11"PRIu64") from stream processor (%p)\n", m_period, m_time_of_transfer,*it); retval &= false; // buffer underrun } @@ -1371,7 +1373,7 @@ int64_t transmit_timestamp = addTicks(m_time_of_transfer, one_ringbuffer_in_ticks); if(!(*it)->putFrames(m_period, transmit_timestamp)) { - debugWarning("could not putFrames(%u,%lu) to stream processor (%p)\n", + debugWarning("could not putFrames(%u,%"PRIu64") to stream processor (%p)\n", m_period, transmit_timestamp, *it); retval &= false; // buffer underrun } @@ -1412,7 +1414,7 @@ bool StreamProcessorManager::transferSilence(enum StreamProcessor::eProcessorType t) { if(m_SyncSource == NULL) return false; debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - "transferSilence(%d) at TS=%011lu (%03us %04uc %04ut)...\n", + "transferSilence(%d) at TS=%011"PRIu64" (%03us %04uc %04ut)...\n", t, m_time_of_transfer, (unsigned int)TICKS_TO_SECS(m_time_of_transfer), (unsigned int)TICKS_TO_CYCLES(m_time_of_transfer), @@ -1426,7 +1428,7 @@ it != m_ReceiveProcessors.end(); ++it ) { if(!(*it)->dropFrames(m_period, m_time_of_transfer)) { - debugWarning("could not dropFrames(%u, %11lu) from stream processor (%p)\n", + debugWarning("could not dropFrames(%u, %11"PRIu64") from stream processor (%p)\n", m_period, m_time_of_transfer,*it); retval &= false; // buffer underrun } @@ -1449,7 +1451,7 @@ int64_t transmit_timestamp = addTicks(m_time_of_transfer, one_ringbuffer_in_ticks); if(!(*it)->putSilenceFrames(m_period, transmit_timestamp)) { - debugWarning("could not putSilenceFrames(%u,%lu) to stream processor (%p)\n", + debugWarning("could not putSilenceFrames(%u,%"PRIu64") to stream processor (%p)\n", m_period, transmit_timestamp, *it); retval &= false; // buffer underrun } @@ -1622,7 +1624,7 @@ if (direction == Port::E_Capture) { #ifdef DEBUG if(idx >= (int)m_CapturePorts_shadow.size()) { - debugError("Capture port %d out of range (%lu)\n", idx, m_CapturePorts_shadow.size()); + debugError("Capture port %d out of range (%zd)\n", idx, m_CapturePorts_shadow.size()); return NULL; } #endif @@ -1630,7 +1632,7 @@ } else { #ifdef DEBUG if(idx >= (int)m_PlaybackPorts_shadow.size()) { - debugError("Playback port %d out of range (%lu)\n", idx, m_PlaybackPorts_shadow.size()); + debugError("Playback port %d out of range (%zd)\n", idx, m_PlaybackPorts_shadow.size()); return NULL; } #endif Modified: branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -147,10 +147,10 @@ int64_t now_t = Util::SystemTimeSource::getCurrentTime(); if(isRunning()) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "STMP: %luticks | syt_interval=%d, tpf=%f\n", + "STMP: %"PRIu64"ticks | syt_interval=%d, tpf=%f\n", m_last_timestamp, m_syt_interval, getTicksPerFrame()); /* debugOutput(DEBUG_LEVEL_NORMAL, - "STMP: %12lu ticks | delta_t: %5ld | bufferfill: %5d\n", + "STMP: %12"PRIu64" ticks | delta_t: %5"PRId64" | bufferfill: %5d\n", m_last_timestamp, now_t-last_t, m_data_buffer->getBufferFill());*/ } last_t = now_t; Modified: branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -94,7 +94,7 @@ int cycles_until_transmit; debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, - "Try for cycle %d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr) ); + "Try for cycle %d\n", (int) CYCLE_TIMER_GET_CYCLES(pkt_ctr) ); // check whether the packet buffer has packets for us to send. // the base timestamp is the one of the next sample in the buffer ffado_timestamp_t ts_head_tmp; @@ -140,8 +140,8 @@ if ( cycles_until_presentation <= m_min_cycles_before_presentation ) { debugOutput( DEBUG_LEVEL_NORMAL, - "Insufficient frames (P): N=%02d, CY=%04lu, TC=%04u, CUT=%04d\n", - fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "Insufficient frames (P): N=%02d, CY=%04d, TC=%04u, CUT=%04d\n", + fc, (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit ); // we are too late return eCRV_XRun; @@ -152,8 +152,8 @@ unsigned int now_cycle = ( unsigned int ) ( TICKS_TO_CYCLES ( m_1394service.getCycleTimerTicks() ) ); debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "Insufficient frames (NP): N=%02d, CY=%04u, TC=%04u, CUT=%04d, NOW=%04d\n", - fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "Insufficient frames (NP): N=%02d, CY=%04d, TC=%04u, CUT=%04d, NOW=%04d\n", + fc, (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, now_cycle ); #endif @@ -199,8 +199,8 @@ { // we are too late debugOutput(DEBUG_LEVEL_VERBOSE, - "Too late: CY=%04lu, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "Too late: CY=%04d, TC=%04u, CUT=%04d, TSP=%011"PRIu64" (%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time) ); //debugShowBackLogLines(200); @@ -228,7 +228,7 @@ // for timestamp tracing debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "XMIT PKT: TSP= %011lu (%04u) (%04u) (%04u)\n", + "XMIT PKT: TSP= %011"PRIu64" (%04u) (%04u) (%04u)\n", presentation_time, (unsigned int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), presentation_cycle, transmit_at_cycle); @@ -238,8 +238,8 @@ else { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRId64" (%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time)); @@ -247,8 +247,8 @@ if ( cycles_until_transmit > m_max_cycles_to_transmit_early + 1 ) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRId64"(%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time)); @@ -268,7 +268,7 @@ if (m_data_buffer->readFrames(m_syt_interval, (char *)(data + 8))) { debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "XMIT DATA: TSP= %011lu (%04u)\n", + "XMIT DATA: TSP= %011"PRIu64" (%04u)\n", m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); #if 0 @@ -300,8 +300,8 @@ { struct iec61883_packet *packet = ( struct iec61883_packet * ) data; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "XMIT SILENT (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, + "XMIT SILENT (cy %04d): TSP=%011"PRIu64" (%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); packet->sid = m_local_node_id; @@ -337,8 +337,8 @@ { struct iec61883_packet *packet = ( struct iec61883_packet * ) data; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, + "XMIT EMPTY (cy %04d): TSP=%011"PRIu64" (%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp) ); packet->sid = m_local_node_id; Modified: branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -377,7 +377,7 @@ #ifdef DEBUG if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %"PRId64"\n", tsp_diff); double tsp_diff_d = tsp_diff; double fs_syt = 1.0/tsp_diff_d; fs_syt *= (double)getNominalFramesPerPacket() * (double)TICKS_PER_USEC * 1e6; @@ -398,8 +398,8 @@ // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { debugOutput(DEBUG_LEVEL_VERBOSE, - "cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, + "cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); // !!!HACK!!! FIXME: this is the result of a failure in wrapping/unwrapping somewhere // it's definitely a bug. @@ -409,8 +409,8 @@ last_timestamp_fixed = addTicks(m_last_timestamp, TICKS_PER_SECOND); diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { - debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, + debugWarning("cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); debugWarning("HACK: fixed by adding one second of ticks. This is a bug being run-time fixed.\n"); m_last_timestamp = last_timestamp_fixed; @@ -419,8 +419,8 @@ last_timestamp_fixed = substractTicks(m_last_timestamp, TICKS_PER_SECOND); diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { - debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, + debugWarning("cy %04d rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); debugWarning("HACK: fixed by subtracing one second of ticks. This is a bug being run-time fixed.\n"); m_last_timestamp = last_timestamp_fixed; @@ -428,16 +428,16 @@ } } debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "%04u %011lu %011lu %d %d\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "%04u %011"PRIu64" %011"PRIu64" %d %d\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); } #endif debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "RECV: CY=%04u TS=%011lu\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), + "RECV: CY=%04u TS=%011"PRIu64"\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); if(m_correct_last_timestamp) { @@ -605,8 +605,8 @@ enum eChildReturnValue result = generateSilentPacketHeader(data, length, tag, sy, pkt_ctr); if (result == eCRV_Packet) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "XMIT SILENT: CY=%04u TS=%011lu\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); + "XMIT SILENT: CY=%04u TS=%011"PRIu64"\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); // assumed not to xrun generateSilentPacketData(data, length); @@ -656,8 +656,8 @@ enum eChildReturnValue result = generatePacketHeader(data, length, tag, sy, pkt_ctr); if (result == eCRV_Packet || result == eCRV_Defer) { debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "XMIT: CY=%04u TS=%011lu\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); + "XMIT: CY=%04u TS=%011"PRIu64"\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); // valid packet timestamp m_last_timestamp2 = prev_timestamp; @@ -693,7 +693,7 @@ #ifdef DEBUG if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %"PRId64"\n", tsp_diff); double tsp_diff_d = tsp_diff; double fs_syt = 1.0/tsp_diff_d; fs_syt *= (double)getNominalFramesPerPacket() * (double)TICKS_PER_USEC * 1e6; @@ -702,7 +702,7 @@ double fs_diff_norm = fs_diff/fs_nom; debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)\n", fs_nom, fs_syt, fs_diff, fs_diff_norm); -// debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011lu, m_last_timestamp2: %011lu\n", +// debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011"PRIu64", m_last_timestamp2: %011"PRIu64"\n", // fs_diff, m_last_timestamp, m_last_timestamp2); if (fs_diff_norm > 0.01 || fs_diff_norm < -0.01) { debugWarning( "Instantanous samplerate more than 1%% off nominal. [Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)]\n", @@ -715,13 +715,13 @@ // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { debugOutput(DEBUG_LEVEL_VERBOSE, - "cy %04ld, rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, + "cy %04d, rather large TSP difference TS=%011"PRIu64" => TS=%011"PRIu64" (%d, nom %d)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); } debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "%04ld %011lu %011lu %d %d\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, + "%04d %011"PRIu64" %011"PRIu64" %d %d\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); } #endif @@ -756,7 +756,7 @@ } goto send_empty_packet; } else if (result == eCRV_Again) { - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %ld\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr)); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %d\n", (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr)); if(m_state != m_next_state) { debugOutput(DEBUG_LEVEL_VERBOSE, "Should update state from %s to %s\n", ePSToString(m_state), ePSToString(m_next_state)); @@ -791,7 +791,7 @@ } debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "XMIT EMPTY: CY=%04u\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr)); + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr)); generateEmptyPacketHeader(data, length, tag, sy, pkt_ctr); generateEmptyPacketData(data, length); @@ -808,7 +808,7 @@ bool StreamProcessor::getFrames(unsigned int nbframes, int64_t ts) { bool result; debugOutputExtreme( DEBUG_LEVEL_VERBOSE, - "(%p, %s) getFrames(%d, %11lu)\n", + "(%p, %s) getFrames(%d, %11"PRIu64")\n", this, getTypeString(), nbframes, ts); assert( getType() == ePT_Receive ); if(isDryRunning()) result = getFramesDry(nbframes, ts); @@ -839,15 +839,15 @@ lag_ticks = diffTicks(ts, ts_expected); lag_frames = (((float)lag_ticks) / srate); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", + "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); if (lag_frames >= 1.0) { // the stream lags - debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); } else if (lag_frames <= -1.0) { // the stream leads - debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %"PRId64", %"PRIu64", %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); } #endif @@ -861,7 +861,7 @@ bool StreamProcessor::getFramesDry(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "stream (%p): dry run %d frames (@ ts=%ld)\n", + "stream (%p): dry run %d frames (@ ts=%"PRId64")\n", this, nbframes, ts); // dry run on this side means that we put silence in all enabled ports // since there is do data put into the ringbuffer in the dry-running state @@ -872,7 +872,7 @@ StreamProcessor::dropFrames(unsigned int nbframes, int64_t ts) { bool result; - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %ld)\n", nbframes, ts); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %"PRId64")\n", nbframes, ts); result = m_data_buffer->dropFrames(nbframes); SIGNAL_ACTIVITY_ISO_RECV; return result; @@ -882,7 +882,7 @@ { bool result; debugOutputExtreme( DEBUG_LEVEL_VERBOSE, - "(%p, %s) putFrames(%d, %11lu)\n", + "(%p, %s) putFrames(%d, %11"PRIu64")\n", this, getTypeString(), nbframes, ts); assert( getType() == ePT_Transmit ); if(isDryRunning()) result = putFramesDry(nbframes, ts); @@ -895,12 +895,12 @@ StreamProcessor::putFramesWet(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "StreamProcessor::putFramesWet(%d, %lu)\n", + "StreamProcessor::putFramesWet(%d, %"PRIu64")\n", nbframes, ts); // transfer the data m_data_buffer->blockProcessWriteFrames(nbframes, ts); debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - " New timestamp: %lu\n", ts); + " New timestamp: %"PRIu64"\n", ts); return true; // FIXME: what about failure? } @@ -908,7 +908,7 @@ StreamProcessor::putFramesDry(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "StreamProcessor::putFramesDry(%d, %lu)\n", + "StreamProcessor::putFramesDry(%d, %"PRIu64")\n", nbframes, ts); // do nothing return true; @@ -918,7 +918,7 @@ StreamProcessor::putSilenceFrames(unsigned int nbframes, int64_t ts) { debugOutput(DEBUG_LEVEL_VERY_VERBOSE, - "StreamProcessor::putSilenceFrames(%d, %lu)\n", + "StreamProcessor::putSilenceFrames(%d, %"PRIu64")\n", nbframes, ts); size_t bytes_per_frame = getEventSize() * getEventsPerFrame(); @@ -1069,7 +1069,7 @@ // make the scratch buffer one period of frames long m_scratch_buffer_size_bytes = m_StreamProcessorManager.getPeriodSize() * getEventsPerFrame() * getEventSize(); - debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %ld quadlets\n", m_scratch_buffer_size_bytes); + debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %zd quadlets\n", m_scratch_buffer_size_bytes); if(m_scratch_buffer) delete[] m_scratch_buffer; m_scratch_buffer = new byte_t[m_scratch_buffer_size_bytes]; if(m_scratch_buffer == NULL) { @@ -1158,12 +1158,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011"PRIu64" (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011"PRIu64" (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1204,12 +1204,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011"PRIu64" (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011"PRIu64" (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1228,12 +1228,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011"PRIu64" (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011"PRIu64" (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1253,12 +1253,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011"PRIu64" (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011"PRIu64" (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1900,7 +1900,7 @@ debugError("No handler for stream??\n"); } uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011lu (%03us %04uc %04ut)\n", + debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011"PRIu64" (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), Modified: branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -181,7 +181,7 @@ // later than expected (the real receive time) #ifdef DEBUG if(isRunning()) { - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %luticks | tpf=%f\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %"PRIu64"ticks | tpf=%f\n", m_last_timestamp, getTicksPerFrame()); } #endif Modified: branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -196,7 +196,7 @@ { // we are too late debugOutput(DEBUG_LEVEL_VERBOSE, - "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", + "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011"PRIu64" (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time) ); @@ -231,7 +231,7 @@ else { debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, - "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", + "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRIu64" (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, transmit_at_time, ( unsigned int ) TICKS_TO_CYCLES ( transmit_at_time ), @@ -240,7 +240,7 @@ if ( cycles_until_transmit > MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY + 1 ) { debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, - "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", + "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011"PRIu64" (%04u), TSP=%011"PRIu64" (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, transmit_at_time, ( unsigned int ) TICKS_TO_CYCLES ( transmit_at_time ), @@ -288,8 +288,8 @@ unsigned char *tag, unsigned char *sy, uint32_t pkt_ctr ) { - debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04lu, TSP=%011lu (%04u)\n", - CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, + debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04d, TSP=%011"PRIu64" (%04u)\n", + (int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); // Do housekeeping expected for all packets sent to the MOTU, even @@ -317,7 +317,7 @@ { unsigned int cycle = CYCLE_TIMER_GET_CYCLES(pkt_ctr); - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011lu (%04u)\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011"PRIu64" (%04u)\n", cycle, m_last_timestamp, ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); Modified: branches/libffado-2.0/src/libutil/Configuration.cpp =================================================================== --- branches/libffado-2.0/src/libutil/Configuration.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/Configuration.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -189,7 +189,7 @@ { int64_t i = s; debugOutput(DEBUG_LEVEL_NORMAL, - " %s%s = %ld (0x%016lX)\n", + " %s%s = %"PRId64" (0x%016"PRIX64")\n", prefix.c_str(), s.getName(), i, i); } break; @@ -258,7 +258,7 @@ Setting::Type t = s->getType(); if(t == Setting::TypeInt64) { ref = *s; - debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %ld\n", path.c_str(), ref); + debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %"PRId64"\n", path.c_str(), ref); return true; } else { debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has wrong type\n", path.c_str()); Modified: branches/libffado-2.0/src/libutil/StreamStatistics.cpp =================================================================== --- branches/libffado-2.0/src/libutil/StreamStatistics.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/StreamStatistics.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -54,7 +54,7 @@ void StreamStatistics::dumpInfo() { debugOutputShort( DEBUG_LEVEL_VERBOSE, - "--- Stats for %s: min=%d avg=%f max=%ld cnt=%ld sum=%ld\n", + "--- Stats for %s: min=%d avg=%f max=%"PRId64" cnt=%"PRId64" sum=%"PRId64"\n", m_name.c_str(), m_min, m_average, m_max, m_count, m_sum); debugOutputShort( DEBUG_LEVEL_VERBOSE, " Signal stats\n"); for (unsigned int i=0;i <= MAX_SIGNAL_VALUE; i++) { Modified: branches/libffado-2.0/src/libutil/SystemTimeSource.cpp =================================================================== --- branches/libffado-2.0/src/libutil/SystemTimeSource.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/SystemTimeSource.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -54,8 +54,8 @@ ts.tv_sec = wake_at_usec / (1000000LL); ts.tv_nsec = (wake_at_usec % (1000000LL)) * 1000LL; debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "clock_nanosleep until %ld sec, %lld nanosec\n", - (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); + "clock_nanosleep until %"PRId64" sec, %"PRId64" nanosec\n", + (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); int err = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL); if(err) { // maybe signal occurred, but we're going to ignore that Modified: branches/libffado-2.0/src/libutil/Time.h =================================================================== --- branches/libffado-2.0/src/libutil/Time.h 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/Time.h 2009-11-22 17:05:16 UTC (rev 1722) @@ -24,6 +24,7 @@ #ifndef __Time__ #define __Time__ +#define __STDC_FORMAT_MACROS #include <inttypes.h> #include "SystemTimeSource.h" @@ -33,6 +34,7 @@ * monotonic clock with units of microseconds. */ typedef uint64_t ffado_microsecs_t; +#define PRI_FFADO_MICROSECS_T PRIu64 static inline void SleepRelativeUsec(ffado_microsecs_t usec) { Util::SystemTimeSource::SleepUsecRelative(usec); Modified: branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp =================================================================== --- branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -504,7 +504,7 @@ size_t written = ffado_ringbuffer_write(m_event_buffer, data, write_size); if (written < write_size) { - debugWarning("ringbuffer full, %u, %lu\n", write_size, written); + debugWarning("ringbuffer full, %u, %zd\n", write_size, written); return false; } incrementFrameCounter(nframes, ts); @@ -533,7 +533,7 @@ size_t written = ffado_ringbuffer_write(m_event_buffer, data, write_size); if (written < write_size) { - debugWarning("ringbuffer full, request: %u, actual: %lu\n", write_size, written); + debugWarning("ringbuffer full, request: %u, actual: %zd\n", write_size, written); return false; } @@ -644,7 +644,7 @@ ffado_ringbuffer_get_write_vector(m_event_buffer, vec); if(vec[0].len + vec[1].len < m_process_block_size) { // this indicates a full event buffer - debugError("Event buffer overrun in buffer %p, fill: %lu, bytes2write: %u \n", + debugError("Event buffer overrun in buffer %p, fill: %zd, bytes2write: %u \n", this, ffado_ringbuffer_read_space(m_event_buffer), bytes2write); debugShowBackLog(); return false; Modified: branches/libffado-2.0/src/libutil/serialize_expat.cpp =================================================================== --- branches/libffado-2.0/src/libutil/serialize_expat.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/src/libutil/serialize_expat.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -116,7 +116,7 @@ // element to be added Xml::Node& n = pNode->add( Xml::Node(tokens[tokens.size() - 1].c_str(), NULL) ); char* valstr; - asprintf( &valstr, "%ld", value ); + asprintf( &valstr, "%"PRId64"", value ); n.set_child_text( valstr ); free( valstr ); } else { Modified: branches/libffado-2.0/support/firmware/fireworks-downloader.cpp =================================================================== --- branches/libffado-2.0/support/firmware/fireworks-downloader.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/support/firmware/fireworks-downloader.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -22,6 +22,7 @@ * */ +#include "fbtypes.h" #include "downloader.h" #include "config.h" @@ -212,7 +213,7 @@ } if (node_id < 0) { - printMessage("Could not find device with GUID 0x%016lX\n", guid); + printMessage("Could not find device with GUID 0x%016"PRIX64"\n", guid); return -1; } Modified: branches/libffado-2.0/tests/streaming/teststreaming3.cpp =================================================================== --- branches/libffado-2.0/tests/streaming/teststreaming3.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/tests/streaming/teststreaming3.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -263,7 +263,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); + debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", (int)arguments.verbose); setDebugLevel(arguments.verbose); int nb_in_channels=0, nb_out_channels=0; Modified: branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp =================================================================== --- branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -187,7 +187,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); + debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", (int) arguments.port); do { if (raw1394_get_port_info(handle, NULL, 0) < 0) @@ -224,7 +224,7 @@ return 1; } - debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); + debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", (int)arguments.rtprio); set_realtime_priority(arguments.rtprio); debugOutput(DEBUG_LEVEL_INFO, "Starting iterate loop...\n"); Modified: branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp =================================================================== --- branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -231,7 +231,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); + debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", (int) arguments.verbose); setDebugLevel(arguments.verbose); debugOutput(DEBUG_LEVEL_INFO, "Get 1394 handle...\n"); @@ -242,7 +242,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); + debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", (int)arguments.port); do { if (raw1394_get_port_info(handle, NULL, 0) < 0) @@ -269,7 +269,7 @@ } raw1394_set_bus_reset_handler(handle, myResetHandler); - debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); + debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", (int)arguments.rtprio); set_realtime_priority(arguments.rtprio); int countdown = arguments.countdown; Modified: branches/libffado-2.0/tests/test-ffado.cpp =================================================================== --- branches/libffado-2.0/tests/test-ffado.cpp 2009-11-22 15:26:31 UTC (rev 1721) +++ branches/libffado-2.0/tests/test-ffado.cpp 2009-11-22 17:05:16 UTC (rev 1722) @@ -350,7 +350,7 @@ int i=0; int devices_on_bus = m_deviceManager->getNbDevices(); - printf(" port = %ld, devices_on_bus = %d\n", arguments.port, devices_on_bus); + printf(" port = %d, devices_on_bus = %d\n", (int)arguments.port, devices_on_bus); for(i=0;i<devices_on_bus;i++) { int node_id=m_deviceManager->getDeviceNodeId(i); @@ -442,7 +442,7 @@ // switch off all messages since they mess up the list service.setVerboseLevel(arguments.verbose); if ( !service.initialize( arguments.port ) ) { - printf("Could not initialize IEEE 1394 service on port %ld\n", arguments.port); + printf("Could not initialize IEEE 1394 service on port %d\n", (int)arguments.port); return exitfunction(-1); } @@ -454,8 +454,8 @@ } if (!service.setSplitTimeoutUsecs(nodeid, usecs)) { - printf("Failed to set SPLIT_TIMEOUT to %u for node %X on port %ld\n", - usecs, nodeid, arguments.port); + printf("Failed to set SPLIT_TIMEOUT to %u for node %X on port %d\n", + usecs, nodeid, (int)arguments.port); return exitfunction(-1); } @@ -465,7 +465,7 @@ // switch off all messages since they mess up the list service.setVerboseLevel(arguments.verbose); if ( !service.initialize( arguments.port ) ) { - printf("Could not initialize IEEE 1394 service on port %ld\n", arguments.port); + printf("Could not initialize IEEE 1394 service on port %d\n", (int)arguments.port); return exitfunction(-1); } @@ -477,12 +477,12 @@ } int usecs = service.getSplitTimeoutUsecs(nodeid); if (usecs < 0) { - printf("Failed to get SPLIT_TIMEOUT for node %X on port %ld\n", - nodeid, arguments.port); + printf("Failed to get SPLIT_TIMEOUT for node %X on port %d\n", + nodeid, (int)arguments.port); return exitfunction(-1); } - printf("SPLIT_TIMEOUT for node %X on port %ld is %u\n", - nodeid, arguments.port, usecs); + printf("SPLIT_TIMEOUT for node %X on port %d is %u\n", + nodeid, (int)arguments.port, usecs); return exitfunction(0); } else if ( strcmp( arguments.args[0], "SytCalcTest" ) == 0 ) { @@ -510,7 +510,7 @@ } uint64_t result_rcv = sytRecvToFullTicks(syt_timestamp, rcv_cycle, ctr_now); uint64_t result_xmt = sytXmitToFullTicks(syt_timestamp, rcv_cycle, ctr_now); - printf("RCV: 0x%010lX %010lu XMT: 0x%010lX %010lu CTR: %010lu\n", + printf("RCV: 0x%010"PRIX64" %010"PRIu64" XMT: 0x%010"PRIX64" %010"PRIu64" CTR: %010"PRIu64"\n", result_rcv, result_rcv, result_xmt, result_xmt, CYCLE_TIMER_TO_TICKS(ctr_now)); } else { |
Author: ppalmers Date: 2009-11-22 07:26:31 -0800 (Sun, 22 Nov 2009) New Revision: 1721 Modified: branches/libffado-2.0/src/debugmodule/debugmodule.cpp branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp branches/libffado-2.0/src/libieee1394/IsoHandler.cpp branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp branches/libffado-2.0/src/libieee1394/ieee1394service.cpp branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp branches/libffado-2.0/src/libutil/Configuration.cpp branches/libffado-2.0/src/libutil/PosixThread.cpp branches/libffado-2.0/src/libutil/StreamStatistics.cpp branches/libffado-2.0/src/libutil/SystemTimeSource.cpp branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp branches/libffado-2.0/src/libutil/serialize_expat.cpp branches/libffado-2.0/src/libutil/serialize_libxml.cpp branches/libffado-2.0/support/firmware/fireworks-downloader.cpp branches/libffado-2.0/tests/streaming/teststreaming3.cpp branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp branches/libffado-2.0/tests/test-ffado.cpp Log: fix all format string warnings Modified: branches/libffado-2.0/src/debugmodule/debugmodule.cpp =================================================================== --- branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -185,7 +185,7 @@ // format the message such that it remains together int chars_written=0; int retval=0; - retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4d] %s: ", + retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4u] %s: ", ts_usec, getPreSequence( level ), fname, line, function ); if (retval >= 0) chars_written += retval; // ignore errors Modified: branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp =================================================================== --- branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -248,12 +248,14 @@ // copy the payload - if (bytes_read+readDescCmd.m_data_length>m_descriptor_length) { + if (bytes_read + readDescCmd.m_data_length > m_descriptor_length) { debugWarning("Device returned too much data, truncating\n"); readDescCmd.m_data_length=m_descriptor_length-bytes_read; } - debugOutput(DEBUG_LEVEL_VERBOSE, " copying %u bytes to internal buffer offset %lu\n",readDescCmd.m_data_length, bytes_read); + debugOutput(DEBUG_LEVEL_VERBOSE, + " copying %u bytes to internal buffer offset %lu\n", + readDescCmd.m_data_length, bytes_read); memcpy(m_data+bytes_read,readDescCmd.m_data, readDescCmd.m_data_length); bytes_read += readDescCmd.m_data_length; Modified: branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -290,10 +290,10 @@ } cycle_timer_ticks = CYCLE_TIMER_TO_TICKS(cycle_timer); - debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11lu, local: %17llu\n", + debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, " read : CTR: %11u, local: %17lu\n", cycle_timer, local_time); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ctr : 0x%08X %11llu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)cycle_timer_ticks ), @@ -408,7 +408,7 @@ // // simulate a random scheduling delay between (0-10ms) // ffado_microsecs_t tmp = Util::SystemTimeSource::SleepUsecRandom(10000); - // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of %lu usecs...\n", this, tmp); + // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of %u usecs...\n", this, tmp); if(m_unhandled_busreset) { debugOutput(DEBUG_LEVEL_VERBOSE, @@ -418,10 +418,10 @@ return true; } - debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11lu, local: %17llu\n", + debugOutputExtreme( DEBUG_LEVEL_ULTRA_VERBOSE, " read : CTR: %11u, local: %17lu\n", cycle_timer, local_time); debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - " ctr : 0x%08X %11llu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", (uint32_t)cycle_timer, (uint64_t)cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)cycle_timer_ticks ), @@ -461,7 +461,7 @@ if (ticks_late >= 0) { diff_ticks_corr = diff_ticks - ticks_late; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "diff_ticks_corr=%ld, diff_ticks = %ld, ticks_late = %ld\n", + "diff_ticks_corr=%d, diff_ticks = %ld, ticks_late = %ld\n", diff_ticks_corr, diff_ticks, ticks_late); } else { debugError("Early wakeup, should not happen!\n"); @@ -525,26 +525,26 @@ m_next_time_usecs += m_usecs_per_update; debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " usecs: current: %f next: %f usecs_late=%ld ticks_late=%ld\n", + " usecs: current: %f next: %f usecs_late=%d ticks_late=%ld\n", m_current_time_usecs, m_next_time_usecs, usecs_late, ticks_late); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: current: %f next: %f diff=%ld\n", + " ticks: current: %f next: %f diff=%d\n", m_current_time_ticks, m_next_time_ticks, diff_ticks); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: current: %011llu (%03us %04ucy %04uticks)\n", + " ticks: current: %011lu (%03us %04ucy %04uticks)\n", (uint64_t)m_current_time_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)m_current_time_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)m_current_time_ticks ), (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_current_time_ticks ) ); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: next : %011llu (%03us %04ucy %04uticks)\n", + " ticks: next : %011lu (%03us %04ucy %04uticks)\n", (uint64_t)m_next_time_ticks, (unsigned int)TICKS_TO_SECS( (uint64_t)m_next_time_ticks ), (unsigned int)TICKS_TO_CYCLES( (uint64_t)m_next_time_ticks ), (unsigned int)TICKS_TO_OFFSET( (uint64_t)m_next_time_ticks ) ); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " state: local: %11llu, dll_e2: %f, rate: %f\n", + " state: local: %11lu, dll_e2: %f, rate: %f\n", local_time, m_dll_e2, getRate()); } @@ -624,13 +624,13 @@ if (y_step_in_ticks_int > 0) { retval = addTicks(offset_in_ticks_int, y_step_in_ticks_int); -/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: %ld, time_diff: %f, rate: %f, retval: %lu\n", +/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: %d, time_diff: %f, rate: %f, retval: %u\n", y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ } else { retval = substractTicks(offset_in_ticks_int, -y_step_in_ticks_int); // this can happen if the update thread was woken up earlier than it should have been -/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: %ld, time_diff: %f, rate: %f, retval: %lu\n", +/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: %d, time_diff: %f, rate: %f, retval: %u\n", y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ } Modified: branches/libffado-2.0/src/libieee1394/IsoHandler.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/IsoHandler.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libieee1394/IsoHandler.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -396,7 +396,7 @@ if((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) { debugWarning("reconstructed CTR counter discrepancy\n"); - debugWarning(" ingredients: %X, %lX, %lX, %lX, %lX, %ld, %ld, %ld, %lld\n", + debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); debugWarning(" diffcy = %ld \n", diff_cycles); } @@ -489,7 +489,7 @@ if(((pkt_ctr & ~0x0FFFL) != pkt_ctr_ref) && (m_packets > m_buf_packets)) { debugWarning("reconstructed CTR counter discrepancy\n"); - debugWarning(" ingredients: %X, %lX, %lX, %lX, %lX, %ld, %ld, %ld, %lld\n", + debugWarning(" ingredients: %X, %X, %X, %X, %X, %d, %ld, %ld, %ld\n", cycle, pkt_ctr_ref, pkt_ctr, now, m_last_now, now_secs_ref, CYCLE_TIMER_GET_SECS(now), CYCLE_TIMER_GET_SECS(m_last_now), tmp); debugWarning(" diffcy = %ld \n", diff_cycles); } Modified: branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libieee1394/IsoHandlerManager.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -112,7 +112,7 @@ if(h->getType() != m_handlerType) continue; if (!h->handleBusReset()) { - debugWarning("Failed to handle busreset on %p\n"); + debugWarning("Failed to handle busreset on %p\n", h); retval = false; } } @@ -330,11 +330,11 @@ int64_t measured_diff_ticks = diffTicks(ctr_at_poll_return_ticks, last_packet_seen_ticks); debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "(%p, %s) check handler %d: diff = %lld, max = %lld, now: %08lX, last: %08lX\n", + "(%p, %s) check handler %d: diff = %ld, max = %lld, now: %08lX, last: %08lX\n", this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), i, measured_diff_ticks, max_diff_ticks, ctr_at_poll_return, last_packet_seen); if(measured_diff_ticks > max_diff_ticks) { - debugFatal("(%p, %s) Handler died: now: %08lX, last: %08lX, diff: %lld (max: %lld)\n", + debugFatal("(%p, %s) Handler died: now: %08X, last: %08X, diff: %ld (max: %ld)\n", this, (m_handlerType == IsoHandler::eHT_Transmit? "Transmit": "Receive"), ctr_at_poll_return, last_packet_seen, measured_diff_ticks, max_diff_ticks); m_IsoHandler_map_shadow[i]->notifyOfDeath(); @@ -415,13 +415,13 @@ } else if (errno == EINVAL) { debugError("(%p) sem_timedwait error (result=%d errno=EINVAL)\n", this, result); - debugError("(%p) timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n", + debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); return eAR_Error; } else { debugError("(%p) sem_timedwait error (result=%d errno=%d)\n", this, result, errno); - debugError("(%p) timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n", + debugError("(%p) timeout_nsec=%lld ts.sec=%ld ts.nsec=%ld\n", this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); return eAR_Error; } @@ -887,7 +887,7 @@ debugOutput( DEBUG_LEVEL_VERBOSE, " registered stream (%p) with handler (%p)\n", stream, h); m_StreamProcessors.push_back(stream); - debugOutput( DEBUG_LEVEL_VERBOSE, " %d streams, %d handlers registered\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " %lu streams, %lu handlers registered\n", m_StreamProcessors.size(), m_IsoHandlers.size()); return true; } Modified: branches/libffado-2.0/src/libieee1394/ieee1394service.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/ieee1394service.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libieee1394/ieee1394service.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -508,7 +508,7 @@ #ifdef DEBUG debugOutput(DEBUG_LEVEL_VERY_VERBOSE, - "read: node 0x%hX, addr = 0x%016llX, length = %u\n", + "read: node 0x%hX, addr = 0x%016lX, length = %lu\n", nodeId, addr, length); printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, buffer ); #endif @@ -517,7 +517,7 @@ } else { #ifdef DEBUG debugOutput(DEBUG_LEVEL_NORMAL, - "raw1394_read failed: node 0x%hX, addr = 0x%016llX, length = %u\n", + "raw1394_read failed: node 0x%hX, addr = 0x%016lX, length = %lu\n", nodeId, addr, length); #endif return false; @@ -563,7 +563,7 @@ } #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016llX, length = %d\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"write: node 0x%hX, addr = 0x%016lX, length = %lu\n", nodeId, addr, length); printBuffer( DEBUG_LEVEL_VERY_VERBOSE, length, data ); #endif @@ -600,15 +600,15 @@ return false; } #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016llX\n", + debugOutput(DEBUG_LEVEL_VERBOSE,"lockCompareSwap64: node 0x%X, addr = 0x%016lX\n", nodeId, addr); - debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016llX) *(addr)=0x%016llX\n", + debugOutput(DEBUG_LEVEL_VERBOSE," if (*(addr)==0x%016lX) *(addr)=0x%016lX\n", compare_value, swap_value); fb_octlet_t buffer; if(!read_octlet( nodeId, addr,&buffer )) { debugWarning("Could not read register\n"); } else { - debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016llX\n", buffer); + debugOutput(DEBUG_LEVEL_VERBOSE,"before = 0x%016lX\n", buffer); } #endif @@ -632,7 +632,7 @@ if(!read_octlet( nodeId, addr,&buffer )) { debugWarning("Could not read register\n"); } else { - debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016llX\n", buffer); + debugOutput(DEBUG_LEVEL_VERBOSE,"after = 0x%016lX\n", buffer); } #endif @@ -826,7 +826,7 @@ fb_quadlet_t *data_quads = (fb_quadlet_t *)data; #ifdef DEBUG - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %d bytes\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"fcp response: node 0x%hX, response = %d, length = %lu bytes\n", nodeid, response, length); printBuffer(DEBUG_LEVEL_VERY_VERBOSE, (length+3)/4, data_quads ); #endif @@ -856,7 +856,7 @@ #endif } else if(FCP_MASK_SUBUNIT_AND_OPCODE(first_quadlet) != FCP_MASK_SUBUNIT_AND_OPCODE(CondSwapFromBus32(m_fcp_block.request[0]))) { - debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response not for this request: %08lX != %08lX\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "FCP response not for this request: %08X != %08X\n", FCP_MASK_SUBUNIT_AND_OPCODE(first_quadlet), FCP_MASK_SUBUNIT_AND_OPCODE(CondSwapFromBus32(m_fcp_block.request[0]))); } else if(m_filterFCPResponse && (memcmp(fcp_block_last.response, data, length) == 0)) { @@ -920,14 +920,14 @@ debugOutput(DEBUG_LEVEL_VERBOSE, "read of CSR_SPLIT_TIMEOUT_HI failed\n"); return 0; } - debugOutput(DEBUG_LEVEL_VERBOSE, " READ HI: 0x%08lX\n", split_timeout_hi); + debugOutput(DEBUG_LEVEL_VERBOSE, " READ HI: 0x%08X\n", split_timeout_hi); if(!readNoLock( 0xffc0 | nodeId, CSR_REGISTER_BASE + CSR_SPLIT_TIMEOUT_LO, 1, &split_timeout_low)) { debugOutput(DEBUG_LEVEL_VERBOSE, "read of CSR_SPLIT_TIMEOUT_LO failed\n"); return 0; } - debugOutput(DEBUG_LEVEL_VERBOSE, " READ LO: 0x%08lX\n", split_timeout_low); + debugOutput(DEBUG_LEVEL_VERBOSE, " READ LO: 0x%08X\n", split_timeout_low); split_timeout_hi = CondSwapFromBus32(split_timeout_hi); split_timeout_low = CondSwapFromBus32(split_timeout_low); @@ -1380,7 +1380,7 @@ debugOutput( DEBUG_LEVEL_VERBOSE, " Name: %s\n", getPortName().c_str() ); debugOutput( DEBUG_LEVEL_VERBOSE, " CycleTimerHelper: %p, IsoManager: %p, WatchDog: %p\n", m_pCTRHelper, m_pIsoManager, m_pWatchdog ); - debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011llu (%03us %04ucy %04uticks)\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " Time: %011lu (%03us %04ucy %04uticks)\n", ctr, (unsigned int)TICKS_TO_SECS( ctr ), (unsigned int)TICKS_TO_CYCLES( ctr ), Modified: branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/StreamProcessorManager.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -191,13 +191,13 @@ } else if (errno == EINVAL) { debugError("(%p) sem_[timed]wait error (result=%d errno=EINVAL)\n", this, result); - debugError("(%p) timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n", + debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); return eAR_Error; } else { debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n", this, result, errno); - debugError("(%p) timeout_nsec=%lld ts.sec=%d ts.nsec=%lld\n", + debugError("(%p) timeout_nsec=%ld ts.sec=%ld ts.nsec=%ld\n", this, m_activity_wait_timeout_nsec, ts.tv_sec, ts.tv_nsec); return eAR_Error; } @@ -539,8 +539,8 @@ #ifdef DEBUG int64_t now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %lld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %lld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); #endif // wait until it's time to transfer @@ -548,7 +548,7 @@ #ifdef DEBUG now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %lld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); #endif } @@ -569,7 +569,7 @@ // determine a point in time where the system should start // figure out where we are now uint64_t time_of_first_sample = m_SyncSource->getTimeAtPeriod(); - debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011llu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " sync at TS=%011lu (%03us %04uc %04ut)...\n", time_of_first_sample, (unsigned int)TICKS_TO_SECS(time_of_first_sample), (unsigned int)TICKS_TO_CYCLES(time_of_first_sample), @@ -586,10 +586,10 @@ time_of_first_sample = addTicks(time_of_first_sample, time_for_startup_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011llu ticks)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " add %d frames (%011lu ticks)...\n", time_for_startup_frames, time_for_startup_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011llu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => first sample at TS=%011lu (%03us %04uc %04ut)...\n", time_of_first_sample, (unsigned int)TICKS_TO_SECS(time_of_first_sample), (unsigned int)TICKS_TO_CYCLES(time_of_first_sample), @@ -602,12 +602,12 @@ uint64_t time_to_start_recv = substractTicks(time_of_first_sample, prestart_cycles_for_recv * TICKS_PER_CYCLE); - debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011llu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => xmit starts at TS=%011lu (%03us %04uc %04ut)...\n", time_to_start_xmit, (unsigned int)TICKS_TO_SECS(time_to_start_xmit), (unsigned int)TICKS_TO_CYCLES(time_to_start_xmit), (unsigned int)TICKS_TO_OFFSET(time_to_start_xmit)); - debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011llu (%03us %04uc %04ut)...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => recv starts at TS=%011lu (%03us %04uc %04ut)...\n", time_to_start_recv, (unsigned int)TICKS_TO_SECS(time_to_start_recv), (unsigned int)TICKS_TO_CYCLES(time_to_start_recv), @@ -659,7 +659,7 @@ ffado_timestamp_t ts; signed int fc; (*it)->getBufferHeadTimestamp ( &ts, &fc ); - debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010lld => head TS %010lld, fc=%d...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " transmit buffer tail %010ld => head TS %010lu, fc=%d...\n", time_of_first_sample, (uint64_t)ts, fc); } @@ -689,7 +689,7 @@ time_to_start_sync = time_to_start_xmit; } if(!m_SyncSource->scheduleStartRunning(time_to_start_sync)) { - debugError("m_SyncSource->scheduleStartRunning(%11llu) failed\n", time_to_start_sync); + debugError("m_SyncSource->scheduleStartRunning(%11lu) failed\n", time_to_start_sync); return false; } @@ -699,7 +699,7 @@ ++it ) { if(*it != m_SyncSource) { if(!(*it)->scheduleStartRunning(time_to_start_recv)) { - debugError("%p->scheduleStartRunning(%11llu) failed\n", *it, time_to_start_recv); + debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_recv); return false; } } @@ -709,7 +709,7 @@ ++it ) { if(*it != m_SyncSource) { if(!(*it)->scheduleStartRunning(time_to_start_xmit)) { - debugError("%p->scheduleStartRunning(%11llu) failed\n", *it, time_to_start_xmit); + debugError("%p->scheduleStartRunning(%11lu) failed\n", *it, time_to_start_xmit); return false; } } @@ -742,7 +742,7 @@ m_time_of_transfer2 = substractTicks(m_time_of_transfer2, (uint64_t)(m_period * rate)); #endif - debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010lld, rate %f...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " initial time of transfer %010ld, rate %f...\n", m_time_of_transfer, rate); // FIXME: ideally we'd want the SP itself to account for the xmit_prebuffer_frames @@ -761,7 +761,7 @@ // that allows us to calculate the tail timestamp for the buffer. int64_t transmit_tail_timestamp = addTicks(m_time_of_transfer, delay_in_ticks); - debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010lld, rate %f...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " preset transmit tail TS %010ld, rate %f...\n", transmit_tail_timestamp, rate); for ( StreamProcessorVectorIterator it = m_TransmitProcessors.begin(); @@ -772,7 +772,7 @@ ffado_timestamp_t ts; signed int fc; (*it)->getBufferHeadTimestamp ( &ts, &fc ); - debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010lld, fc=%d...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " => transmit head TS %010ld, fc=%d...\n", (uint64_t)ts, fc); } @@ -829,7 +829,7 @@ for ( i = 0; i < nb_rcv_sp; i++) { StreamProcessor *s = m_ReceiveProcessors.at(i); diff = diffTicks(m_SyncSource->getTimeAtPeriod(), s->getTimeAtPeriod()); - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %lld ticks...\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " offset between SyncSP %p and SP %p is %ld ticks...\n", m_SyncSource, s, diff); if ( nb_sync_runs == periods_per_align_try ) { diff_between_streams[i] = diff; @@ -849,7 +849,7 @@ diff_between_streams[i] /= periods_per_align_try; diff_between_streams_frames[i] = (int)roundf(diff_between_streams[i] / s->getTicksPerFrame()); - debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %lld ticks, %d frames...\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " avg offset between SyncSP %p and SP %p is %ld ticks, %d frames...\n", m_SyncSource, s, diff_between_streams[i], diff_between_streams_frames[i]); aligned &= (diff_between_streams_frames[i] == 0); @@ -1099,8 +1099,8 @@ #ifdef DEBUG int64_t now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %lld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %lld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "CTR pred: %ld, syncdelay: %lld, diff: %lld\n", ticks_at_period, ticks_at_period_margin, ticks_at_period_margin-ticks_at_period ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "PREWAIT pred: %ld, now: %lld, wait: %lld\n", pred_system_time_at_xfer, now, pred_system_time_at_xfer-now ); #endif // wait until it's time to transfer @@ -1108,7 +1108,7 @@ #ifdef DEBUG now = Util::SystemTimeSource::getCurrentTime(); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %lld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "POSTWAIT pred: %ld, now: %lld, excess: %lld\n", pred_system_time_at_xfer, now, now-pred_system_time_at_xfer ); #endif // the period should be ready now @@ -1238,14 +1238,14 @@ // values is more than 50 ticks. 1 sample at 48k is 512 ticks // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_period > 50 || diff-ticks_per_period < -50) { - debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", m_time_of_transfer2, m_time_of_transfer, diff, ticks_per_period); } m_time_of_transfer2 = m_time_of_transfer; #endif debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "transfer period %d at %llu ticks...\n", + "transfer period %d at %lu ticks...\n", m_nbperiods, m_time_of_transfer); #ifdef DEBUG @@ -1261,7 +1261,7 @@ xmt_bf = (*it)->getBufferFill(); } debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, - "XF at %011llu ticks, RBF=%d, XBF=%d, SUM=%d...\n", + "XF at %011lu ticks, RBF=%d, XBF=%d, SUM=%d...\n", m_time_of_transfer, rcv_bf, xmt_bf, rcv_bf+xmt_bf); // check if xruns occurred on the Iso side. @@ -1334,7 +1334,7 @@ bool StreamProcessorManager::transfer(enum StreamProcessor::eProcessorType t) { if(m_SyncSource == NULL) return false; debugOutputExtreme( DEBUG_LEVEL_VERY_VERBOSE, - "transfer(%d) at TS=%011llu (%03us %04uc %04ut)...\n", + "transfer(%d) at TS=%011lu (%03us %04uc %04ut)...\n", t, m_time_of_transfer, (unsigned int)TICKS_TO_SECS(m_time_of_transfer), (unsigned int)TICKS_TO_CYCLES(m_time_of_transfer), @@ -1348,7 +1348,7 @@ it != m_ReceiveProcessors.end(); ++it ) { if(!(*it)->getFrames(m_period, m_time_of_transfer)) { - debugWarning("could not getFrames(%u, %11llu) from stream processor (%p)\n", + debugWarning("could not getFrames(%u, %11lu) from stream processor (%p)\n", m_period, m_time_of_transfer,*it); retval &= false; // buffer underrun } @@ -1371,7 +1371,7 @@ int64_t transmit_timestamp = addTicks(m_time_of_transfer, one_ringbuffer_in_ticks); if(!(*it)->putFrames(m_period, transmit_timestamp)) { - debugWarning("could not putFrames(%u,%llu) to stream processor (%p)\n", + debugWarning("could not putFrames(%u,%lu) to stream processor (%p)\n", m_period, transmit_timestamp, *it); retval &= false; // buffer underrun } @@ -1412,7 +1412,7 @@ bool StreamProcessorManager::transferSilence(enum StreamProcessor::eProcessorType t) { if(m_SyncSource == NULL) return false; debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - "transferSilence(%d) at TS=%011llu (%03us %04uc %04ut)...\n", + "transferSilence(%d) at TS=%011lu (%03us %04uc %04ut)...\n", t, m_time_of_transfer, (unsigned int)TICKS_TO_SECS(m_time_of_transfer), (unsigned int)TICKS_TO_CYCLES(m_time_of_transfer), @@ -1426,7 +1426,7 @@ it != m_ReceiveProcessors.end(); ++it ) { if(!(*it)->dropFrames(m_period, m_time_of_transfer)) { - debugWarning("could not dropFrames(%u, %11llu) from stream processor (%p)\n", + debugWarning("could not dropFrames(%u, %11lu) from stream processor (%p)\n", m_period, m_time_of_transfer,*it); retval &= false; // buffer underrun } @@ -1449,7 +1449,7 @@ int64_t transmit_timestamp = addTicks(m_time_of_transfer, one_ringbuffer_in_ticks); if(!(*it)->putSilenceFrames(m_period, transmit_timestamp)) { - debugWarning("could not putSilenceFrames(%u,%llu) to stream processor (%p)\n", + debugWarning("could not putSilenceFrames(%u,%lu) to stream processor (%p)\n", m_period, transmit_timestamp, *it); retval &= false; // buffer underrun } @@ -1622,7 +1622,7 @@ if (direction == Port::E_Capture) { #ifdef DEBUG if(idx >= (int)m_CapturePorts_shadow.size()) { - debugError("Capture port %d out of range (%d)\n", idx, m_CapturePorts_shadow.size()); + debugError("Capture port %d out of range (%lu)\n", idx, m_CapturePorts_shadow.size()); return NULL; } #endif @@ -1630,7 +1630,7 @@ } else { #ifdef DEBUG if(idx >= (int)m_PlaybackPorts_shadow.size()) { - debugError("Playback port %d out of range (%d)\n", idx, m_PlaybackPorts_shadow.size()); + debugError("Playback port %d out of range (%lu)\n", idx, m_PlaybackPorts_shadow.size()); return NULL; } #endif Modified: branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -147,10 +147,10 @@ int64_t now_t = Util::SystemTimeSource::getCurrentTime(); if(isRunning()) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "STMP: %lluticks | syt_interval=%d, tpf=%f\n", + "STMP: %luticks | syt_interval=%d, tpf=%f\n", m_last_timestamp, m_syt_interval, getTicksPerFrame()); /* debugOutput(DEBUG_LEVEL_NORMAL, - "STMP: %12llu ticks | delta_t: %5lld | bufferfill: %5d\n", + "STMP: %12lu ticks | delta_t: %5ld | bufferfill: %5d\n", m_last_timestamp, now_t-last_t, m_data_buffer->getBufferFill());*/ } last_t = now_t; Modified: branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -140,7 +140,7 @@ if ( cycles_until_presentation <= m_min_cycles_before_presentation ) { debugOutput( DEBUG_LEVEL_NORMAL, - "Insufficient frames (P): N=%02d, CY=%04u, TC=%04u, CUT=%04d\n", + "Insufficient frames (P): N=%02d, CY=%04lu, TC=%04u, CUT=%04d\n", fc, CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit ); // we are too late @@ -199,7 +199,7 @@ { // we are too late debugOutput(DEBUG_LEVEL_VERBOSE, - "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011llu (%04u)\n", + "Too late: CY=%04lu, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time) ); @@ -228,7 +228,7 @@ // for timestamp tracing debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "XMIT PKT: TSP= %011llu (%04u) (%04u) (%04u)\n", + "XMIT PKT: TSP= %011lu (%04u) (%04u) (%04u)\n", presentation_time, (unsigned int)CYCLE_TIMER_GET_CYCLES(pkt_ctr), presentation_cycle, transmit_at_cycle); @@ -238,7 +238,7 @@ else { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011llu (%04u), TSP=%011llu (%04u)\n", + "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), @@ -247,7 +247,7 @@ if ( cycles_until_transmit > m_max_cycles_to_transmit_early + 1 ) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011llu (%04u), TSP=%011llu (%04u)\n", + "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011llu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), transmit_at_cycle, cycles_until_transmit, transmit_at_time, (unsigned int)TICKS_TO_CYCLES(transmit_at_time), @@ -268,7 +268,7 @@ if (m_data_buffer->readFrames(m_syt_interval, (char *)(data + 8))) { debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "XMIT DATA: TSP= %011llu (%04u)\n", + "XMIT DATA: TSP= %011lu (%04u)\n", m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); #if 0 @@ -300,7 +300,7 @@ { struct iec61883_packet *packet = ( struct iec61883_packet * ) data; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "XMIT SILENT (cy %04d): CY=%04u, TSP=%011llu (%04u)\n", + "XMIT SILENT (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp)); @@ -337,7 +337,7 @@ { struct iec61883_packet *packet = ( struct iec61883_packet * ) data; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011llu (%04u)\n", + "XMIT EMPTY (cy %04d): CY=%04u, TSP=%011lu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, (unsigned int)TICKS_TO_CYCLES(m_last_timestamp) ); packet->sid = m_local_node_id; Modified: branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/generic/StreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -377,7 +377,7 @@ #ifdef DEBUG if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %lld\n", tsp_diff); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); double tsp_diff_d = tsp_diff; double fs_syt = 1.0/tsp_diff_d; fs_syt *= (double)getNominalFramesPerPacket() * (double)TICKS_PER_USEC * 1e6; @@ -398,7 +398,7 @@ // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { debugOutput(DEBUG_LEVEL_VERBOSE, - "cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", + "cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); // !!!HACK!!! FIXME: this is the result of a failure in wrapping/unwrapping somewhere @@ -409,7 +409,7 @@ last_timestamp_fixed = addTicks(m_last_timestamp, TICKS_PER_SECOND); diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { - debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", + debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); debugWarning("HACK: fixed by adding one second of ticks. This is a bug being run-time fixed.\n"); @@ -419,7 +419,7 @@ last_timestamp_fixed = substractTicks(m_last_timestamp, TICKS_PER_SECOND); diff = diffTicks(last_timestamp_fixed, m_last_timestamp2); if(diff-ticks_per_packet < 50 && diff-ticks_per_packet > -50) { - debugWarning("cy %04u rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", + debugWarning("cy %04lu rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); debugWarning("HACK: fixed by subtracing one second of ticks. This is a bug being run-time fixed.\n"); @@ -428,7 +428,7 @@ } } debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "%04u %011llu %011llu %d %d\n", + "%04u %011lu %011lu %d %d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); @@ -436,7 +436,7 @@ #endif debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "RECV: CY=%04u TS=%011llu\n", + "RECV: CY=%04u TS=%011lu\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); @@ -605,7 +605,7 @@ enum eChildReturnValue result = generateSilentPacketHeader(data, length, tag, sy, pkt_ctr); if (result == eCRV_Packet) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "XMIT SILENT: CY=%04u TS=%011llu\n", + "XMIT SILENT: CY=%04u TS=%011lu\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); // assumed not to xrun @@ -656,7 +656,7 @@ enum eChildReturnValue result = generatePacketHeader(data, length, tag, sy, pkt_ctr); if (result == eCRV_Packet || result == eCRV_Defer) { debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "XMIT: CY=%04u TS=%011llu\n", + "XMIT: CY=%04u TS=%011lu\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp); // valid packet timestamp @@ -693,7 +693,7 @@ #ifdef DEBUG if (m_last_timestamp > 0 && m_last_timestamp2 > 0) { int64_t tsp_diff = diffTicks(m_last_timestamp, m_last_timestamp2); - debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %lld\n", tsp_diff); + debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "TSP diff: %ld\n", tsp_diff); double tsp_diff_d = tsp_diff; double fs_syt = 1.0/tsp_diff_d; fs_syt *= (double)getNominalFramesPerPacket() * (double)TICKS_PER_USEC * 1e6; @@ -702,7 +702,7 @@ double fs_diff_norm = fs_diff/fs_nom; debugOutputExtreme(DEBUG_LEVEL_VERBOSE, "Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)\n", fs_nom, fs_syt, fs_diff, fs_diff_norm); -// debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011llu, m_last_timestamp2: %011llu\n", +// debugOutput(DEBUG_LEVEL_VERBOSE, "Diff fs: %12f, m_last_timestamp: %011lu, m_last_timestamp2: %011lu\n", // fs_diff, m_last_timestamp, m_last_timestamp2); if (fs_diff_norm > 0.01 || fs_diff_norm < -0.01) { debugWarning( "Instantanous samplerate more than 1%% off nominal. [Nom fs: %12f, Instantanous fs: %12f, diff: %12f (%12f)]\n", @@ -715,12 +715,12 @@ // so 50 ticks = 10%, which is a rather large jitter value. if(diff-ticks_per_packet > 50 || diff-ticks_per_packet < -50) { debugOutput(DEBUG_LEVEL_VERBOSE, - "cy %04d, rather large TSP difference TS=%011llu => TS=%011llu (%d, nom %d)\n", + "cy %04ld, rather large TSP difference TS=%011lu => TS=%011lu (%d, nom %d)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); } debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "%04d %011llu %011llu %d %d\n", + "%04ld %011lu %011lu %d %d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp2, m_last_timestamp, diff, ticks_per_packet); } @@ -756,7 +756,7 @@ } goto send_empty_packet; } else if (result == eCRV_Again) { - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %d\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr)); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "have to retry cycle %ld\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr)); if(m_state != m_next_state) { debugOutput(DEBUG_LEVEL_VERBOSE, "Should update state from %s to %s\n", ePSToString(m_state), ePSToString(m_next_state)); @@ -808,7 +808,7 @@ bool StreamProcessor::getFrames(unsigned int nbframes, int64_t ts) { bool result; debugOutputExtreme( DEBUG_LEVEL_VERBOSE, - "(%p, %s) getFrames(%d, %11llu)\n", + "(%p, %s) getFrames(%d, %11lu)\n", this, getTypeString(), nbframes, ts); assert( getType() == ePT_Receive ); if(isDryRunning()) result = getFramesDry(nbframes, ts); @@ -839,15 +839,15 @@ lag_ticks = diffTicks(ts, ts_expected); lag_frames = (((float)lag_ticks) / srate); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %lld, %llu, %d\n", + "stream (%p): drifts %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); if (lag_frames >= 1.0) { // the stream lags - debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %lld, %llu, %d\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): lags with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); } else if (lag_frames <= -1.0) { // the stream leads - debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %lld, %llu, %d\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "stream (%p): leads with %6d ticks = %10.5f frames (rate=%10.5f), %ld, %lu, %d\n", this, lag_ticks, lag_frames, srate, ts, ts_expected, fc); } #endif @@ -861,7 +861,7 @@ bool StreamProcessor::getFramesDry(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - "stream (%p): dry run %d frames (@ ts=%lld)\n", + "stream (%p): dry run %d frames (@ ts=%ld)\n", this, nbframes, ts); // dry run on this side means that we put silence in all enabled ports // since there is do data put into the ringbuffer in the dry-running state @@ -872,7 +872,7 @@ StreamProcessor::dropFrames(unsigned int nbframes, int64_t ts) { bool result; - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %lld)\n", nbframes, ts); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "StreamProcessor::dropFrames(%d, %ld)\n", nbframes, ts); result = m_data_buffer->dropFrames(nbframes); SIGNAL_ACTIVITY_ISO_RECV; return result; @@ -882,7 +882,7 @@ { bool result; debugOutputExtreme( DEBUG_LEVEL_VERBOSE, - "(%p, %s) putFrames(%d, %11llu)\n", + "(%p, %s) putFrames(%d, %11lu)\n", this, getTypeString(), nbframes, ts); assert( getType() == ePT_Transmit ); if(isDryRunning()) result = putFramesDry(nbframes, ts); @@ -895,12 +895,12 @@ StreamProcessor::putFramesWet(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "StreamProcessor::putFramesWet(%d, %llu)\n", + "StreamProcessor::putFramesWet(%d, %lu)\n", nbframes, ts); // transfer the data m_data_buffer->blockProcessWriteFrames(nbframes, ts); debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - " New timestamp: %llu\n", ts); + " New timestamp: %lu\n", ts); return true; // FIXME: what about failure? } @@ -908,7 +908,7 @@ StreamProcessor::putFramesDry(unsigned int nbframes, int64_t ts) { debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "StreamProcessor::putFramesDry(%d, %llu)\n", + "StreamProcessor::putFramesDry(%d, %lu)\n", nbframes, ts); // do nothing return true; @@ -918,7 +918,7 @@ StreamProcessor::putSilenceFrames(unsigned int nbframes, int64_t ts) { debugOutput(DEBUG_LEVEL_VERY_VERBOSE, - "StreamProcessor::putSilenceFrames(%d, %llu)\n", + "StreamProcessor::putSilenceFrames(%d, %lu)\n", nbframes, ts); size_t bytes_per_frame = getEventSize() * getEventsPerFrame(); @@ -1069,7 +1069,7 @@ // make the scratch buffer one period of frames long m_scratch_buffer_size_bytes = m_StreamProcessorManager.getPeriodSize() * getEventsPerFrame() * getEventSize(); - debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %d quadlets\n"); + debugOutput( DEBUG_LEVEL_VERBOSE, " Allocate scratch buffer of %ld quadlets\n", m_scratch_buffer_size_bytes); if(m_scratch_buffer) delete[] m_scratch_buffer; m_scratch_buffer = new byte_t[m_scratch_buffer_size_bytes]; if(m_scratch_buffer == NULL) { @@ -1158,12 +1158,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1204,12 +1204,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Start at : %011lu (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1228,12 +1228,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1253,12 +1253,12 @@ debugOutput(DEBUG_LEVEL_VERBOSE,"for %s SP (%p)\n", ePTToString(getType()), this); #ifdef DEBUG uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Now : %011lu (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), (unsigned int)TICKS_TO_OFFSET(now)); - debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011llu (%03us %04uc %04ut)\n", + debugOutput(DEBUG_LEVEL_VERBOSE," Stop at : %011lu (%03us %04uc %04ut)\n", tx, (unsigned int)TICKS_TO_SECS(tx), (unsigned int)TICKS_TO_CYCLES(tx), @@ -1900,7 +1900,7 @@ debugError("No handler for stream??\n"); } uint64_t now = m_1394service.getCycleTimerTicks(); - debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011llu (%03us %04uc %04ut)\n", + debugOutputShort( DEBUG_LEVEL_NORMAL, " Now : %011lu (%03us %04uc %04ut)\n", now, (unsigned int)TICKS_TO_SECS(now), (unsigned int)TICKS_TO_CYCLES(now), Modified: branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -181,7 +181,7 @@ // later than expected (the real receive time) #ifdef DEBUG if(isRunning()) { - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %lluticks | tpf=%f\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"STMP: %luticks | tpf=%f\n", m_last_timestamp, getTicksPerFrame()); } #endif Modified: branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp =================================================================== --- branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -196,7 +196,7 @@ { // we are too late debugOutput(DEBUG_LEVEL_VERBOSE, - "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011llu (%04u)\n", + "Too late: CY=%04u, TC=%04u, CUT=%04d, TSP=%011lu (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, presentation_time, (unsigned int)TICKS_TO_CYCLES(presentation_time) ); @@ -231,7 +231,7 @@ else { debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, - "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011llu (%04u), TSP=%011llu (%04u)\n", + "Too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, transmit_at_time, ( unsigned int ) TICKS_TO_CYCLES ( transmit_at_time ), @@ -240,7 +240,7 @@ if ( cycles_until_transmit > MOTU_MAX_CYCLES_TO_TRANSMIT_EARLY + 1 ) { debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, - "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011llu (%04u), TSP=%011llu (%04u)\n", + "Way too early: CY=%04u, TC=%04u, CUT=%04d, TST=%011lu (%04u), TSP=%011lu (%04u)\n", cycle, transmit_at_cycle, cycles_until_transmit, transmit_at_time, ( unsigned int ) TICKS_TO_CYCLES ( transmit_at_time ), @@ -288,7 +288,7 @@ unsigned char *tag, unsigned char *sy, uint32_t pkt_ctr ) { - debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04u, TSP=%011llu (%04u)\n", + debugOutput ( DEBUG_LEVEL_VERY_VERBOSE, "XMIT EMPTY: CY=%04lu, TSP=%011lu (%04u)\n", CYCLE_TIMER_GET_CYCLES(pkt_ctr), m_last_timestamp, ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); @@ -317,7 +317,7 @@ { unsigned int cycle = CYCLE_TIMER_GET_CYCLES(pkt_ctr); - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011llu (%04u)\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "XMIT SILENT: CY=%04u, TSP=%011lu (%04u)\n", cycle, m_last_timestamp, ( unsigned int ) TICKS_TO_CYCLES ( m_last_timestamp ) ); Modified: branches/libffado-2.0/src/libutil/Configuration.cpp =================================================================== --- branches/libffado-2.0/src/libutil/Configuration.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/Configuration.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -181,7 +181,7 @@ { int32_t i = s; debugOutput(DEBUG_LEVEL_NORMAL, - " %s%s = %ld (0x%08lX)\n", + " %s%s = %d (0x%08X)\n", prefix.c_str(), s.getName(), i, i); } break; @@ -189,7 +189,7 @@ { int64_t i = s; debugOutput(DEBUG_LEVEL_NORMAL, - " %s%s = %lld (0x%016llX)\n", + " %s%s = %ld (0x%016lX)\n", prefix.c_str(), s.getName(), i, i); } break; @@ -258,7 +258,7 @@ Setting::Type t = s->getType(); if(t == Setting::TypeInt64) { ref = *s; - debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %d\n", path.c_str(), ref); + debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has value %ld\n", path.c_str(), ref); return true; } else { debugOutput(DEBUG_LEVEL_VERBOSE, "path '%s' has wrong type\n", path.c_str()); Modified: branches/libffado-2.0/src/libutil/PosixThread.cpp =================================================================== --- branches/libffado-2.0/src/libutil/PosixThread.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/PosixThread.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -141,7 +141,7 @@ if ((res = pthread_create(&fThread, &attributes, ThreadHandler, this))) { debugError("Cannot create realtime thread (%d: %s)\n", res, strerror(res)); - debugError(" priority: %d %s\n", fPriority); + debugError(" priority: %d\n", fPriority); return -1; } @@ -161,11 +161,11 @@ int PosixThread::Kill() { if (fThread) { // If thread has been started - debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Kill %p (thread: %p)\n", m_id.c_str(), this, fThread); + debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Kill %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); void* status; pthread_cancel(fThread); pthread_join(fThread, &status); - debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Killed %p (thread: %p)\n", m_id.c_str(), this, fThread); + debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Killed %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); return 0; } else { return -1; @@ -175,11 +175,11 @@ int PosixThread::Stop() { if (fThread) { // If thread has been started - debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stop %p (thread: %p)\n", m_id.c_str(), this, fThread); + debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stop %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); void* status; fRunning = false; // Request for the thread to stop pthread_join(fThread, &status); - debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stopped %p (thread: %p)\n", m_id.c_str(), this, fThread); + debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) Stopped %p (thread: %p)\n", m_id.c_str(), this, (void *)fThread); return 0; } else { return -1; Modified: branches/libffado-2.0/src/libutil/StreamStatistics.cpp =================================================================== --- branches/libffado-2.0/src/libutil/StreamStatistics.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/StreamStatistics.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -54,7 +54,7 @@ void StreamStatistics::dumpInfo() { debugOutputShort( DEBUG_LEVEL_VERBOSE, - "--- Stats for %s: min=%ld avg=%f max=%ld cnt=%ld sum=%ld\n", + "--- Stats for %s: min=%d avg=%f max=%ld cnt=%ld sum=%ld\n", m_name.c_str(), m_min, m_average, m_max, m_count, m_sum); debugOutputShort( DEBUG_LEVEL_VERBOSE, " Signal stats\n"); for (unsigned int i=0;i <= MAX_SIGNAL_VALUE; i++) { Modified: branches/libffado-2.0/src/libutil/SystemTimeSource.cpp =================================================================== --- branches/libffado-2.0/src/libutil/SystemTimeSource.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/SystemTimeSource.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -54,7 +54,7 @@ ts.tv_sec = wake_at_usec / (1000000LL); ts.tv_nsec = (wake_at_usec % (1000000LL)) * 1000LL; debugOutputExtreme(DEBUG_LEVEL_VERBOSE, - "clock_nanosleep until %lld sec, %lld nanosec\n", + "clock_nanosleep until %ld sec, %lld nanosec\n", (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec); int err = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL); if(err) { Modified: branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp =================================================================== --- branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/TimestampedBuffer.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -504,7 +504,7 @@ size_t written = ffado_ringbuffer_write(m_event_buffer, data, write_size); if (written < write_size) { - debugWarning("ringbuffer full, %u, %u\n", write_size, written); + debugWarning("ringbuffer full, %u, %lu\n", write_size, written); return false; } incrementFrameCounter(nframes, ts); @@ -533,7 +533,7 @@ size_t written = ffado_ringbuffer_write(m_event_buffer, data, write_size); if (written < write_size) { - debugWarning("ringbuffer full, request: %u, actual: %u\n", write_size, written); + debugWarning("ringbuffer full, request: %u, actual: %lu\n", write_size, written); return false; } @@ -644,7 +644,7 @@ ffado_ringbuffer_get_write_vector(m_event_buffer, vec); if(vec[0].len + vec[1].len < m_process_block_size) { // this indicates a full event buffer - debugError("Event buffer overrun in buffer %p, fill: %u, bytes2write: %u \n", + debugError("Event buffer overrun in buffer %p, fill: %lu, bytes2write: %u \n", this, ffado_ringbuffer_read_space(m_event_buffer), bytes2write); debugShowBackLog(); return false; Modified: branches/libffado-2.0/src/libutil/serialize_expat.cpp =================================================================== --- branches/libffado-2.0/src/libutil/serialize_expat.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/serialize_expat.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -116,7 +116,7 @@ // element to be added Xml::Node& n = pNode->add( Xml::Node(tokens[tokens.size() - 1].c_str(), NULL) ); char* valstr; - asprintf( &valstr, "%lld", value ); + asprintf( &valstr, "%ld", value ); n.set_child_text( valstr ); free( valstr ); } else { Modified: branches/libffado-2.0/src/libutil/serialize_libxml.cpp =================================================================== --- branches/libffado-2.0/src/libutil/serialize_libxml.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/src/libutil/serialize_libxml.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -88,7 +88,7 @@ long long value ) { - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = %d\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "write %s = %lld\n", strMemberName.c_str(), value ); vector<string> tokens; @@ -265,7 +265,7 @@ char* tail; value = strtoll( pElement->get_child_text()->get_content().c_str(), &tail, 0 ); - debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = %d\n", + debugOutput( DEBUG_LEVEL_VERY_VERBOSE, "found %s = %lld\n", strMemberName.c_str(), value ); return true; } Modified: branches/libffado-2.0/support/firmware/fireworks-downloader.cpp =================================================================== --- branches/libffado-2.0/support/firmware/fireworks-downloader.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/support/firmware/fireworks-downloader.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -212,7 +212,7 @@ } if (node_id < 0) { - printMessage("Could not find device with GUID 0x%016llX\n", guid); + printMessage("Could not find device with GUID 0x%016lX\n", guid); return -1; } Modified: branches/libffado-2.0/tests/streaming/teststreaming3.cpp =================================================================== --- branches/libffado-2.0/tests/streaming/teststreaming3.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/tests/streaming/teststreaming3.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -263,7 +263,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", arguments.verbose); + debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); setDebugLevel(arguments.verbose); int nb_in_channels=0, nb_out_channels=0; Modified: branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp =================================================================== --- branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/tests/systemtests/test-isoxmit-1.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -231,7 +231,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %d\n", arguments.verbose); + debugOutput(DEBUG_LEVEL_NORMAL, "verbose level = %ld\n", arguments.verbose); setDebugLevel(arguments.verbose); debugOutput(DEBUG_LEVEL_INFO, "Get 1394 handle...\n"); @@ -242,7 +242,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", arguments.port); + debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); do { if (raw1394_get_port_info(handle, NULL, 0) < 0) @@ -269,7 +269,7 @@ } raw1394_set_bus_reset_handler(handle, myResetHandler); - debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", arguments.rtprio); + debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); set_realtime_priority(arguments.rtprio); int countdown = arguments.countdown; Modified: branches/libffado-2.0/tests/test-ffado.cpp =================================================================== --- branches/libffado-2.0/tests/test-ffado.cpp 2009-11-22 14:40:08 UTC (rev 1720) +++ branches/libffado-2.0/tests/test-ffado.cpp 2009-11-22 15:26:31 UTC (rev 1721) @@ -510,7 +510,7 @@ } uint64_t result_rcv = sytRecvToFullTicks(syt_timestamp, rcv_cycle, ctr_now); uint64_t result_xmt = sytXmitToFullTicks(syt_timestamp, rcv_cycle, ctr_now); - printf("RCV: 0x%010llX %010llu XMT: 0x%010llX %010llu CTR: %010llu\n", + printf("RCV: 0x%010lX %010lu XMT: 0x%010lX %010lu CTR: %010lu\n", result_rcv, result_rcv, result_xmt, result_xmt, CYCLE_TIMER_TO_TICKS(ctr_now)); } else { |
Author: ppalmers Date: 2009-11-22 06:40:08 -0800 (Sun, 22 Nov 2009) New Revision: 1720 Modified: branches/libffado-2.0/src/DeviceStringParser.cpp branches/libffado-2.0/src/bebob/bebob_avdevice.cpp branches/libffado-2.0/src/bebob/bebob_avplug.cpp branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp branches/libffado-2.0/src/bebob/focusrite/focusrite_saffirepro.cpp branches/libffado-2.0/src/debugmodule/debugmodule.cpp branches/libffado-2.0/src/debugmodule/debugmodule.h branches/libffado-2.0/src/fireworks/efc/efc_cmds_flash.cpp branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware_ctrl.cpp branches/libffado-2.0/src/fireworks/efc/efc_cmds_ioconfig.cpp branches/libffado-2.0/src/fireworks/efc/efc_cmds_mixer.cpp branches/libffado-2.0/src/fireworks/efc/efc_cmds_monitor.cpp branches/libffado-2.0/src/fireworks/fireworks_control.cpp branches/libffado-2.0/src/fireworks/fireworks_device.cpp branches/libffado-2.0/src/fireworks/fireworks_firmware.cpp branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp branches/libffado-2.0/src/libavc/descriptors/avc_descriptor_cmd.cpp branches/libffado-2.0/src/libcontrol/Element.cpp branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp branches/libffado-2.0/src/libieee1394/configrom.cpp branches/libffado-2.0/src/libieee1394/cycletimer.h branches/libffado-2.0/src/motu/motu_controls.cpp branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp Log: add an attribute to the debug printing functions that makes them check their variable argument list. also fix a few of the warnings that result from this. more to come later. Modified: branches/libffado-2.0/src/DeviceStringParser.cpp =================================================================== --- branches/libffado-2.0/src/DeviceStringParser.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/DeviceStringParser.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -202,7 +202,7 @@ return retval; case eGUID: retval = m_guid && (m_guid == x.m_guid); - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016X == 0x%016X? %d\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, "eGUID 0x%016lX == 0x%016lX? %d\n", m_guid, x.m_guid, retval); return retval; case eInvalid: @@ -224,7 +224,7 @@ break; case eGUID: debugOutput(DEBUG_LEVEL_INFO, "type: eGUID\n"); - debugOutput(DEBUG_LEVEL_INFO, " GUID: %016LLX\n", m_guid); + debugOutput(DEBUG_LEVEL_INFO, " GUID: %016lX\n", m_guid); break; case eInvalid: default: Modified: branches/libffado-2.0/src/bebob/bebob_avdevice.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_avdevice.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/bebob_avdevice.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -723,7 +723,7 @@ std::string sDevicePath = getCachePath() + getConfigRom().getGuidString(); char* configId; - asprintf(&configId, "%016llx", getConfigurationId() ); + asprintf(&configId, "%016lx", getConfigurationId() ); if ( !configId ) { debugError( "could not create id string\n" ); return false; @@ -799,7 +799,7 @@ // come up with an unique file name for the current settings char* configId; - asprintf(&configId, "%016llx", BeBoB::AvDevice::getConfigurationId() ); + asprintf(&configId, "%016lx", BeBoB::AvDevice::getConfigurationId() ); if ( !configId ) { debugError( "Could not create id string\n" ); return false; Modified: branches/libffado-2.0/src/bebob/bebob_avplug.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_avplug.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/bebob_avplug.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -582,7 +582,7 @@ != infoType->m_plugOutput->m_outputPlugAddresses.size() ) { debugError( "number of output plugs (%d) disagree with " - "number of elements in plug address vector (%d)\n", + "number of elements in plug address vector (%lu)\n", infoType->m_plugOutput->m_nrOfOutputPlugs, infoType->m_plugOutput->m_outputPlugAddresses.size()); } Modified: branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp =================================================================== --- branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/bebob_dl_bcd.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -153,7 +153,7 @@ bytes_read = fread( &m_bcd_version, 1, sizeof( fb_quadlet_t ), m_file ); if ( bytes_read != sizeof( fb_quadlet_t ) ) { - debugError( "parse: %d bytes read at position %d failed\n", + debugError( "parse: %lu bytes read at position %d failed\n", sizeof( fb_quadlet_t ), BCDFileVersionOffset ); return false; @@ -244,7 +244,7 @@ size_t bytes_read = std::fread( q, 1, sizeof( *q ), m_file ); if ( bytes_read != sizeof( *q ) ) { - debugError( "read: %d byte read failed at position 0x%08x\n", + debugError( "read: %lu byte read failed at position 0x%08x\n", sizeof( *q ), addr ); return false; } @@ -262,7 +262,7 @@ size_t bytes_read = std::fread( o, 1, sizeof( *o ), m_file ); if ( bytes_read != sizeof( *o ) ) { - debugError( "read: %d byte read failed at position 0x%08x\n", + debugError( "read: %lu byte read failed at position 0x%08x\n", sizeof( *o ), addr ); return false; } @@ -280,7 +280,7 @@ size_t bytes_read = std::fread( b, 1, len, m_file ); if ( bytes_read != len ) { - debugError( "read: %d byte read failed at position 0x%08x\n", + debugError( "read: %lu byte read failed at position 0x%08x\n", len, addr ); return false; } Modified: branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp =================================================================== --- branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/focusrite/focusrite_generic.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -57,7 +57,7 @@ bool FocusriteDevice::setSpecificValue(uint32_t id, uint32_t v) { - debugOutput(DEBUG_LEVEL_VERBOSE, "Writing parameter address space id 0x%08lX (%u), data: 0x%08lX\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "Writing parameter address space id 0x%08X (%u), data: 0x%08X\n", id, id, v); bool use_avc = false; if(!getOption("useAvcForParameters", use_avc)) { @@ -68,7 +68,7 @@ ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { ffado_microsecs_t wait = m_earliest_next_cmd_time - now; - debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %llu\n", wait ); + debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); Util::SystemTimeSource::SleepUsecRelative(wait); } m_earliest_next_cmd_time = now + m_cmd_time_interval; @@ -93,7 +93,7 @@ ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); if(m_cmd_time_interval && (m_earliest_next_cmd_time > now)) { ffado_microsecs_t wait = m_earliest_next_cmd_time - now; - debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %llu\n", wait ); + debugOutput( DEBUG_LEVEL_VERBOSE, "Rate control... %lu\n", wait ); Util::SystemTimeSource::SleepUsecRelative(wait); } m_earliest_next_cmd_time = now + m_cmd_time_interval; @@ -104,7 +104,7 @@ } else { retval = getSpecificValueARM(id, v); } - debugOutput(DEBUG_LEVEL_VERBOSE,"Read parameter address space id 0x%08lX (%u): %08lX\n", id, id, *v); + debugOutput(DEBUG_LEVEL_VERBOSE,"Read parameter address space id 0x%08X (%u): %08X\n", id, id, *v); return retval; } @@ -160,15 +160,15 @@ bool FocusriteDevice::setSpecificValueARM(uint32_t id, uint32_t v) { - fb_quadlet_t data=v; - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Writing parameter address space id 0x%08lX (%u), data: 0x%08lX\n", + fb_quadlet_t data = v; + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Writing parameter address space id 0x%08X (%u), data: 0x%08X\n", id, id, data); fb_nodeaddr_t addr = FR_PARAM_SPACE_START + (id * 4); fb_nodeid_t nodeId = getNodeId() | 0xFFC0; if(!get1394Service().write_quadlet( nodeId, addr, CondSwapToBus32(data) ) ) { - debugError("Could not write to node 0x%04X addr 0x%012X\n", nodeId, addr); + debugError("Could not write to node 0x%04X addr 0x%012lX\n", nodeId, addr); return false; } return true; @@ -178,18 +178,18 @@ FocusriteDevice::getSpecificValueARM(uint32_t id, uint32_t *v) { fb_quadlet_t result; - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Reading parameter address space id 0x%08lX\n", id); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Reading parameter address space id 0x%08X\n", id); fb_nodeaddr_t addr = FR_PARAM_SPACE_START + (id * 4); fb_nodeid_t nodeId = getNodeId() | 0xFFC0; if(!get1394Service().read_quadlet( nodeId, addr, &result ) ) { - debugError("Could not read from node 0x%04llX addr 0x%012llX\n", nodeId, addr); + debugError("Could not read from node 0x%04X addr 0x%012lX\n", nodeId, addr); return false; } - result=CondSwapFromBus32(result); - debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Read result: 0x%08llX\n", result); + result = CondSwapFromBus32(result); + debugOutput(DEBUG_LEVEL_VERY_VERBOSE,"Read result: 0x%08X\n", result); *v = result; return true; @@ -384,7 +384,7 @@ bool RegisterControl::setValue(uint64_t addr, uint64_t v) { - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %llu to %llu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for addr %lu to %lu\n", addr, v); if ( !m_Parent.setSpecificValue(addr, v) ) { @@ -402,7 +402,7 @@ debugError( "getSpecificValue failed\n" ); return 0; } else { - debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %llu = %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for %lu = %u\n", addr, val); return val; } @@ -575,7 +575,7 @@ int32_t v = (int32_t)val; struct sCellInfo c = m_CellInfo.at(row).at(col); - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d row %d col %d to %lf (%ld)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for id %d row %d col %d to %lf (%d)\n", c.address, row, col, val, v); if (v>0x07FFF) v=0x07FFF; @@ -596,7 +596,7 @@ debugError( "getSpecificValue failed\n" ); return 0; } else { - debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for id %d row %d col %d = %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for id %d row %d col %d = %u\n", c.address, row, col, val); return val; } Modified: branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp =================================================================== --- branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/focusrite/focusrite_saffire.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -47,11 +47,11 @@ int delaytime = 0; if(config.getValueForDeviceSetting(getConfigRom().getNodeVendorId(), getConfigRom().getModelId(), "cmd_interval_time", delaytime)) { m_cmd_time_interval = delaytime; - debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %llu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, "Setting command interval time to %lu\n", m_cmd_time_interval ); } else { m_cmd_time_interval = 10000; - debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %llu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, "No command interval time setting found, defaulting to %lu\n", m_cmd_time_interval ); } } Modified: branches/libffado-2.0/src/bebob/focusrite/focusrite_saffirepro.cpp =================================================================== --- branches/libffado-2.0/src/bebob/focusrite/focusrite_saffirepro.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/bebob/focusrite/focusrite_saffirepro.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -422,11 +422,11 @@ m_internal_clocksource.active=true; return; } - debugOutput(DEBUG_LEVEL_VERBOSE, "SYNC_CONFIG field value: %08lX\n", sync ); + debugOutput(DEBUG_LEVEL_VERBOSE, "SYNC_CONFIG field value: %08X\n", sync ); switch(sync & FR_SAFFIREPRO_CMD_ID_SYNC_CONFIG_MASK) { default: - debugWarning( "Unexpected SYNC_CONFIG field value: %08lX\n", sync ); + debugWarning( "Unexpected SYNC_CONFIG field value: %08X\n", sync ); case FR_SAFFIREPRO_CMD_SYNC_CONFIG_INTERNAL: m_internal_clocksource.active=true; m_active_clocksource = &m_internal_clocksource; @@ -465,7 +465,7 @@ m_wordclock_clocksource.locked=true; break; default: - debugWarning( "Unexpected SYNC_CONFIG_STATE field value: %08lX\n", sync ); + debugWarning( "Unexpected SYNC_CONFIG_STATE field value: %08X\n", sync ); } } @@ -771,7 +771,7 @@ if (s == verify) { break; } - debugOutput( DEBUG_LEVEL_VERBOSE, "setSampleRate (try %d) failed. Try again...\n" ); + debugOutput( DEBUG_LEVEL_VERBOSE, "setSampleRate (try %d) failed. Try again...\n", ntries); } // make the busreset handlers run @@ -871,8 +871,7 @@ return false; } - debugOutput( DEBUG_LEVEL_VERBOSE, - "getCount32: %08lX\n", v ); + debugOutput( DEBUG_LEVEL_VERBOSE, "getCount32: %08X\n", v ); return v; } Modified: branches/libffado-2.0/src/debugmodule/debugmodule.cpp =================================================================== --- branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/debugmodule/debugmodule.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -185,7 +185,7 @@ // format the message such that it remains together int chars_written=0; int retval=0; - retval = snprintf(msg, MB_BUFFERSIZE, "%011llu: %s (%s)[%4d] %s: ", + retval = snprintf(msg, MB_BUFFERSIZE, "%011lu: %s (%s)[%4d] %s: ", ts_usec, getPreSequence( level ), fname, line, function ); if (retval >= 0) chars_written += retval; // ignore errors Modified: branches/libffado-2.0/src/debugmodule/debugmodule.h =================================================================== --- branches/libffado-2.0/src/debugmodule/debugmodule.h 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/debugmodule/debugmodule.h 2009-11-22 14:40:08 UTC (rev 1720) @@ -289,14 +289,22 @@ void printShort( debug_level_t level, const char* format, - ... ) const; + ... ) const +#ifdef __GNUC__ + __attribute__((format(printf, 3, 4))) +#endif + ; void print( debug_level_t level, const char* file, const char* function, unsigned int line, const char* format, - ... ) const; + ... ) const +#ifdef __GNUC__ + __attribute__((format(printf, 6, 7))) +#endif + ; bool setLevel( debug_level_t level ) { m_level = level; return true; } Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_flash.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_flash.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_flash.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -67,7 +67,7 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Flash Erase:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Address : %lu\n", m_address); + debugOutput(DEBUG_LEVEL_NORMAL, " Address : %u\n", m_address); } // ---- @@ -119,8 +119,8 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Flash Read:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Address : %lu\n", m_address); - debugOutput(DEBUG_LEVEL_NORMAL, " Length (quadlets) : %lu\n", m_nb_quadlets); + debugOutput(DEBUG_LEVEL_NORMAL, " Address : %u\n", m_address); + debugOutput(DEBUG_LEVEL_NORMAL, " Length (quadlets) : %u\n", m_nb_quadlets); debugOutput(DEBUG_LEVEL_NORMAL, " Data : \n"); for (unsigned int i=0; i < m_nb_quadlets; i++) { debugOutput(DEBUG_LEVEL_NORMAL, " %08X \n", m_data[i]); @@ -173,8 +173,8 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Flash Write:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Address : %lu\n", m_address); - debugOutput(DEBUG_LEVEL_NORMAL, " Length (quadlets) : %lu\n", m_nb_quadlets); + debugOutput(DEBUG_LEVEL_NORMAL, " Address : %u\n", m_address); + debugOutput(DEBUG_LEVEL_NORMAL, " Length (quadlets) : %u\n", m_nb_quadlets); debugOutput(DEBUG_LEVEL_NORMAL, " Data : \n"); for (unsigned int i=0; i < m_nb_quadlets; i++) { debugOutput(DEBUG_LEVEL_NORMAL, " %08X \n", m_data[i]); @@ -291,7 +291,7 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Flash Get Session Base:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Address : %lu\n", m_address); + debugOutput(DEBUG_LEVEL_NORMAL, " Address : %u\n", m_address); } } // namespace FireWorks Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -126,9 +126,9 @@ debugOutput(DEBUG_LEVEL_NORMAL, "EFC HW CAPS info:\n"); debugOutput(DEBUG_LEVEL_NORMAL, " Flags : 0x%08X\n", m_flags); - debugOutput(DEBUG_LEVEL_NORMAL, " GUID : %016llX\n", m_guid); + debugOutput(DEBUG_LEVEL_NORMAL, " GUID : %016lX\n", m_guid); debugOutput(DEBUG_LEVEL_NORMAL, " HwType : 0x%08X\n", m_type); - debugOutput(DEBUG_LEVEL_NORMAL, " Version : %lu\n", m_version); + debugOutput(DEBUG_LEVEL_NORMAL, " Version : %u\n", m_version); debugOutput(DEBUG_LEVEL_NORMAL, " Vendor : %s\n", m_vendor_name); debugOutput(DEBUG_LEVEL_NORMAL, " Model : %s\n", m_model_name); @@ -231,12 +231,12 @@ unsigned int i=0; debugOutput(DEBUG_LEVEL_NORMAL, " # Output Meters : %d\n", m_nb_output_meters); for (i=0;i<m_nb_output_meters;i++) { - debugOutput(DEBUG_LEVEL_NORMAL, " Meter %d: %ld\n", i, m_meters[i]); + debugOutput(DEBUG_LEVEL_NORMAL, " Meter %d: %d\n", i, m_meters[i]); } debugOutput(DEBUG_LEVEL_NORMAL, " # Input Meters : %d\n", m_nb_input_meters); for (;i<m_nb_output_meters+m_nb_input_meters;i++) { - debugOutput(DEBUG_LEVEL_NORMAL, " Meter %d: %ld\n", i, m_meters[i]); + debugOutput(DEBUG_LEVEL_NORMAL, " Meter %d: %d\n", i, m_meters[i]); } } Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware_ctrl.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware_ctrl.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_hardware_ctrl.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -72,9 +72,9 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Get Clock:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Clock : %lu\n", m_clock); - debugOutput(DEBUG_LEVEL_NORMAL, " Samplerate : %lu\n", m_samplerate); - debugOutput(DEBUG_LEVEL_NORMAL, " Index : %lu\n", m_index); + debugOutput(DEBUG_LEVEL_NORMAL, " Clock : %u\n", m_clock); + debugOutput(DEBUG_LEVEL_NORMAL, " Samplerate : %u\n", m_samplerate); + debugOutput(DEBUG_LEVEL_NORMAL, " Index : %u\n", m_index); } // ---- @@ -123,9 +123,9 @@ { EfcCmd::showEfcCmd(); debugOutput(DEBUG_LEVEL_NORMAL, "EFC Set Clock:\n"); - debugOutput(DEBUG_LEVEL_NORMAL, " Clock : %lu\n", m_clock); - debugOutput(DEBUG_LEVEL_NORMAL, " Samplerate : %lu\n", m_samplerate); - debugOutput(DEBUG_LEVEL_NORMAL, " Index : %lu\n", m_index); + debugOutput(DEBUG_LEVEL_NORMAL, " Clock : %u\n", m_clock); + debugOutput(DEBUG_LEVEL_NORMAL, " Samplerate : %u\n", m_samplerate); + debugOutput(DEBUG_LEVEL_NORMAL, " Index : %u\n", m_index); } // ---- Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_ioconfig.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_ioconfig.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_ioconfig.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -161,7 +161,7 @@ debugOutput(DEBUG_LEVEL_NORMAL, "EFC IOCONFIG %s %s:\n", (m_type==eCT_Get?"GET":"SET"), eIOConfigRegisterToString(m_reg)); - debugOutput(DEBUG_LEVEL_NORMAL, " Value : %lu\n", m_value); + debugOutput(DEBUG_LEVEL_NORMAL, " Value : %u\n", m_value); } // --- The specific commands Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_mixer.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_mixer.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_mixer.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -244,8 +244,8 @@ (m_type==eCT_Get?"GET":"SET"), eMixerTargetToString(m_target), eMixerCommandToString(m_command)); - debugOutput(DEBUG_LEVEL_NORMAL, " Channel : %ld\n", m_channel); - debugOutput(DEBUG_LEVEL_NORMAL, " Value : %lu\n", m_value); + debugOutput(DEBUG_LEVEL_NORMAL, " Channel : %d\n", m_channel); + debugOutput(DEBUG_LEVEL_NORMAL, " Value : %u\n", m_value); } // --- The specific commands Modified: branches/libffado-2.0/src/fireworks/efc/efc_cmds_monitor.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/efc/efc_cmds_monitor.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/efc/efc_cmds_monitor.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -149,9 +149,9 @@ debugOutput(DEBUG_LEVEL_NORMAL, "EFC %s MONITOR %s:\n", (m_type==eCT_Get?"GET":"SET"), eMonitorCommandToString(m_command)); - debugOutput(DEBUG_LEVEL_NORMAL, " Input : %ld\n", m_input); - debugOutput(DEBUG_LEVEL_NORMAL, " Output : %ld\n", m_output); - debugOutput(DEBUG_LEVEL_NORMAL, " Value : %lu\n", m_value); + debugOutput(DEBUG_LEVEL_NORMAL, " Input : %d\n", m_input); + debugOutput(DEBUG_LEVEL_NORMAL, " Output : %d\n", m_output); + debugOutput(DEBUG_LEVEL_NORMAL, " Value : %u\n", m_value); } // --- The specific commands Modified: branches/libffado-2.0/src/fireworks/fireworks_control.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/fireworks_control.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/fireworks_control.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -320,7 +320,7 @@ default: // nothing break; } - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for channel %d to %lf = %lf\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for channel %d to %lf = %u\n", m_Slave->m_channel, val, m_Slave->m_value); return true; } else { @@ -338,7 +338,7 @@ debugError("Cmd failed\n"); return 0.0; } - debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for channel %d = %lf\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "getValue for channel %d = %u\n", m_Slave->m_channel, m_Slave->m_value); return m_Slave->m_value; } else { @@ -450,7 +450,7 @@ break; } - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for channel %d to %ld (reg: 0x%08X => 0x%08X)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue for channel %d to %d (reg: 0x%08X => 0x%08X)\n", m_Slave->m_channel, val, old_reg, reg); return true; } else { @@ -582,7 +582,7 @@ debugError("Cmd failed\n"); return 0; } - debugOutput(DEBUG_LEVEL_VERBOSE, "setValue to %ld \n", val); + debugOutput(DEBUG_LEVEL_VERBOSE, "setValue to %d \n", val); return true; } else { debugError("No slave EFC command present\n"); Modified: branches/libffado-2.0/src/fireworks/fireworks_device.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/fireworks_device.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/fireworks_device.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -559,7 +559,7 @@ FFADODevice::ClockSource Device::clockIdToClockSource(uint32_t clockid) { ClockSource s; - debugOutput(DEBUG_LEVEL_VERBOSE, "clock id: %lu\n", clockid); + debugOutput(DEBUG_LEVEL_VERBOSE, "clock id: %u\n", clockid); // the polled values are used to detect // whether clocks are valid @@ -623,7 +623,7 @@ debugError("Could not get clock info\n"); return EFC_CMD_HW_CLOCK_UNSPECIFIED; } - debugOutput(DEBUG_LEVEL_VERBOSE, "Active clock: 0x%08lX\n",gccmd.m_clock); + debugOutput(DEBUG_LEVEL_VERBOSE, "Active clock: 0x%08X\n",gccmd.m_clock); gccmd.showEfcCmd(); return gccmd.m_clock; @@ -636,7 +636,7 @@ debugError("Could not get clock info\n"); return false; } - debugOutput(DEBUG_LEVEL_VERBOSE, "Set clock: 0x%08lX\n", id); + debugOutput(DEBUG_LEVEL_VERBOSE, "Set clock: 0x%08X\n", id); EfcSetClockCmd sccmd; sccmd.m_clock=id; Modified: branches/libffado-2.0/src/fireworks/fireworks_firmware.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/fireworks_firmware.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/fireworks_firmware.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -171,14 +171,14 @@ unsigned int version_major = (m_version & 0xFF000000) >> 24; unsigned int version_minor = (m_version & 0x00FF0000) >> 16; unsigned int version_build = (m_version & 0x0000FFFF); - debugOutput(DEBUG_LEVEL_NORMAL, " Address Offset : 0x%08lX\n", m_flash_offset_address); - debugOutput(DEBUG_LEVEL_NORMAL, " Length (Quadlets) : 0x%08lX\n", m_length_quads); - debugOutput(DEBUG_LEVEL_NORMAL, " CRC 32 : 0x%08lX\n", m_CRC32); - debugOutput(DEBUG_LEVEL_NORMAL, " Checksum : 0x%08lX\n", m_checksum); + debugOutput(DEBUG_LEVEL_NORMAL, " Address Offset : 0x%08X\n", m_flash_offset_address); + debugOutput(DEBUG_LEVEL_NORMAL, " Length (Quadlets) : 0x%08X\n", m_length_quads); + debugOutput(DEBUG_LEVEL_NORMAL, " CRC 32 : 0x%08X\n", m_CRC32); + debugOutput(DEBUG_LEVEL_NORMAL, " Checksum : 0x%08X\n", m_checksum); debugOutput(DEBUG_LEVEL_NORMAL, " Firmware version : %02u.%02u.%02u (0x%08X)\n", version_major, version_minor, version_build, m_version); debugOutput(DEBUG_LEVEL_NORMAL, " Append CRC : %s\n", (m_append_crc?"Yes":"No")); - debugOutput(DEBUG_LEVEL_NORMAL, " Footprint (Quadlets) : 0x%08lX\n", m_footprint_quads); + debugOutput(DEBUG_LEVEL_NORMAL, " Footprint (Quadlets) : 0x%08X\n", m_footprint_quads); #endif } @@ -297,7 +297,7 @@ return false; } - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, " Header %02d: %08lX\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, " Header %02d: %08X\n", i, m_header[i]); } @@ -336,7 +336,7 @@ return false; } - debugOutput(DEBUG_LEVEL_VERY_VERBOSE, " Data %02d: %08lX\n", + debugOutput(DEBUG_LEVEL_VERY_VERBOSE, " Data %02d: %08X\n", i, m_data[i]); } debugOutput(DEBUG_LEVEL_VERBOSE, " data ok...\n"); Modified: branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp =================================================================== --- branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/fireworks/fireworks_session_block.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -254,7 +254,7 @@ memcpy(&s, raw+sizeof(SessionHeader), sizeof(SubSession)); if (len != h.size_quads*4) { - debugWarning("size not correct: got %d, should be %d according to data\n", len, h.size_quads*4); + debugWarning("size not correct: got %lu, should be %d according to data\n", len, h.size_quads*4); } #if __BYTE_ORDER == __BIG_ENDIAN Modified: branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp =================================================================== --- branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libavc/descriptors/avc_descriptor.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -253,7 +253,7 @@ readDescCmd.m_data_length=m_descriptor_length-bytes_read; } - debugOutput(DEBUG_LEVEL_VERBOSE, " copying %u bytes to internal buffer offset %u\n",readDescCmd.m_data_length, bytes_read); + debugOutput(DEBUG_LEVEL_VERBOSE, " copying %u bytes to internal buffer offset %lu\n",readDescCmd.m_data_length, bytes_read); memcpy(m_data+bytes_read,readDescCmd.m_data, readDescCmd.m_data_length); bytes_read += readDescCmd.m_data_length; Modified: branches/libffado-2.0/src/libavc/descriptors/avc_descriptor_cmd.cpp =================================================================== --- branches/libffado-2.0/src/libavc/descriptors/avc_descriptor_cmd.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libavc/descriptors/avc_descriptor_cmd.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -119,7 +119,7 @@ break; default: - debugError("Can't handle command type %s\n", getCommandType()); + debugError("Can't handle command type %d\n", getCommandType()); return false; } Modified: branches/libffado-2.0/src/libcontrol/Element.cpp =================================================================== --- branches/libffado-2.0/src/libcontrol/Element.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libcontrol/Element.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -301,7 +301,7 @@ Container::show() { Util::MutexLockHelper lock(getLock()); - debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%d Elements)\n", + debugOutput( DEBUG_LEVEL_NORMAL, "Container %s (%lu Elements)\n", getName().c_str(), m_Children.size()); for ( ElementVectorIterator it = m_Children.begin(); Modified: branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libieee1394/CycleTimerHelper.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -163,10 +163,10 @@ "Bogus CTR: %08X on try %02d\n", m_cycle_timer_prev, maxtries2); } - debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11lu, local: %17llu\n", + debugOutput( DEBUG_LEVEL_VERBOSE, " read : CTR: %11u, local: %17lu\n", m_cycle_timer_prev, local_time); debugOutput(DEBUG_LEVEL_VERBOSE, - " ctr : 0x%08X %11llu (%03us %04ucy %04uticks)\n", + " ctr : 0x%08X %11lu (%03us %04ucy %04uticks)\n", (uint32_t)m_cycle_timer_prev, (uint64_t)CYCLE_TIMER_TO_TICKS(m_cycle_timer_prev), (unsigned int)CYCLE_TIMER_GET_SECS( m_cycle_timer_prev ), (unsigned int)CYCLE_TIMER_GET_CYCLES( m_cycle_timer_prev ), @@ -309,7 +309,7 @@ debugOutput(DEBUG_LEVEL_VERBOSE, " DLL bandwidth: %f Hz (rel: %f)\n", bw_abs, bw_rel); debugOutput(DEBUG_LEVEL_VERBOSE, - " usecs/update: %lu, ticks/update: %lu, m_dll_e2: %f\n", + " usecs/update: %u, ticks/update: %u, m_dll_e2: %f\n", m_usecs_per_update, m_ticks_per_update, m_dll_e2); debugOutput(DEBUG_LEVEL_VERBOSE, " usecs current: %f, next: %f\n", @@ -350,7 +350,7 @@ #ifdef DEBUG ffado_microsecs_t now = Util::SystemTimeSource::getCurrentTimeAsUsecs(); int sleep_time = m_sleep_until - now; - debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %lld/%f (now: %lld, diff=%d) ...\n", + debugOutput( DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) Sleep until %ld/%f (now: %ld, diff=%d) ...\n", this, m_sleep_until, m_next_time_usecs, now, sleep_time); #endif Util::SystemTimeSource::SleepUsecAbsolute(m_sleep_until); @@ -389,7 +389,7 @@ not_good = (-err_ticks > 1*TICKS_PER_CYCLE || err_ticks > 1*TICKS_PER_CYCLE); if(not_good) { debugOutput(DEBUG_LEVEL_VERBOSE, - "(%p) have to retry CTR read, diff unrealistic: diff: %lld, max: +/- %u (try: %d) %lld\n", + "(%p) have to retry CTR read, diff unrealistic: diff: %ld, max: +/- %u (try: %d) %ld\n", this, err_ticks, 1*TICKS_PER_CYCLE, ntries, expected_ticks); // sleep half a cycle to make sure the hardware moved on Util::SystemTimeSource::SleepUsecRelative(USECS_PER_CYCLE / 2); @@ -408,7 +408,7 @@ // // simulate a random scheduling delay between (0-10ms) // ffado_microsecs_t tmp = Util::SystemTimeSource::SleepUsecRandom(10000); - // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of %llu usecs...\n", this, tmp); + // debugOutput( DEBUG_LEVEL_VERBOSE, " (%p) random sleep of %lu usecs...\n", this, tmp); if(m_unhandled_busreset) { debugOutput(DEBUG_LEVEL_VERBOSE, @@ -435,7 +435,7 @@ m_first_run = false; } else if (diff_ticks > m_ticks_per_update * 20) { debugOutput(DEBUG_LEVEL_VERBOSE, - "re-init dll due to too large tick diff: %lld >> %f\n", + "re-init dll due to too large tick diff: %ld >> %f\n", diff_ticks, (float)(m_ticks_per_update * 20)); if(!initDLL()) { debugError("(%p) Could not init DLL\n", this); @@ -461,7 +461,7 @@ if (ticks_late >= 0) { diff_ticks_corr = diff_ticks - ticks_late; debugOutputExtreme(DEBUG_LEVEL_ULTRA_VERBOSE, - "diff_ticks_corr=%lld, diff_ticks = %lld, ticks_late = %lld\n", + "diff_ticks_corr=%ld, diff_ticks = %ld, ticks_late = %ld\n", diff_ticks_corr, diff_ticks, ticks_late); } else { debugError("Early wakeup, should not happen!\n"); @@ -472,7 +472,7 @@ #ifdef DEBUG // makes no sense if not running realtime if(m_realtime && usecs_late > 1000) { - debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %lld usecs\n", usecs_late); + debugOutput(DEBUG_LEVEL_VERBOSE, "Rather late wakeup: %ld usecs\n", usecs_late); } #endif @@ -525,10 +525,10 @@ m_next_time_usecs += m_usecs_per_update; debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " usecs: current: %f next: %f usecs_late=%lld ticks_late=%lld\n", + " usecs: current: %f next: %f usecs_late=%ld ticks_late=%ld\n", m_current_time_usecs, m_next_time_usecs, usecs_late, ticks_late); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, - " ticks: current: %f next: %f diff=%lld\n", + " ticks: current: %f next: %f diff=%ld\n", m_current_time_ticks, m_next_time_ticks, diff_ticks); debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, " ticks: current: %011llu (%03us %04ucy %04uticks)\n", @@ -588,7 +588,7 @@ dll_time = substractTicks(offset_in_ticks_int, -y_step_in_ticks_int); } int32_t ctr_diff = cycle_timer_ticks-dll_time; - debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010llu - DLL %010lu = %010ld (%s)\n", + debugOutput(DEBUG_LEVEL_ULTRA_VERBOSE, "(%p) CTR DIFF: HW %010lu - DLL %010u = %010d (%s)\n", this, cycle_timer_ticks, dll_time, ctr_diff, (ctr_diff>0?"lag":"lead")); #endif @@ -624,13 +624,13 @@ if (y_step_in_ticks_int > 0) { retval = addTicks(offset_in_ticks_int, y_step_in_ticks_int); -/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: %lld, time_diff: %f, rate: %f, retval: %lu\n", +/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int > 0: %ld, time_diff: %f, rate: %f, retval: %lu\n", y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ } else { retval = substractTicks(offset_in_ticks_int, -y_step_in_ticks_int); // this can happen if the update thread was woken up earlier than it should have been -/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: %lld, time_diff: %f, rate: %f, retval: %lu\n", +/* debugOutputExtreme(DEBUG_LEVEL_VERY_VERBOSE, "y_step_in_ticks_int <= 0: %ld, time_diff: %f, rate: %f, retval: %lu\n", y_step_in_ticks_int, time_diff, my_vars.rate, retval);*/ } @@ -791,19 +791,19 @@ if (diffTicks(cycle_timer_ticks, m_cycle_timer_ticks_prev) < 0) { debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - "non-monotonic CTR (try %02d): %llu -> %llu\n", + "non-monotonic CTR (try %02d): %lu -> %lu\n", maxtries, m_cycle_timer_ticks_prev, cycle_timer_ticks); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, " : %08X -> %08X\n", m_cycle_timer_prev, *cycle_timer); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - " current: %011llu (%03us %04ucy %04uticks)\n", + " current: %011lu (%03us %04ucy %04uticks)\n", cycle_timer_ticks, (unsigned int)TICKS_TO_SECS( cycle_timer_ticks ), (unsigned int)TICKS_TO_CYCLES( cycle_timer_ticks ), (unsigned int)TICKS_TO_OFFSET( cycle_timer_ticks ) ); debugOutput( DEBUG_LEVEL_VERY_VERBOSE, - " prev : %011llu (%03us %04ucy %04uticks)\n", + " prev : %011lu (%03us %04ucy %04uticks)\n", m_cycle_timer_ticks_prev, (unsigned int)TICKS_TO_SECS( m_cycle_timer_ticks_prev ), (unsigned int)TICKS_TO_CYCLES( m_cycle_timer_ticks_prev ), Modified: branches/libffado-2.0/src/libieee1394/configrom.cpp =================================================================== --- branches/libffado-2.0/src/libieee1394/configrom.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libieee1394/configrom.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -483,7 +483,7 @@ ConfigRom::updatedNodeId() { debugOutput( DEBUG_LEVEL_VERBOSE, - "Checking for updated node id for device with GUID 0x%016llX...\n", + "Checking for updated node id for device with GUID 0x%016lX...\n", getGuid()); struct csr1212_csr* csr = NULL; @@ -514,14 +514,14 @@ | CSR1212_BE32_TO_CPU(csr->bus_info_data[4]); debugOutput( DEBUG_LEVEL_VERBOSE, - " Node has GUID 0x%016llX\n", + " Node has GUID 0x%016lX\n", guid); if ( guid == getGuid() ) { debugOutput( DEBUG_LEVEL_VERBOSE, "GUID matches ours\n"); if ( nodeId != getNodeId() ) { debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016llX changed node id " + "Device with GUID 0x%016lX changed node id " "from %d to %d\n", getGuid(), getNodeId(), @@ -529,7 +529,7 @@ m_nodeId = nodeId; } else { debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016llX kept node id %d\n", + "Device with GUID 0x%016lX kept node id %d\n", getGuid(), getNodeId()); } @@ -546,7 +546,7 @@ } debugOutput( DEBUG_LEVEL_VERBOSE, - "Device with GUID 0x%016llX could not be found on " + "Device with GUID 0x%016lX could not be found on " "the bus anymore (removed?)\n", getGuid() ); m_nodeId = INVALID_NODE_ID; @@ -559,7 +559,7 @@ using namespace std; debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" ); debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n", getNodeId() ); - debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016llX\n", getGuid()); + debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016lX\n", getGuid()); debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n", getVendorName().c_str() ); debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n", getModelName().c_str() ); debugOutput(DEBUG_LEVEL_NORMAL, "\tNode Vendor ID:\t\t0x%06x\n", getNodeVendorId() ); @@ -580,7 +580,7 @@ using namespace std; printMessage("Config ROM\n" ); printMessage("\tCurrent Node Id:\t%d\n", getNodeId() ); - printMessage("\tGUID:\t\t\t0x%016llX\n", getGuid()); + printMessage("\tGUID:\t\t\t0x%016lX\n", getGuid()); printMessage("\tVendor Name:\t\t%s\n", getVendorName().c_str() ); printMessage("\tModel Name:\t\t%s\n", getModelName().c_str() ); printMessage("\tNode Vendor ID:\t\t0x%06x\n", getNodeVendorId() ); Modified: branches/libffado-2.0/src/libieee1394/cycletimer.h =================================================================== --- branches/libffado-2.0/src/libieee1394/cycletimer.h 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/libieee1394/cycletimer.h 2009-11-22 14:40:08 UTC (rev 1720) @@ -94,7 +94,7 @@ #ifdef DEBUG if (x >= TICKS_PER_SECOND * 128L) { - debugWarning("insufficient wrapping: %llu\n",x); + debugWarning("insufficient wrapping: %lu\n",x); } #endif @@ -117,7 +117,7 @@ #ifdef DEBUG if (x < 0) { - debugWarning("insufficient wrapping: %lld\n",x); + debugWarning("insufficient wrapping: %ld\n",x); } #endif @@ -144,10 +144,10 @@ #ifdef DEBUG if (x >= (int64_t)(TICKS_PER_SECOND * 128L)) { - debugWarning("insufficient wrapping (max): %llu\n",x); + debugWarning("insufficient wrapping (max): %lu\n",x); } if (x < 0) { - debugWarning("insufficient wrapping (min): %lld\n",x); + debugWarning("insufficient wrapping (min): %ld\n",x); } #endif return x; @@ -248,7 +248,7 @@ #ifdef DEBUG if(diff > max || diff < -max) { debugWarning("difference does not make any sense\n"); - debugWarning("diff=%lld max=%lld\n", diff, max); + debugWarning("diff=%ld max=%ld\n", diff, max); } #endif @@ -312,7 +312,7 @@ // the cycle timer should be ahead of the receive timer int diff_cycles = diffCycles(cc_cycles, rcv_cycle); if (diff_cycles<0) { - debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %llu (%d)\n", + debugWarning("current cycle timer not ahead of receive cycle: rcv: %u / cc: %lu (%d)\n", rcv_cycle, cc_cycles, diff_cycles); } @@ -371,7 +371,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011llu TSC=%08lX SYT=%04X\n", + debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif @@ -432,7 +432,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011llu TSC=%08lX SYT=%04X\n", + debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif @@ -466,7 +466,7 @@ // check for bogus CTR int diff_cycles = diffCycles(xmt_cycle, cc_cycles); if (diff_cycles<0) { - debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %llu (%d)\n", + debugWarning("xmit cycle not ahead of current cycle: xmt: %u / cc: %lu (%d)\n", xmt_cycle, cc_cycles, diff_cycles); } @@ -525,7 +525,7 @@ #ifdef DEBUG if(( TICKS_TO_CYCLE_TIMER(timestamp) & 0xFFFF) != syt_timestamp) { debugWarning("back-converted timestamp not equal to SYT\n"); - debugWarning("TS=%011llu TSC=%08lX SYT=%04X\n", + debugWarning("TS=%011lu TSC=%08lX SYT=%04lX\n", timestamp, TICKS_TO_CYCLE_TIMER(timestamp), syt_timestamp); } #endif Modified: branches/libffado-2.0/src/motu/motu_controls.cpp =================================================================== --- branches/libffado-2.0/src/motu/motu_controls.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/src/motu/motu_controls.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -300,7 +300,7 @@ v = val<0?0:(uint32_t)val; if (v > 0x80) v = 0x80; - debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelFader setValue for row %d col %d to %lf (%ld)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelFader setValue for row %d col %d to %lf (%d)\n", row, col, val, v); reg = getCellRegister(row,col); @@ -330,7 +330,7 @@ // receive stream processor once we work out an efficient way to do this. val = m_parent.ReadRegister(reg) & 0xff; - debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelFader getValue for row %d col %d = %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelFader getValue for row %d col %d = %u\n", row, col, val); return val; } @@ -352,7 +352,7 @@ if (v > 0x80) v = 0x80; - debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelPan setValue for row %d col %d to %lf (%ld)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelPan setValue for row %d col %d to %lf (%d)\n", row, col, val, v); reg = getCellRegister(row,col); @@ -386,7 +386,7 @@ val = m_parent.ReadRegister(reg); val = ((val >> 8) & 0xff) - 0x40; - debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelPan getValue for row %d col %d = %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "ChannelPan getValue for row %d col %d = %u\n", row, col, val); return val; } @@ -413,7 +413,7 @@ { uint32_t v, reg; - debugOutput(DEBUG_LEVEL_VERBOSE, "BinSw setValue for row %d col %d to %lf (%ld)\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "BinSw setValue for row %d col %d to %lf (%d)\n", row, col, val, val==0?0:1); reg = getCellRegister(row,col); @@ -459,7 +459,7 @@ val = m_parent.ReadRegister(reg); val = (val & m_value_mask) != 0; - debugOutput(DEBUG_LEVEL_VERBOSE, "BinSw getValue for row %d col %d = %lu\n", + debugOutput(DEBUG_LEVEL_VERBOSE, "BinSw getValue for row %d col %d = %u\n", row, col, val); return val; } Modified: branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp =================================================================== --- branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp 2009-11-22 13:36:34 UTC (rev 1719) +++ branches/libffado-2.0/tests/systemtests/test-isorecv-1.cpp 2009-11-22 14:40:08 UTC (rev 1720) @@ -187,7 +187,7 @@ return -1; } - debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %d...\n", arguments.port); + debugOutput(DEBUG_LEVEL_INFO, "Select 1394 port %ld...\n", arguments.port); do { if (raw1394_get_port_info(handle, NULL, 0) < 0) @@ -224,7 +224,7 @@ return 1; } - debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%d)...\n", arguments.rtprio); + debugOutput(DEBUG_LEVEL_INFO, "Setting RT priority (%ld)...\n", arguments.rtprio); set_realtime_priority(arguments.rtprio); debugOutput(DEBUG_LEVEL_INFO, "Starting iterate loop...\n"); |
From: <trac@ff...> - 2009-11-22 14:34:20
|
Author: ppalmers Date: 2009-11-22 05:36:34 -0800 (Sun, 22 Nov 2009) New Revision: 1719 Modified: trunk/libffado/src/dice/dice_avdevice.h trunk/libffado/src/dice/focusrite/saffire_pro24.cpp Log: fix some compilation issues with the PRO24 code Modified: trunk/libffado/src/dice/dice_avdevice.h =================================================================== --- trunk/libffado/src/dice/dice_avdevice.h 2009-11-18 20:53:43 UTC (rev 1718) +++ trunk/libffado/src/dice/dice_avdevice.h 2009-11-22 13:36:34 UTC (rev 1719) @@ -360,6 +360,7 @@ bool init(); void show(); + void showApplication(); enum eWaitReturn operationBusy(); enum eWaitReturn waitForOperationEnd(int max_wait_time_ms = 100); @@ -403,6 +404,7 @@ bool commandHelper(fb_quadlet_t cmd); + public: bool readReg(enum eRegBase, unsigned offset, quadlet_t *); bool writeReg(enum eRegBase, unsigned offset, quadlet_t); bool readRegBlock(enum eRegBase, unsigned, fb_quadlet_t *, size_t); Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-18 20:53:43 UTC (rev 1718) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-22 13:36:34 UTC (rev 1719) @@ -30,7 +30,7 @@ const int msgSet = 0x68; SaffirePro24::SaffirePro24( DeviceManager& d, - std::auto_ptr<ConfigRom>( configRom )) + std::auto_ptr<ConfigRom>( configRom )) : Dice::Device(d , configRom) , m_ch1(NULL) , m_ch2(NULL) @@ -41,15 +41,16 @@ SaffirePro24::~SaffirePro24() { - m_eap->deleteElement(m_ch1); - m_eap->deleteElement(m_ch2); + getEAP()->deleteElement(m_ch1); + getEAP()->deleteElement(m_ch2); if (m_ch1) delete m_ch1; if (m_ch2) delete m_ch2; } + bool SaffirePro24::discover() { if (Dice::Device::discover()) { fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(2, sizeof(fb_quadlet_t)); - m_eap->readRegBlock(Dice::Device::EAP::eRT_Application, 0x58, tmp, 2*sizeof(fb_quadlet_t)); + getEAP()->readRegBlock(Dice::Device::EAP::eRT_Application, 0x58, tmp, 2*sizeof(fb_quadlet_t)); hexDumpQuadlets(tmp, 2); m_ch1 = new LineInstSwitch(getEAP(), "LineInstCh1", 0x58, 2); @@ -64,21 +65,23 @@ } return false; } + void SaffirePro24::showDevice() { debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro24\n"); Dice::Device::showDevice(); } + bool SaffirePro24::setNickName( std::string name ) { - return m_eap->writeRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name.c_str(), name.size() ); + return getEAP()->writeRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name.c_str(), name.size() ); } + std::string SaffirePro24::getNickName() { char name[16]; - m_eap->readRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name, 16 ); + getEAP()->readRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name, 16 ); return std::string( name ); } - SaffirePro24::LineInstSwitch::LineInstSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue ) : Control::Enum(eap, name) , m_eap(eap) @@ -90,9 +93,11 @@ printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); m_selected = (m_state_tmp&m_activevalue)?1:0; } + int SaffirePro24::LineInstSwitch::selected() { return m_selected; } + bool SaffirePro24::LineInstSwitch::select(int n) { if ( n != m_selected ) { m_selected = n; |
From: <trac@ff...> - 2009-11-18 20:54:18
|
Author: arnonym Date: 2009-11-18 12:53:43 -0800 (Wed, 18 Nov 2009) New Revision: 1718 Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp trunk/libffado/src/dice/focusrite/saffire_pro24.h Log: Switching line/inst on channels 1+2 and low/high in channels 3+4 works now with the dbus-interface. Mixer is coming soon. Gotta ask back whether I am allowed to add the full description of the application-space here for all to see. Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-16 22:37:28 UTC (rev 1717) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-18 20:53:43 UTC (rev 1718) @@ -27,24 +27,105 @@ namespace Dice { namespace Focusrite { +const int msgSet = 0x68; + SaffirePro24::SaffirePro24( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) - : Dice::Device( d , configRom) + : Dice::Device(d , configRom) + , m_ch1(NULL) + , m_ch2(NULL) { - debugOutput( DEBUG_LEVEL_VERBOSE, "Created Dice::Focusrite::SaffirePro24 (NodeID %d)\n", - getConfigRom().getNodeId() ); + debugOutput(DEBUG_LEVEL_VERBOSE, "Created Dice::Focusrite::SaffirePro24 (NodeID %d)\n", + getConfigRom().getNodeId()); } SaffirePro24::~SaffirePro24() { + m_eap->deleteElement(m_ch1); + m_eap->deleteElement(m_ch2); + if (m_ch1) delete m_ch1; + if (m_ch2) delete m_ch2; } +bool SaffirePro24::discover() { + if (Dice::Device::discover()) { + fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(2, sizeof(fb_quadlet_t)); + m_eap->readRegBlock(Dice::Device::EAP::eRT_Application, 0x58, tmp, 2*sizeof(fb_quadlet_t)); + hexDumpQuadlets(tmp, 2); -void -SaffirePro24::showDevice() + m_ch1 = new LineInstSwitch(getEAP(), "LineInstCh1", 0x58, 2); + getEAP()->addElement(m_ch1); + m_ch2 = new LineInstSwitch(getEAP(), "LineInstCh2", 0x58, 2<<16); + getEAP()->addElement(m_ch2); + m_ch3 = new LevelSwitch(getEAP(), "LevelCh3", 0x5C, 1); + getEAP()->addElement(m_ch3); + m_ch4 = new LevelSwitch(getEAP(), "LevelCh4", 0x5C, 1<<16); + getEAP()->addElement(m_ch4); + return true; + } + return false; +} +void SaffirePro24::showDevice() { debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro24\n"); Dice::Device::showDevice(); } +bool SaffirePro24::setNickName( std::string name ) { + return m_eap->writeRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name.c_str(), name.size() ); +} +std::string SaffirePro24::getNickName() { + char name[16]; + m_eap->readRegBlock( Dice::Device::EAP::eRT_Application, 0x40, (fb_quadlet_t*)name, 16 ); + return std::string( name ); +} + +SaffirePro24::LineInstSwitch::LineInstSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue ) + : Control::Enum(eap, name) + , m_eap(eap) + , m_selected(0) + , m_offset(offset) + , m_activevalue(activevalue) +{ + m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); + printf("%s: Active?%i\n", name.c_str(), m_state_tmp&m_activevalue); + m_selected = (m_state_tmp&m_activevalue)?1:0; } +int SaffirePro24::LineInstSwitch::selected() { + return m_selected; } +bool SaffirePro24::LineInstSwitch::select(int n) { + if ( n != m_selected ) { + m_selected = n; + m_eap->readReg(Dice::Device::EAP::eRT_Application, m_offset, &m_state_tmp); + m_eap->writeReg(Dice::Device::EAP::eRT_Application, m_offset, m_state_tmp^m_activevalue); + m_eap->writeReg(Dice::Device::EAP::eRT_Application, msgSet, 4); + } + return true; +} +std::string SaffirePro24::LineInstSwitch::getEnumLabel(int n) { + if ( n == 1 ) { + return "Instrument"; + } + return "Line"; +} + +SaffirePro24::LevelSwitch::LevelSwitch(Dice::Device::EAP* eap, std::string name, size_t offset, int activevalue) + : LineInstSwitch(eap, name, offset, activevalue) +{ +} +std::string SaffirePro24::LevelSwitch::getEnumLabel(int n) { + switch (n) { + case 0: + return "Low"; + case 1: + return "High"; + default: + return ""; + } +} + + +} +} + +// vim: et Modified: trunk/libffado/src/dice/focusrite/saffire_pro24.h =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-16 22:37:28 UTC (rev 1717) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-18 20:53:43 UTC (rev 1718) @@ -36,14 +36,53 @@ public: SaffirePro24( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); - virtual ~SaffirePro24(); + ~SaffirePro24(); - virtual void showDevice(); + bool discover(); + void showDevice(); + + bool canChangeNickname() { return true; } + bool setNickName( std::string name ); + std::string getNickName(); + + class LineInstSwitch : public Control::Enum + { + protected: + friend class Dice::Focusrite::SaffirePro24; + + LineInstSwitch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); + public: + int count() { return 2; } + + int selected(); + bool select(int); + + std::string getEnumLabel(int); + + private: + Dice::Device::EAP* m_eap; + int m_selected; + size_t m_offset; + int m_activevalue; + fb_quadlet_t m_state_tmp; + }; + class LevelSwitch : public LineInstSwitch + { + protected: + friend class Dice::Focusrite::SaffirePro24; + + LevelSwitch(Dice::Device::EAP*, std::string name, size_t offset, int activevalue); + public: + std::string getEnumLabel(int); + }; private: + LineInstSwitch *m_ch1, *m_ch2; + LevelSwitch *m_ch3, *m_ch4; }; } } #endif +// vim: et |
From: <trac@ff...> - 2009-11-16 22:37:59
|
Author: arnonym Date: 2009-11-16 14:37:28 -0800 (Mon, 16 Nov 2009) New Revision: 1717 Modified: trunk/libffado/src/dice/dice_eap.cpp trunk/libffado/tests/test-dice-eap.cpp Log: Make reading the whole application space its own special thing. Modified: trunk/libffado/src/dice/dice_eap.cpp =================================================================== --- trunk/libffado/src/dice/dice_eap.cpp 2009-11-16 20:44:40 UTC (rev 1716) +++ trunk/libffado/src/dice/dice_eap.cpp 2009-11-16 22:37:28 UTC (rev 1717) @@ -460,20 +460,6 @@ scfg->show(); } - printMessage("--- Application space ---\n"); - fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(128, sizeof(fb_quadlet_t)); - unsigned int appsize = 512; //m_app_size; /// m_app_size is rather big. Start with the first four block of 128 quadlets... - unsigned int offset = 0; - while ( appsize > 0 ) { - if ( ! readRegBlock( eRT_Application, offset, tmp, (appsize<128)?appsize:128 ) ) - appsize = 0; - else { - hexDumpQuadlets(tmp, 128); - offset += 128; - appsize -= 128; - } - } - // fixme // size_t len = 0x1000; // quadlet_t tmp[len]; @@ -484,6 +470,23 @@ // } } +void +Device::EAP::showApplication() +{ + printMessage("--- Application space ---\n"); + fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(128, sizeof(fb_quadlet_t)); + unsigned int appsize = m_app_size; /// m_app_size is rather big. Start with the first four block of 128 quadlets... + unsigned int offset = 0; + while ( appsize > 0 ) { + if ( ! readRegBlock( eRT_Application, offset, tmp, ((appsize<128)?appsize:128)*sizeof(fb_quadlet_t) ) ) + appsize = 0; + else { + hexDumpQuadlets(tmp, 128); + offset += 128*sizeof(fb_quadlet_t); + appsize -= 128*sizeof(fb_quadlet_t); + } + } +} // EAP load/store operations Modified: trunk/libffado/tests/test-dice-eap.cpp =================================================================== --- trunk/libffado/tests/test-dice-eap.cpp 2009-11-16 20:44:40 UTC (rev 1716) +++ trunk/libffado/tests/test-dice-eap.cpp 2009-11-16 22:37:28 UTC (rev 1717) @@ -64,12 +64,14 @@ //////////////////////////////////////////////// const char *argp_program_version = "test-dice-eap 0.1"; const char *argp_program_bug_address = "<ffado-devel@...>"; -static char doc[] = "test-avccmd -- test program to examine the DICE EAP code."; +static char doc[] = "test-dice-eap -- test program to examine the DICE EAP code."; static char args_doc[] = "NODE_ID"; static struct argp_option options[] = { {"verbose", 'v', "LEVEL", 0, "Produce verbose output" }, {"port", 'p', "PORT", 0, "Set port" }, {"node", 'n', "NODE", 0, "Set node" }, + {"application",'a', NULL, 0, "Show the application space"}, + {"counts", 'c', "COUNTS", 0, "Number of runs to do. -1 means to run forever."}, { 0 } }; @@ -81,16 +83,20 @@ , test( false ) , port( -1 ) , node( -1 ) + , application( false ) + , counts( -1 ) { args[0] = 0; } char* args[MAX_ARGS]; int nargs; - int verbose; + int verbose; bool test; int port; int node; + bool application; + int counts; } arguments; // Parse a single option. @@ -110,6 +116,9 @@ case 't': arguments->test = true; break; + case 'a': + arguments->application = true; + break; case 'p': arguments->port = strtol(arg, &tail, 0); if (errno) { @@ -124,6 +133,13 @@ return errno; } break; + case 'c': + arguments->counts = strtol(arg, &tail, 0); + if (errno) { + perror("argument parsing failed:"); + return errno; + } + break; case ARGP_KEY_ARG: if (state->arg_num >= MAX_ARGS) { // Too many arguments. @@ -219,7 +235,7 @@ } // now play - avDevice->setVerboseLevel(DEBUG_LEVEL_VERY_VERBOSE); + //avDevice->setVerboseLevel(DEBUG_LEVEL_VERY_VERBOSE); bool supports_eap = Device::EAP::supportsEAP(*avDevice); if (!supports_eap) { @@ -231,7 +247,10 @@ Device::EAP &eap = *(avDevice->getEAP()); - eap.show(); + if (arguments.application) + eap.showApplication(); + else + eap.show(); eap.lockControl(); Control::Element *e = eap.getElementByName("MatrixMixer"); if(e == NULL) { @@ -254,7 +273,7 @@ int cnt = 0; - while(run) { + while(run && arguments.counts != 0) { eap.lockControl(); Control::Element *e = eap.getElementByName("Router"); if(e == NULL) { @@ -294,6 +313,7 @@ e = NULL; eap.unlockControl(); sleep(1); + arguments.counts--; } // cleanup |
From: <trac@ff...> - 2009-11-16 20:45:08
|
Author: arnonym Date: 2009-11-16 12:44:40 -0800 (Mon, 16 Nov 2009) New Revision: 1716 Modified: trunk/libffado/doc/reference.doxygen.in Log: - Update the doxygen file to a new doxygen-version. - De-activate the LaTeX-output. - Enable output for QAssistant files. Modified: trunk/libffado/doc/reference.doxygen.in =================================================================== --- trunk/libffado/doc/reference.doxygen.in 2009-11-16 11:47:58 UTC (rev 1715) +++ trunk/libffado/doc/reference.doxygen.in 2009-11-16 20:44:40 UTC (rev 1716) @@ -1,4 +1,4 @@ -# Doxyfile 1.3.4 +# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,429 +14,668 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = LIBFFADO -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = $VERSION -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = reference +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper -# language. The default language is English, other supported languages -# are: Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, -# Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, -# Slovak, Slovene, Spanish, Swedish, and Ukrainian. +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - INHERIT_DOCS = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. -DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. -EXTRACT_PRIVATE = NO +EXTRACT_PRIVATE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. -EXTRACT_STATIC = NO +EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. -INTERNAL_DOCS = NO +INTERNAL_DOCS = YES -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = $top_srcdir/src \ $top_srcdir/doc \ $top_srcdir/libffado +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc +INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.cpp *.h *.dox +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +FILE_PATTERNS = *.cpp \ + *.h \ + *.dox + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are -# excluded from the input. +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* -EXCLUDE_PATTERNS = *.svn* *reference* +EXCLUDE_PATTERNS = *.svn* \ + *reference* -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = . -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes # to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. -INPUT_FILTER = +INPUT_FILTER = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -445,36 +684,54 @@ # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -483,277 +740,393 @@ # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 5 +COLS_IN_ALPHA_INDEX = 3 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output dir. +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = YES + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = LIBFFADO + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = reference + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. -GENERATE_TREEVIEW = YES +GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = YES +GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -762,40 +1135,45 @@ # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -804,283 +1182,338 @@ # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = $top_srcdir/src -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are -# alone on a line, have an all uppercase name, and do not end with a -# semicolon. Such function macros are typically used for boiler-plate -# code, and will confuse the parser if not removed. +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes -# with base or super classes. Setting the tag to NO turns the diagrams -# off. Note that this option is superceded by the HAVE_DOT option -# below. This is only a fallback. It is recommended to install and use -# dot, since it yields more powerful graphs. +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. -HIDE_UNDOC_RELATIONS = YES +HIDE_UNDOC_RELATIONS = NO -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = YES -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. -COLLABORATION_GRAPH = YES +COLLABORATION_GRAPH = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similiar to the OMG's Unified Modeling +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = YES -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. -INCLUDE_GRAPH = YES +INCLUDE_GRAPH = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. -INCLUDED_BY_GRAPH = YES +INCLUDED_BY_GRAPH = NO -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -MAX_DOT_GRAPH_WIDTH = 1024 +DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. -MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 0 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of -# the graphs generated by dot. A depth value of 3 means that only -# nodes reachable from the root by following a path via at most 3 -# edges will be shown. Nodes that lay further from the root node will -# be omitted. Note that setting this option to 1 or 2 may greatly -# reduce the computation time needed for large code bases. Also note -# that a graph may be further truncated if the graph's image -# dimensions are not sufficient to fit the graph (see -# MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the -# depth value (the default), the graph is not depth-constrained. +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). -MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = YES -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO |
From: <trac@ff...> - 2009-11-16 11:48:23
|
Author: jwoithe Date: 2009-11-16 03:47:58 -0800 (Mon, 16 Nov 2009) New Revision: 1715 Modified: branches/libffado-2.0/src/motu/motu_avdevice.cpp branches/libffado-2.0/src/motu/motu_avdevice.h Log: MOTU: add some initial details relating to the original 828 interface (known in FFADO as the 828Mk1). Modified: branches/libffado-2.0/src/motu/motu_avdevice.cpp =================================================================== --- branches/libffado-2.0/src/motu/motu_avdevice.cpp 2009-11-15 22:56:42 UTC (rev 1714) +++ branches/libffado-2.0/src/motu/motu_avdevice.cpp 2009-11-16 11:47:58 UTC (rev 1715) @@ -472,9 +472,20 @@ /* * Retrieve the current sample rate from the MOTU device. */ - quadlet_t q = ReadRegister(MOTU_REG_CLK_CTRL); + quadlet_t q = 0; int rate = 0; + if (m_motu_model == MOTU_MODEL_828MkI) { + /* The original MOTU interfaces did things rather differently */ + q = ReadRegister(MOTU_G1_REG_CONFIG); + if ((q & MOTU_G1_RATE_MASK) == MOTU_G1_RATE_44100) + rate = 44100; + else + rate = 48000; + return rate; + } + + q = ReadRegister(MOTU_REG_CLK_CTRL); switch (q & MOTU_RATE_BASE_MASK) { case MOTU_RATE_BASE_44100: rate = 44100; @@ -520,6 +531,46 @@ if ( samplingFrequency > DevicesProperty[m_motu_model-1].MaxSampleRate ) return false; + /* The original MOTU devices do things differently; they are much + * simpler than the later interfaces. + */ + if (m_motu_model == MOTU_MODEL_828MkI) { + reg = ReadRegister(MOTU_G1_REG_CONFIG); + if (samplingFrequency > 0) { + reg &= ~MOTU_G1_RATE_MASK; + switch (samplingFrequency) { + case 44100: + reg |= MOTU_G1_RATE_44100; + break; + case 48000: + reg |= MOTU_G1_RATE_48000; + default: + // Unsupported rate + return false; + } + } + if (clock_source != MOTU_CLKSRC_UNCHANGED) { + switch (clock_source) { + case MOTU_CLKSRC_INTERNAL: + clock_source = MOTU_G1_CLKSRC_INTERNAL; break; + case MOTU_CLKSRC_SPDIF_TOSLINK: + clock_source = MOTU_G1_CLKSRC_SPDIF; break; + case MOTU_CLKSRC_ADAT_9PIN: + clock_source = MOTU_G1_CLKSRC_ADAT_9PIN; break; + default: + // Unsupported clock source + return false; + } + reg &= ~MOTU_G1_CLKSRC_MASK; + reg |= clock_source; + } + if (WriteRegister(MOTU_G1_REG_CONFIG, reg) != 0) + return false; + return true; + } + + /* The rest of this function deals with later generation devices */ + reg = ReadRegister(MOTU_REG_CLK_CTRL); switch ( samplingFrequency ) { @@ -682,6 +733,7 @@ FFADODevice::ClockSource MotuDevice::clockIdToClockSource(unsigned int id) { ClockSource s; + bool g1_model = (m_motu_model == MOTU_MODEL_828MkI); s.id = id; // Assume a clock source is valid/active unless otherwise overridden. @@ -697,6 +749,7 @@ case MOTU_CLKSRC_ADAT_OPTICAL: s.type = eCT_ADAT; s.description = "ADAT optical"; + s.valid = s.active = s.locked = !g1_model; break; case MOTU_CLKSRC_SPDIF_TOSLINK: s.type = eCT_SPDIF; @@ -714,6 +767,7 @@ case MOTU_CLKSRC_WORDCLOCK: s.type = eCT_WordClock; s.description = "Wordclock"; + s.valid = s.active = s.locked = !g1_model; break; case MOTU_CLKSRC_ADAT_9PIN: s.type = eCT_ADAT; @@ -722,6 +776,7 @@ case MOTU_CLKSRC_AES_EBU: s.type = eCT_AES; s.description = "AES/EBU"; + s.valid = s.active = s.locked = !g1_model; break; default: s.type = eCT_Invalid; @@ -1112,8 +1167,16 @@ } unsigned int MotuDevice::getOpticalMode(unsigned int dir) { - unsigned int reg = ReadRegister(MOTU_REG_ROUTE_PORT_CONF); + unsigned int reg; + if (m_motu_model == MOTU_MODEL_828MkI) { + // The early devices used a different register layout. + // To be completed. + return 0; + } + + reg = ReadRegister(MOTU_REG_ROUTE_PORT_CONF); + debugOutput(DEBUG_LEVEL_VERBOSE, "optical mode: %x %x %x %x\n",dir, reg, reg & MOTU_OPTICAL_IN_MODE_MASK, reg & MOTU_OPTICAL_OUT_MODE_MASK); @@ -1133,6 +1196,12 @@ if (m_motu_model==MOTU_MODEL_896HD && mode==MOTU_OPTICAL_MODE_TOSLINK) return -1; + if (m_motu_model == MOTU_MODEL_828MkI) { + // The earlier MOTUs handle this differently. + // To be completed. + return 0; + } + // Set up the optical control register value according to the current // optical port modes. At this stage it's not completely understood // what the "Optical control" register does, so the values it's set to Modified: branches/libffado-2.0/src/motu/motu_avdevice.h =================================================================== --- branches/libffado-2.0/src/motu/motu_avdevice.h 2009-11-15 22:56:42 UTC (rev 1714) +++ branches/libffado-2.0/src/motu/motu_avdevice.h 2009-11-16 11:47:58 UTC (rev 1715) @@ -89,6 +89,48 @@ #define MOTU_REG_INPUT_GAIN_PHINV1 0x0c74 #define MOTU_REG_INPUT_GAIN_PHINV2 0x0c78 +/* Device register definitions for the earliest generation devices */ +#define MOTU_G1_REG_CONFIG 0x0b00 + +/* The optical mode defines for the 828Mk1 are estimates at present, to be + * confirmed. + */ +#define MOTU_G1_OPT_IN_MODE_MASK 0x0000 // Still be be observed +#define MOTU_G1_OPT_IN_MODE_BIT0 0 // Still to be observed +#define MOTU_G1_OPT_OUT_MODE_MASK 0xc000 +#define MOTU_G1_OPT_OUT_MODE_BIT0 26 +#define MOTU_G1_OPTICAL_OFF 0x0000 +#define MOTU_G1_OPTICAL_TOSLINK 0x0001 +#define MOTU_G1_OPTICAL_ADAT 0x0002 + +#define MOTU_G1_RATE_MASK 0x0004 +#define MOTU_G1_RATE_44100 0x0000 +#define MOTU_G1_RATE_48000 0x0004 + +#define MOTU_G1_CLKSRC_MASK 0x0003 +#define MOTU_G1_CLKSRC_INTERNAL 0x0000 +#define MOTU_G1_CLKSRC_ADAT_9PIN 0x0001 +#define MOTU_G1_CLKSRC_SPDIF 0x0002 +#define MOTU_G1_CLKSRC_UNCHANGED MOTU_CLKSRC_UNCHANGED + +#define MOTU_G1_MONIN_MASK 0x3f00 +#define MOTU_G1_MONIN_L_SRC_MASK 0x0600 +#define MOTU_G1_MONIN_R_SRC_MASK 0x3000 +#define MOTU_G1_MONIN_L_MUTE_MASK 0x0100 // Yes, the sense of these 2 bits +#define MOTU_G1_MONIN_R_EN_MASK 0x0800 // really are reversed +#define MOTU_G1_MONIN_L_MUTE 0x0100 +#define MOTU_G1_MONIN_L_ENABLE 0x0000 +#define MOTU_G1_MONIN_R_MUTE 0x0000 +#define MOTU_G1_MONIN_R_ENABLE 0x0800 +#define MOTU_G1_MONIN_L_CH1 0x0000 +#define MOTU_G1_MONIN_L_CH3 0x0020 +#define MOTU_G1_MONIN_L_CH5 0x0040 +#define MOTU_G1_MONIN_L_CH7 0x0060 +#define MOTU_G1_MONIN_R_CH2 0x0000 +#define MOTU_G1_MONIN_R_CH4 0x1000 +#define MOTU_G1_MONIN_R_CH6 0x2000 +#define MOTU_G1_MONIN_R_CH8 0x3000 + /* Mark3 device registers - these don't have MOTU_BASE_ADDR as the base * address so for now we'll define them as absolute addresses. */ |
From: <trac@ff...> - 2009-11-15 22:57:11
|
Author: arnonym Date: 2009-11-15 14:56:42 -0800 (Sun, 15 Nov 2009) New Revision: 1714 Modified: trunk/libffado/src/dice/ trunk/libffado/src/libstreaming/rme/ Log: ignore me Property changes on: trunk/libffado/src/dice ___________________________________________________________________ Name: svn:ignore - *.os + *.os .*.swp Property changes on: trunk/libffado/src/libstreaming/rme ___________________________________________________________________ Name: svn:ignore + *.os .*.swp |
From: <trac@ff...> - 2009-11-15 22:54:57
|
Author: arnonym Date: 2009-11-15 14:54:26 -0800 (Sun, 15 Nov 2009) New Revision: 1713 Modified: trunk/libffado/src/debugmodule/debugmodule.cpp trunk/libffado/src/dice/dice_eap.cpp Log: Print the hexdump of the quadlets to stderr. Print the stuff from show() as normal messages, not as debug. And print the first 512 bytes of the application space of the dice-chip. Trying to figure out which bits to set to control line/instrument and high/low switches. Modified: trunk/libffado/src/debugmodule/debugmodule.cpp =================================================================== --- trunk/libffado/src/debugmodule/debugmodule.cpp 2009-11-15 22:51:57 UTC (rev 1712) +++ trunk/libffado/src/debugmodule/debugmodule.cpp 2009-11-15 22:54:26 UTC (rev 1713) @@ -859,7 +859,7 @@ return; } for (i = 0; i< length; i += 1) { - printf( "%02d %04X: %08X (%08X)" + fprintf(stderr, "%02d %04X: %08X (%08X)" "\n", i, i*4, data[i],CondSwapFromBus32(data[i])); } } Modified: trunk/libffado/src/dice/dice_eap.cpp =================================================================== --- trunk/libffado/src/dice/dice_eap.cpp 2009-11-15 22:51:57 UTC (rev 1712) +++ trunk/libffado/src/dice/dice_eap.cpp 2009-11-15 22:54:26 UTC (rev 1713) @@ -397,59 +397,60 @@ Device::EAP::show() { printMessage("== DICE EAP ==\n"); - debugOutput(DEBUG_LEVEL_VERBOSE, "Parameter Space info:\n"); - debugOutput(DEBUG_LEVEL_VERBOSE, " Capability : offset=%04X size=%06d\n", m_capability_offset, m_capability_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Command : offset=%04X size=%06d\n", m_cmd_offset, m_cmd_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Mixer : offset=%04X size=%06d\n", m_mixer_offset, m_mixer_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Peak : offset=%04X size=%06d\n", m_peak_offset, m_peak_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " New Routing Cfg : offset=%04X size=%06d\n", m_new_routing_offset, m_new_routing_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " New Stream Cfg : offset=%04X size=%06d\n", m_new_stream_cfg_offset, m_new_stream_cfg_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Current Cfg : offset=%04X size=%06d\n", m_curr_cfg_offset, m_curr_cfg_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Standalone Cfg : offset=%04X size=%06d\n", m_standalone_offset, m_standalone_size); - debugOutput(DEBUG_LEVEL_VERBOSE, " Application Space : offset=%04X size=%06d\n", m_app_offset, m_app_size); + printMessage("Parameter Space info:\n"); + printMessage(" Capability : offset=%04X size=%06d\n", m_capability_offset, m_capability_size); + printMessage(" Command : offset=%04X size=%06d\n", m_cmd_offset, m_cmd_size); + printMessage(" Mixer : offset=%04X size=%06d\n", m_mixer_offset, m_mixer_size); + printMessage(" Peak : offset=%04X size=%06d\n", m_peak_offset, m_peak_size); + printMessage(" New Routing Cfg : offset=%04X size=%06d\n", m_new_routing_offset, m_new_routing_size); + printMessage(" New Stream Cfg : offset=%04X size=%06d\n", m_new_stream_cfg_offset, m_new_stream_cfg_size); + printMessage(" Current Cfg : offset=%04X size=%06d\n", m_curr_cfg_offset, m_curr_cfg_size); + printMessage(" Standalone Cfg : offset=%04X size=%06d\n", m_standalone_offset, m_standalone_size); + printMessage(" Application Space : offset=%04X size=%06d\n", m_app_offset, m_app_size); - debugOutput(DEBUG_LEVEL_VERBOSE, "Capabilities:\n"); - debugOutput(DEBUG_LEVEL_VERBOSE, " Router: %sexposed, %swritable, %sstored, %d routes\n", + printMessage("Capabilities:\n"); + printMessage(" Router: %sexposed, %swritable, %sstored, %d routes\n", (m_router_exposed?"":"not "), (m_router_readonly?"not ":""), (m_router_flashstored?"":"not "), m_router_nb_entries); - debugOutput(DEBUG_LEVEL_VERBOSE, " Mixer : %sexposed, %swritable, %sstored\n", + printMessage(" Mixer : %sexposed, %swritable, %sstored\n", (m_mixer_exposed?"":"not "), (m_mixer_readonly?"not ":""), (m_mixer_flashstored?"":"not ")); - debugOutput(DEBUG_LEVEL_VERBOSE, " tx id: %s [%d], rx id: %s [%d]\n", + printMessage(" tx id: %s [%d], rx id: %s [%d]\n", dstBlockToString(m_mixer_tx_id), m_mixer_tx_id, srcBlockToString(m_mixer_rx_id), m_mixer_rx_id); - debugOutput(DEBUG_LEVEL_VERBOSE, " nb tx channels: %d, nb rx channels: %d\n", m_mixer_nb_tx, m_mixer_nb_rx); - debugOutput(DEBUG_LEVEL_VERBOSE, " General: dynamic stream config %ssupported\n", + printMessage(" nb tx channels: %d, nb rx channels: %d\n", m_mixer_nb_tx, m_mixer_nb_rx); + printMessage(" General: dynamic stream config %ssupported\n", (m_general_support_dynstream?"":"not ")); - debugOutput(DEBUG_LEVEL_VERBOSE, " flash load and store %ssupported\n", + printMessage(" flash load and store %ssupported\n", (m_general_support_flash?"":"not ")); - debugOutput(DEBUG_LEVEL_VERBOSE, " peak metering %s\n", + printMessage(" peak metering %s\n", (m_general_peak_enabled?"enabled":"disabled")); - debugOutput(DEBUG_LEVEL_VERBOSE, " stream config %sstored\n", + printMessage(" stream config %sstored\n", (m_general_stream_cfg_stored?"":"not ")); - debugOutput(DEBUG_LEVEL_VERBOSE, " max TX streams: %d, max RX streams: %d\n", + printMessage(" max TX streams: %d, max RX streams: %d\n", m_general_max_tx, m_general_max_rx); if(m_general_chip == DICE_EAP_CAP_GENERAL_CHIP_DICEII) { - debugOutput(DEBUG_LEVEL_VERBOSE, " Chip: DICE-II\n"); + printMessage(" Chip: DICE-II\n"); } else if(m_general_chip == DICE_EAP_CAP_GENERAL_CHIP_DICEMINI) { - debugOutput(DEBUG_LEVEL_VERBOSE, " Chip: DICE Mini (TCD2210)\n"); + printMessage(" Chip: DICE Mini (TCD2210)\n"); } else if(m_general_chip == DICE_EAP_CAP_GENERAL_CHIP_DICEJR) { - debugOutput(DEBUG_LEVEL_VERBOSE, " Chip: DICE Junior (TCD2220)\n"); + printMessage(" Chip: DICE Junior (TCD2220)\n"); } - debugOutput(DEBUG_LEVEL_VERBOSE, "--- Mixer configuration ---\n"); + printMessage("--- Mixer configuration ---\n"); if(m_mixer) { m_mixer->show(); } - debugOutput(DEBUG_LEVEL_VERBOSE, "--- Router/Peak space ---\n"); + printMessage("--- Router/Peak space ---\n"); if(m_router) { m_router->show(); } + printMessage("--- Active Router/Stream ---\n"); RouterConfig *rcfg = getActiveRouterConfig(); if(rcfg) { rcfg->show(); @@ -459,6 +460,20 @@ scfg->show(); } + printMessage("--- Application space ---\n"); + fb_quadlet_t* tmp = (fb_quadlet_t *)calloc(128, sizeof(fb_quadlet_t)); + unsigned int appsize = 512; //m_app_size; /// m_app_size is rather big. Start with the first four block of 128 quadlets... + unsigned int offset = 0; + while ( appsize > 0 ) { + if ( ! readRegBlock( eRT_Application, offset, tmp, (appsize<128)?appsize:128 ) ) + appsize = 0; + else { + hexDumpQuadlets(tmp, 128); + offset += 128; + appsize -= 128; + } + } + // fixme // size_t len = 0x1000; // quadlet_t tmp[len]; |
From: <trac@ff...> - 2009-11-15 22:52:29
|
Author: arnonym Date: 2009-11-15 14:51:57 -0800 (Sun, 15 Nov 2009) New Revision: 1712 Added: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp trunk/libffado/src/dice/focusrite/saffire_pro24.h Modified: trunk/libffado/src/SConscript trunk/libffado/src/dice/dice_avdevice.cpp Log: Start a special class for the saffire24... Modified: trunk/libffado/src/SConscript =================================================================== --- trunk/libffado/src/SConscript 2009-11-15 22:20:11 UTC (rev 1711) +++ trunk/libffado/src/SConscript 2009-11-15 22:51:57 UTC (rev 1712) @@ -159,6 +159,7 @@ dice/dice_avdevice.cpp \ dice/dice_eap.cpp \ dice/focusrite/saffire_pro40.cpp \ + dice/focusrite/saffire_pro24.cpp \ ' ) bounce_source = env.Split( '\ Modified: trunk/libffado/src/dice/dice_avdevice.cpp =================================================================== --- trunk/libffado/src/dice/dice_avdevice.cpp 2009-11-15 22:20:11 UTC (rev 1711) +++ trunk/libffado/src/dice/dice_avdevice.cpp 2009-11-15 22:51:57 UTC (rev 1712) @@ -46,6 +46,7 @@ #include "devicemanager.h" #include "focusrite/saffire_pro40.h" +#include "focusrite/saffire_pro24.h" using namespace std; @@ -126,6 +127,8 @@ switch(modelId) { case 0x00000005: return new Focusrite::SaffirePro40(d, configRom); + case 0x00000007: + return new Focusrite::SaffirePro24(d, configRom); default: // return a plain Dice device return new Device(d, configRom); } Copied: trunk/libffado/src/dice/focusrite/saffire_pro24.cpp (from rev 1705, trunk/libffado/src/dice/focusrite/saffire_pro40.cpp) =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.cpp (rev 0) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.cpp 2009-11-15 22:51:57 UTC (rev 1712) @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2009 by Pieter Palmers + * Copyright (C) 2009 by Arnold Krille + * + * 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 <http://www.gnu.org/licenses/>. + * + */ + +#include "saffire_pro24.h" + +namespace Dice { +namespace Focusrite { + +SaffirePro24::SaffirePro24( DeviceManager& d, + std::auto_ptr<ConfigRom>( configRom )) + : Dice::Device( d , configRom) +{ + debugOutput( DEBUG_LEVEL_VERBOSE, "Created Dice::Focusrite::SaffirePro24 (NodeID %d)\n", + getConfigRom().getNodeId() ); +} + +SaffirePro24::~SaffirePro24() +{ +} + +void +SaffirePro24::showDevice() +{ + debugOutput(DEBUG_LEVEL_VERBOSE, "This is a Dice::Focusrite::SaffirePro24\n"); + Dice::Device::showDevice(); +} + +} +} Copied: trunk/libffado/src/dice/focusrite/saffire_pro24.h (from rev 1705, trunk/libffado/src/dice/focusrite/saffire_pro40.h) =================================================================== --- trunk/libffado/src/dice/focusrite/saffire_pro24.h (rev 0) +++ trunk/libffado/src/dice/focusrite/saffire_pro24.h 2009-11-15 22:51:57 UTC (rev 1712) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2009 by Pieter Palmers + * Copyright (C) 2009 by Arnold Krille + * + * 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 <http://www.gnu.org/licenses/>. + * + */ + +#ifndef DICE_FOCUSRITE_SAFFIRE_PRO24_H +#define DICE_FOCUSRITE_SAFFIRE_PRO24_H + +#include "dice/dice_avdevice.h" + +#include "libieee1394/configrom.h" + +namespace Dice { +namespace Focusrite { + +class SaffirePro24 : public Dice::Device { +public: + SaffirePro24( DeviceManager& d, + std::auto_ptr<ConfigRom>( configRom )); + virtual ~SaffirePro24(); + + virtual void showDevice(); + +private: +}; + +} +} + +#endif |