diff --git a/hardware/firewire/libffado/files/flags.patch b/hardware/firewire/libffado/files/flags.patch index 9dc6f3a259..50f8b712d0 100644 --- a/hardware/firewire/libffado/files/flags.patch +++ b/hardware/firewire/libffado/files/flags.patch @@ -1,12 +1,10 @@ -Index: libffado-2.1.0/SConstruct -=================================================================== ---- libffado-2.1.0.orig/SConstruct -+++ libffado-2.1.0/SConstruct -@@ -84,6 +84,30 @@ buildenv=os.environ +diff -Nuar a/SConstruct b/SConstruct +--- a/SConstruct 2017-12-23 13:43:57.000000000 +0300 ++++ b/SConstruct 2018-02-24 16:24:14.959394193 +0300 +@@ -90,6 +90,29 @@ - env = Environment( tools=['default','scanreplace','pyuic','pyuic4','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) + env = Environment( tools=['default','scanreplace','pyuic','pyuic4','pyuic5','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts ) -+ +if os.environ.has_key('CC'): + env['CC'] = os.environ['CC'] + @@ -30,6 +28,6 @@ Index: libffado-2.1.0/SConstruct + env['OS_CPPFLAGS'] = os.environ['CPPFLAGS'] + env['CPPFLAGS'] = os.environ['CPPFLAGS'] + - if env.has_key('COMPILE_FLAGS') and len(env['COMPILE_FLAGS']) > 0: - print ''' - * Usage of additional flags is not supported by the ffado-devs. + custom_flags = False + + if 'COMPILE_FLAGS' in env and len(env['COMPILE_FLAGS']) > 0: diff --git a/hardware/firewire/libffado/files/libffado-2.4.0-additional-py3-fixes.patch b/hardware/firewire/libffado/files/libffado-2.4.0-additional-py3-fixes.patch new file mode 100644 index 0000000000..fd5d2f44ba --- /dev/null +++ b/hardware/firewire/libffado/files/libffado-2.4.0-additional-py3-fixes.patch @@ -0,0 +1,96 @@ +--- a/support/mixer-qt4/ffado/panelmanager.py 2018-01-11 12:27:20.518923209 +0900 ++++ a/support/mixer-qt4/ffado/panelmanager.py 2018-01-11 12:31:03.956299962 +0900 +@@ -38,6 +38,7 @@ + + import sys + import time ++import importlib + + import logging + log = logging.getLogger('panelmanager') +@@ -302,20 +303,15 @@ + # + # Specific (or dummy) mixer widgets get loaded in the following + # ++ found = False + if 'mixer' in dev and dev['mixer'] != None: + mixerapp = dev['mixer'] +- global mixerwidget +- exec( """ +-try: +- import ffado.mixer.%s +- globals()["mixerwidget"] = ffado.mixer.%s.%s( w ) +- found = True +-except ImportError: +- log.debug("bypassdbus set, %s module not available: ignored") +- found = False +-""" % (mixerapp.lower(), mixerapp.lower(), mixerapp, mixerapp.lower()) ) +- else: +- found = False ++ try: ++ mixer_module = importlib.import_module("ffado.mixer.%s" % mixerapp.lower()) ++ mixerwidget = getattr(mixer_module, mixerapp)(w) ++ found = True ++ except ImportError: ++ log.debug("bypassdbus set, %s module not available: ignored" % mixerapp.lower()) + + if not found: + mixerwidget = Dummy( w ) +--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py 2018-01-11 12:34:10.200777889 +0900 ++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py 2018-01-11 12:45:13.278911705 +0900 +@@ -194,7 +194,7 @@ + #log.debug("Got %i peaks" % len(peakvalues)) + for peak in peakvalues: + #log.debug("peak = [%s,%s]" % (str(peak[0]),str(peak[1]))) +- if peak[0] >= 0: ++ if peak[1] >= 0: + self.switchers[peak[0]].peakValue(peak[1]) + + def updateMixerRouting(self): +--- a/support/mixer-qt4/ffado/widgets/matrixmixer.py 2018-01-11 12:54:27.545361864 +0900 ++++ b/support/mixer-qt4/ffado/widgets/matrixmixer.py 2018-01-11 12:56:36.899124318 +0900 +@@ -512,7 +512,7 @@ + self.rowHeaders[j].lbl.setText(row_name) + + def updateValues(self, n): +- nbitems = len(n)/3 ++ nbitems = len(n) // 3 + for i in range(nbitems): + n_0 = n[3*i] + n_1 = n[3*i+1] +@@ -951,7 +951,7 @@ + return self.interface.setValue(In, Out, val) + + def updateValues(self, n): +- nbitems = len(n)/3 ++ nbitems = len(n) // 3 + for j in range(nbitems): + n_0 = n[3*j] + n_1 = n[3*j+1] +@@ -1406,7 +1406,7 @@ + def matrixControlChanged(self, n): + # Update value needed for "per Out" view + #log.debug("Update per Output( %s )" % str(n)) +- nbitems = len(n)/3 ++ nbitems = len(n) // 3 + if (self.rule == "Columns_are_inputs"): + n_t = n + else: +@@ -1420,7 +1420,7 @@ + def sliderControlChanged(self, n): + # Update value needed for matrix view + #log.debug("Update Matrix( %s )" % str(n)) +- nbitems = len(n)/3 ++ nbitems = len(n) // 3 + if (((self.rule == "Columns_are_inputs") and not self.transpose) or ((self.rule != "Columns_are_inputs") and self.transpose)): + n_t = () + for i in range(nbitems): +@@ -1512,7 +1512,7 @@ + log.debug("Number of stereo output channels must be specified") + return False + n = int(readMixerString[idx+2]) +- if n > self.perOut.nbOut/2: ++ if n > self.perOut.nbOut // 2: + log.debug("Incoherent number of stereo channels") + return False + if n > 0: diff --git a/hardware/firewire/libffado/files/libffado-2.4.0-crossbar-router-fix.patch b/hardware/firewire/libffado/files/libffado-2.4.0-crossbar-router-fix.patch new file mode 100644 index 0000000000..99861abe28 --- /dev/null +++ b/hardware/firewire/libffado/files/libffado-2.4.0-crossbar-router-fix.patch @@ -0,0 +1,11 @@ +--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py 2018-01-11 12:34:10.200777889 +0900 ++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py 2018-01-11 12:45:13.278911705 +0900 +@@ -98,7 +98,7 @@ + self.combo.setCurrentIndex(self.combo.findText(src)) + else: + self.combo.setCurrentIndex(0) +- self.combo.activated.connect(self.comboCurrentChanged) ++ self.combo.activated[str].connect(self.comboCurrentChanged) + + + def peakValue(self, value): diff --git a/hardware/firewire/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch b/hardware/firewire/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch new file mode 100644 index 0000000000..f0937559b8 --- /dev/null +++ b/hardware/firewire/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch @@ -0,0 +1,197 @@ +------------------------------------------------------------------------ +r2726 | jwoithe | 2018-01-05 18:56:40 +0900 (Fri, 05 Jan 2018) | 13 lines + +Further Python3/PyQt5 compatibility fixes, enhance "About" dialog box. + +This patch was prepared by Orcan Ogetbil on Fedora and tested on that +distribution with PyQt4-4.12.1 and PyQt5-5.9.1. It is primarily concerned +with additional compatibility between Python2/3 and PyQt4/5. It has also +been tested under python 2 with pyqt 4.11.4. Further testing under +different python/pyqt environments would be welcomed. + +An enhancement to the "About" dialog is also included which adds version +strings and updates the copyright year range. + +The patch was submitted to the ffado-devel mailing list. + + +Index: support/mixer-qt4/ffado/ffadowindow.py +=================================================================== +--- a/support/mixer-qt4/ffado/ffadowindow.py (revision 2725) ++++ b/support/mixer-qt4/ffado/ffadowindow.py (revision 2726) +@@ -22,6 +22,8 @@ + # along with this program. If not, see . + # + ++import ctypes ++import datetime + import os + + from ffado.config import * +@@ -92,7 +94,8 @@ + self.menuTheme[theme].setCheckable(True) + + if (ffado_python3 and (self.style().objectName().lower() == theme.lower()) or +- not(ffado_python3) and (self.style().objectName().toLower() == theme.toLower())): ++ not(ffado_python3) and (self.style().objectName().toLower() == theme.toLower() if ffado_pyqt_version == 4 else ++ self.style().objectName().lower() == theme.lower())): + self.menuTheme[theme].setDisabled(True) + self.menuTheme[theme].setChecked(True) + self.menuTheme[theme].triggered.connect(self.switchTheme ) +@@ -174,9 +177,11 @@ + QMessageBox.about( self, "About FFADO", """ +

ffado.org

+ ++

{ffado_version}

++ +

FFADO is the new approach to have firewire audio on linux.

+ +-

© 2006-2014 by the FFADO developers
ffado is licensed under the GPLv3, for the full license text see www.gnu.org/licenses or the LICENSE.* files shipped with ffado.

++

© 2006-2018 by the FFADO developers
ffado is licensed under the GPLv3, for the full license text see www.gnu.org/licenses or the LICENSE.* files shipped with ffado.

+ +

FFADO developers are:

+-""" ) ++ """.format(ffado_version=get_ffado_version(), thisyear=datetime.datetime.now().year)) + ++def get_ffado_version(): ++ try: ++ # call the C function ffado_get_version() to figure out the version ++ lib = ctypes.cdll.LoadLibrary('libffado.so') ++ func = ctypes.CFUNCTYPE(ctypes.c_char_p) ++ ffado_get_version = func(('ffado_get_version', lib)) ++ return ffado_get_version() ++ except: ++ return "libffado" + + def get_lock(process_name): + import socket +@@ -252,6 +266,7 @@ + logging.getLogger('global').setLevel(debug_level) + + log = logging.getLogger('main') ++ log.debug("Using %s with Qt: %s PyQt: %s" % (get_ffado_version(), QtCore.QT_VERSION_STR, QtCore.PYQT_VERSION_STR)) + + app = QApplication(args) + app.setWindowIcon( QIcon( SHAREDIR + "/icons/hi64-apps-ffado.png" ) ) +Index: support/mixer-qt4/ffado/logginghandler.py +=================================================================== +--- a/support/mixer-qt4/ffado/logginghandler.py (revision 2725) ++++ b/support/mixer-qt4/ffado/logginghandler.py (revision 2726) +@@ -28,7 +28,7 @@ + log = logging.getLogger('logginghandler') + + class QStatusLogger( QObject, logging.Handler ): +- log = pyqtSignal(QString, int, name='log') ++ log = pyqtSignal(QString if ffado_pyqt_version == 4 else str, int, name='log') + def __init__( self, parent, statusbar, level=logging.NOTSET ): + QObject.__init__( self, parent ) + logging.Handler.__init__( self, level ) +Index: support/mixer-qt4/ffado/panelmanager.py +=================================================================== +--- a/support/mixer-qt4/ffado/panelmanager.py (revision 2725) ++++ b/support/mixer-qt4/ffado/panelmanager.py (revision 2726) +@@ -378,7 +378,7 @@ + action = self.sender() + # Extract the action data and store as a dbus.String type so + # it is usable as a key into self.panels[]. +- panel_key = dbus.String(action.data().toString()) ++ panel_key = dbus.String(action.data().toString() if ffado_pyqt_version == 4 else action.data()) + self.tabs.setCurrentIndex(self.tabs.indexOf(self.panels[panel_key])) + + def displayPanels(self): +@@ -515,6 +515,8 @@ + saveString.append('\n') + # file saving + savefilename = QFileDialog.getSaveFileName(self, 'Save File', os.getenv('HOME')) ++ if isinstance(savefilename, tuple): # newer PyQt5 ++ savefilename = savefilename[0] + try: + f = open(savefilename, 'w') + except IOError: +@@ -526,6 +528,8 @@ + + def readSettings(self): + readfilename = QFileDialog.getOpenFileName(self, 'Open File', os.getenv('HOME')) ++ if isinstance(readfilename, tuple): # newer PyQt5 ++ readfilename = readfilename[0] + try: + f = open(readfilename, 'r') + except IOError: +Index: support/mixer-qt4/ffado/widgets/crossbarrouter.py +=================================================================== +--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py (revision 2725) ++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py (revision 2726) +@@ -168,7 +168,10 @@ + self.timer.setInterval(200) + self.timer.timeout.connect(self.updateLevels) + +- self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False).toBool()) ++ if ffado_pyqt_version == 4: ++ self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False).toBool()) ++ else: ++ self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False) == u'true') + + def __del__(self): + print( "CrossbarRouter.__del__()" ) +Index: support/mixer-qt4/ffado/widgets/matrixmixer.py +=================================================================== +--- a/support/mixer-qt4/ffado/widgets/matrixmixer.py (revision 2725) ++++ b/support/mixer-qt4/ffado/widgets/matrixmixer.py (revision 2726) +@@ -200,7 +200,7 @@ + + def mousePressEvent(self, ev): + if ev.buttons() & Qt.LeftButton: +- self.pos = ev.posF() ++ self.pos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos() + self.tmpvalue = self.value() + ev.accept() + #log.debug("MixerNode.mousePressEvent() %s" % str(self.pos)) +@@ -207,7 +207,7 @@ + + def mouseMoveEvent(self, ev): + if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0): +- newpos = ev.posF() ++ newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos() + change = newpos.y() - self.pos.y() + #log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change))) + self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) ) +@@ -215,7 +215,7 @@ + + def mouseReleaseEvent(self, ev): + if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0): +- newpos = ev.posF() ++ newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos() + change = newpos.y() - self.pos.y() + #log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change))) + self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) ) +@@ -257,19 +257,19 @@ + if v == 0: + symb_inf = u"\u221E" + text = "-" + symb_inf + " dB" +- if ffado_python3: ++ if ffado_python3 or ffado_pyqt_version == 5: + # Python3 uses native python UTF strings rather than QString. + # This therefore appears to be the correct way to display this + # UTF8 string, but testing may prove otherwise. + p.drawText(rect, Qt.AlignCenter, text) + else: +- p.drawText(rect, Qt.AlignCenter, QtCore.QString.fromUtf8(text)) ++ p.drawText(rect, Qt.AlignCenter, QString.fromUtf8(text)) + if (self.inv_action!=None and self.inv_action.isChecked()): +- if ffado_python3: ++ if ffado_python3 or ffado_pyqt_version == 5: + # Refer to the comment about about Python UTF8 strings. + p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, " ϕ") + else: +- p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, QtCore.QString.fromUtf8(" ϕ")) ++ p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, QString.fromUtf8(" ϕ")) + + def internalValueChanged(self, value): + #log.debug("MixerNode.internalValueChanged( %i )" % value) + +------------------------------------------------------------------------ diff --git a/hardware/firewire/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch b/hardware/firewire/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch new file mode 100644 index 0000000000..9064a59a6b --- /dev/null +++ b/hardware/firewire/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch @@ -0,0 +1,30 @@ +------------------------------------------------------------------------ +r2725 | jwoithe | 2018-01-05 18:40:19 +0900 (Fri, 05 Jan 2018) | 11 lines + +SCons: fix detection of dbus on PyQt5 systems. + +The detection of the dbus python modules was qualified on the presence of +pyuic4. On systems with only PyQt5 this would obviously fail. Patch from +Orcan Ogetbil via the ffado-devel mailing list. + +r2724 inadvertently included a change to SConstruct to import sys. This is +needed since sys.stdout is referenced in some situations (in particular, if +jack is not installed in the build environment). This patch was also from +Orcan Ogetbil, via the ffado-devel mailing list. + + +Index: SConstruct +=================================================================== +--- a/SConstruct (revision 2724) ++++ b/SConstruct (revision 2725) +@@ -396,7 +396,7 @@ + + # PyQT checks + if env['BUILD_MIXER'] != 'false': +- have_dbus = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' )) ++ have_dbus = ((conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' )) or (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'dbus.mainloop.pyqt5' ))) + have_pyqt4 = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'PyQt4' )) + have_pyqt5 = (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'PyQt5' )) + if ((have_pyqt4 or have_pyqt5) and have_dbus): + +------------------------------------------------------------------------ diff --git a/hardware/firewire/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch b/hardware/firewire/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch new file mode 100644 index 0000000000..8e0158a03c --- /dev/null +++ b/hardware/firewire/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch @@ -0,0 +1,50 @@ +------------------------------------------------------------------------ +r2724 | jwoithe | 2018-01-05 18:33:39 +0900 (Fri, 05 Jan 2018) | 8 lines + +RME: ensure byte swap macros are available for all components. + +The byte swap macros (ByteSwap32() in particular) are required on big-endian +architectures for more than just the rme_avdevice module. Including these +in the RME device header file is a reasonable way to fix this. + +Patch from Orcan Ogetbil via the ffado-devel mailing list. + + +Index: SConstruct +=================================================================== +--- a/SConstruct (revision 2723) ++++ b/SConstruct (revision 2724) +@@ -29,6 +29,7 @@ + from subprocess import Popen, PIPE + import os + import re ++import sys + from string import Template + import imp + import distutils.sysconfig +Index: src/rme/rme_avdevice.cpp +=================================================================== +--- a/src/rme/rme_avdevice.cpp (revision 2723) ++++ b/src/rme/rme_avdevice.cpp (revision 2724) +@@ -42,7 +42,6 @@ + #include + #include + #include +-#include "libutil/ByteSwap.h" + + #include + #include +Index: src/rme/rme_avdevice.h +=================================================================== +--- a/src/rme/rme_avdevice.h (revision 2723) ++++ b/src/rme/rme_avdevice.h (revision 2724) +@@ -31,6 +31,7 @@ + #include "libavc/avc_definitions.h" + + #include "libutil/Configuration.h" ++#include "libutil/ByteSwap.h" + + #include "fireface_def.h" + #include "libstreaming/rme/RmeReceiveStreamProcessor.h" + +------------------------------------------------------------------------ diff --git a/hardware/firewire/libffado/pspec.xml b/hardware/firewire/libffado/pspec.xml index 1b359fc2b1..d84d4970d6 100644 --- a/hardware/firewire/libffado/pspec.xml +++ b/hardware/firewire/libffado/pspec.xml @@ -12,7 +12,7 @@ GPLv3 Free firewire audio drivers libffado tries to provide open-source drivers for all FireWire based pro-audio devices. - http://www.ffado.org/files/libffado-2.3.0.tgz + http://www.ffado.org/files/libffado-2.4.0.tgz xdg-utils glibmm-devel @@ -25,13 +25,19 @@ libiec61883-devel scons doxygen + dbus-python + dbus-python3 + python-qt5-devel + python3-qt5-devel + jack-audio-connection-kit-devel - libffado-api-doc-only.patch - libffado-libconfig145.patch flags.patch - gcc6.patch - libxml++3.patch + libffado-2.4.0-rme-bigendian-fix.patch + libffado-2.4.0-pyqt5-dbus-detection.patch + libffado-2.4.0-py3-pyqt5-fixes.patch + libffado-2.4.0-additional-py3-fixes.patch + libffado-2.4.0-crossbar-router-fix.patch @@ -52,6 +58,7 @@ /usr/bin + /etc/dbus-1 /usr/lib /usr/share/locale /lib/udev/rules.d @@ -100,6 +107,13 @@ + + 2018-02-22 + 2.4.0 + Version Bump. + Pisi Linux Community + admin@pisilinux.org + 2017-02-17 2.3.0