libffado-2.4.2/ 0000755 0001750 0000144 00000000000 13541343164 012661 5 ustar jwoithe users libffado-2.4.2/SConstruct 0000644 0001750 0000144 00000115341 13541342741 014720 0 ustar jwoithe users # -*- coding: utf-8 -*-
#
# Copyright (C) 2007, 2008, 2010 Arnold Krille
# Copyright (C) 2007, 2008 Pieter Palmers
# Copyright (C) 2008, 2012 Jonathan Woithe
#
# 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 .
#
from __future__ import print_function
FFADO_API_VERSION = "9"
FFADO_VERSION="2.4.2"
from subprocess import Popen, PIPE, check_output
import os
import re
import sys
from string import Template
import distutils.sysconfig
if not os.path.isdir( "cache" ):
os.makedirs( "cache" )
opts = Variables( "cache/options.cache" )
opts.AddVariables(
BoolVariable( "DEBUG", """\
Build with \"-g -Wall\" rather than \"-O2\", and include extra debugging
checks in the code.""", True ),
BoolVariable( "DEBUG_MESSAGES", "Enable support for debug messages", True ),
BoolVariable( "PROFILE", "Build with symbols, warnings and other profiling info", False ),
PathVariable( "PREFIX", "The prefix where ffado will be installed to.", "/usr/local", PathVariable.PathAccept ),
PathVariable( "BINDIR", "Overwrite the directory where apps are installed to.", "$PREFIX/bin", PathVariable.PathAccept ),
PathVariable( "LIBDIR", "Overwrite the directory where libs are installed to.", "$PREFIX/lib", PathVariable.PathAccept ),
PathVariable( "INCLUDEDIR", "Overwrite the directory where headers are installed to.", "$PREFIX/include", PathVariable.PathAccept ),
PathVariable( "SHAREDIR", "Overwrite the directory where misc shared files are installed to.", "$PREFIX/share/libffado", PathVariable.PathAccept ),
PathVariable( "LIBDATADIR", "Location for architecture-dependent data.", "$LIBDIR/libffado", PathVariable.PathAccept ),
PathVariable( "MANDIR", "Overwrite the directory where manpages are installed", "$PREFIX/man", PathVariable.PathAccept ),
PathVariable( "PYPKGDIR", "The directory where the python modules get installed.",
distutils.sysconfig.get_python_lib( prefix="$PREFIX" ), PathVariable.PathAccept ),
PathVariable( "UDEVDIR", "Overwrite the directory where udev rules are installed to.", "/lib/udev/rules.d/", PathVariable.PathAccept ),
BoolVariable( "ENABLE_BEBOB", "Enable/Disable support for the BeBoB platform.", True ),
BoolVariable( "ENABLE_FIREWORKS", "Enable/Disable support for the ECHO Audio FireWorks platform.", True ),
BoolVariable( "ENABLE_OXFORD", "Enable/Disable support for the Oxford Semiconductor FW platform.", True ),
BoolVariable( "ENABLE_MOTU", "Enable/Disable support for the MOTU platform.", True ),
BoolVariable( "ENABLE_DICE", "Enable/Disable support for the TCAT DICE platform.", True ),
BoolVariable( "ENABLE_METRIC_HALO", "Enable/Disable support for the Metric Halo platform.", False ),
BoolVariable( "ENABLE_RME", "Enable/Disable support for the RME platform.", True ),
BoolVariable( "ENABLE_DIGIDESIGN", "Enable/Disable support for Digidesign interfaces.", False ),
BoolVariable( "ENABLE_BOUNCE", "Enable/Disable the BOUNCE device.", False ),
BoolVariable( "ENABLE_GENERICAVC", """\
Enable/Disable the the generic avc part (mainly used by apple).
Note that disabling this option might be overwritten by other devices needing
this code.""", False ),
BoolVariable( "ENABLE_ALL", "Enable/Disable support for all devices.", False ),
BoolVariable( "SERIALIZE_USE_EXPAT", "Use libexpat for XML serialization.", False ),
EnumVariable( "BUILD_DOC", "Build API documentation", 'none', allowed_values=('all', 'user', 'none'), ignorecase=2),
EnumVariable( "BUILD_MIXER", "Build the ffado-mixer", 'auto', allowed_values=('auto', 'true', 'false'), ignorecase=2),
BoolVariable( "BUILD_TESTS", """\
Build the tests in their directory. As some contain quite some functionality,
this is on by default.
If you just want to use ffado with jack without the tools, you can disable this.\
""", True ),
BoolVariable( "BUILD_STATIC_TOOLS", "Build a statically linked version of the FFADO tools.", False ),
EnumVariable('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'powerpc64', 'none' ), ignorecase=2),
BoolVariable( "ENABLE_OPTIMIZATIONS", "Enable optimizations and the use of processor specific extentions (MMX/SSE/...).", False ),
BoolVariable( "DETECT_USERSPACE_ENV", "Try to detect the user space environment and add necessary 32/64 bit machine flags.", True ),
BoolVariable( "PEDANTIC", "Enable -Werror and more pedantic options during compile.", False ),
BoolVariable( "CUSTOM_ENV", "Respect CC, CXX, CFLAGS, CXXFLAGS and LDFLAGS.\nOnly meant for distributors and gentoo-users who want to over-optimize their build.\n Using this is not supported by the ffado-devs!", False ),
( "COMPILE_FLAGS", "Deprecated (use CFLAGS and CXXFLAGS with CUSTOM_ENV=True instead). Add additional flags to the environment.\nOnly meant for distributors and gentoo-users who want to over-optimize their build.\n Using this is not supported by the ffado-devs!" ),
EnumVariable( "ENABLE_SETBUFFERSIZE_API_VER", "Report API version at runtime which includes support for dynamic buffer resizing (requires recent jack).", 'auto', allowed_values=('auto', 'true', 'false', 'force'), ignorecase=2),
("PYTHON_INTERPRETER", "Python interpreter to be used by FFADO installation.", "/usr/bin/python"),
)
## Load the builders in config
buildenv=os.environ
env = Environment( tools=['default','scanreplace','pyuic','pyuic4','pyuic5','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts )
custom_flags = False
if 'COMPILE_FLAGS' in env and len(env['COMPILE_FLAGS']) > 0:
print("The COMPILE_FLAGS option is deprecated. Use CFLAGS and CXXFLAGS with CUSTOM_ENV=True instead")
custom_flags = True
env.MergeFlags(env['COMPILE_FLAGS'])
if env['CUSTOM_ENV']:
custom_flags = True
# Honour the user choice of compiler (if any).
if 'CC' in os.environ and len(os.environ['CC']) > 0:
env['CC'] = os.environ['CC']
if 'CXX' in os.environ and len(os.environ['CXX']) > 0:
env['CXX'] = os.environ['CXX']
# Honour the user supplied flags (if any), but notify the user that this is not supported.
if 'CFLAGS' in os.environ and len(os.environ['CFLAGS']) > 0:
env.Append(CFLAGS = str(os.environ['CFLAGS'].replace('\"', '')))
if 'CXXFLAGS' in os.environ and len(os.environ['CXXFLAGS']) > 0:
env.Append(CXXFLAGS = str(os.environ['CXXFLAGS'].replace('\"', '')))
if 'LDFLAGS' in os.environ and len(os.environ['LDFLAGS']) > 0:
env.Append(LINKFLAGS = str(os.environ['LDFLAGS'].replace('\"', '')))
if custom_flags:
print('''
* Usage of additional flags is not supported by the ffado-devs.
* Use at own risk!
*
* Flags in use:
* CC = %s
* CXX = %s
* CFLAGS = %s
* CXXFLAGS = %s
* LDFLAGS = %s
''' % (env['CC'], env['CXX'], env['CFLAGS'], env['CXXFLAGS'], env['LINKFLAGS']))
Help( """
For building ffado you can set different options as listed below. You have to
specify them only once, scons will save the last value you used and re-use
that.
To really undo your settings and return to the factory defaults, remove the
"cache"-folder and the file ".sconsign.dblite" from this directory.
For example with: "rm -Rf .sconsign.dblite cache"
Note that this is a development version! Don't complain if its not working!
See www.ffado.org for stable releases.
""" )
Help( opts.GenerateHelpText( env ) )
# make sure the necessary dirs exist
if not os.path.isdir( "cache" ):
os.makedirs( "cache" )
if not os.path.isdir( 'cache/objects' ):
os.makedirs( 'cache/objects' )
CacheDir( 'cache/objects' )
opts.Save( 'cache/options.cache', env )
def ConfigGuess( context ):
context.Message( "Trying to find the system triple: " )
ret = check_output(("/bin/sh", "admin/config.guess")).rstrip()
context.Result( ret )
return ret.decode()
def CheckForApp( context, app ):
context.Message( "Checking whether '" + app + "' executes " )
ret = context.TryAction( app )
context.Result( ret[0] )
return ret[0]
def CheckForPyModule( context, module ):
context.Message( "Checking for the python module '" + module + "' " )
ret = context.TryAction( "$PYTHON_INTERPRETER $SOURCE", "import %s" % module, ".py" )
context.Result( ret[0] )
return ret[0]
def CompilerCheck( context ):
context.Message( "Checking for a working C-compiler " )
ret = context.TryRun( """
#include
int main() {
printf( "Hello World!" );
return 0;
}""", '.c' )[0]
context.Result( ret )
if ret == 0:
return False;
context.Message( "Checking for a working C++-compiler " )
ret = context.TryRun( """
#include
int main() {
std::cout << "Hello World!" << std::endl;
return 0;
}""", ".cpp" )[0]
context.Result( ret )
return ret
def CheckPKG(context, name):
context.Message( 'Checking for %s... ' % name )
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
context.Result( ret )
return ret
tests = {
"ConfigGuess" : ConfigGuess,
"CheckForApp" : CheckForApp,
"CheckForPyModule": CheckForPyModule,
"CompilerCheck" : CompilerCheck,
"CheckPKG" : CheckPKG,
}
tests.update( env['PKGCONFIG_TESTS'] )
tests.update( env['PYUIC_TESTS'] )
tests.update( env['PYUIC4_TESTS'] )
conf = Configure( env,
custom_tests = tests,
conf_dir = "cache/",
log_file = 'cache/config.log' )
version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)')
def CheckJackdVer():
print('Checking jackd version...', end='')
popen = Popen(("which", 'jackd'), stdout=PIPE, stderr=PIPE)
stdout, stderr = popen.communicate()
assert popen.returncode in (0, 1), "which returned a unexpected status"
if popen.returncode == 1:
print("not installed")
return None
jackd = stdout.decode ().rstrip ()
ret = check_output ((jackd, '--version')).decode() .rstrip ()
ret = ret.split ('\n') [-1]; # Last line.
ret = ret.split () [2]; # Third field.
if not version_re.match (ret):
print("failed to parse version")
return None
print (ret)
# Trim off any "rc" (release candidate) components from the end of the
# version string
ret = ret.split ('rc')[0]
ret = ret.split ('.')
ret = map (int, ret)
return tuple (ret)
if env['SERIALIZE_USE_EXPAT']:
env['SERIALIZE_USE_EXPAT']=1
else:
env['SERIALIZE_USE_EXPAT']=0
if env['ENABLE_BOUNCE'] or env['ENABLE_ALL']:
env['REQUIRE_LIBAVC']=1
else:
env['REQUIRE_LIBAVC']=0
if not env.GetOption('clean'):
#
# Check for working gcc and g++ compilers and their environment.
#
if not conf.CompilerCheck():
print("\nIt seems as if your system isn't even able to compile any C-/C++-programs. Probably you don't have gcc and g++ installed. Compiling a package from source without a working compiler is very hard to do, please install the needed packages.\nHint: on *ubuntu you need both gcc- and g++-packages installed, easiest solution is to install build-essential which depends on gcc and g++.")
Exit( 1 )
# Check for pkg-config before using pkg-config to check for other dependencies.
if not conf.CheckForPKGConfig():
print("\nThe program 'pkg-config' could not be found.\nEither you have to install the corresponding package first or make sure that PATH points to the right directions.")
Exit( 1 )
#
# The following checks are for headers and libs and packages we need.
#
allpresent = 1;
# for cache-serialization.
if env['SERIALIZE_USE_EXPAT']:
allpresent &= conf.CheckHeader( "expat.h" )
allpresent &= conf.CheckLib( 'expat', 'XML_ExpatVersion', '#include ' )
pkgs = {
'libraw1394' : '2.0.5',
'libiec61883' : '1.1.0',
'libconfig++' : '0'
}
if env['REQUIRE_LIBAVC']:
pkgs['libavc1394'] = '0.5.3'
if not env['SERIALIZE_USE_EXPAT']:
if conf.CheckPKG('libxml++-3.0'):
pkgs['libxml++-3.0'] = '3.0.0'
if not('libxml++-3.0' in pkgs):
pkgs['libxml++-2.6'] = '2.13.0'
# Provide a way for users to compile newer libffado which will work
# against older jack installations which will not accept the new API
# version reported at runtime.
have_jack = conf.CheckPKG('jack')
if have_jack:
good_jack1 = conf.CheckPKG('jack < 1.9.0') and conf.CheckPKG('jack >= 0.121.4')
good_jack2 = conf.CheckPKG('jack >= 1.9.9')
else:
jackd_ver = CheckJackdVer()
if jackd_ver:
# If jackd is unknown to pkg-config but is never-the-less
# runnable, use the version number reported by it. This means
# users don't have to have jack development files present on
# their system for this to work.
have_jack = jackd_ver >= (0, 0, 0)
good_jack1 = jackd_ver < (1, 9, 0) and jackd_ver >= (0, 121, 4)
good_jack2 = jackd_ver >= (1, 9, 9)
if env['ENABLE_SETBUFFERSIZE_API_VER'] == 'auto':
if not(have_jack):
print("""
No Jack Audio Connection Kit (JACK) installed: assuming a FFADO
setbuffersize-compatible version will be used.
""")
elif not(good_jack1 or good_jack2):
FFADO_API_VERSION="8"
print("""
Installed Jack Audio Connection Kit (JACK) jack does not support FFADO
setbuffersize API: will report earlier API version at runtime. Consider
upgrading to jack1 >=0.122.0 or jack2 >=1.9.9 at some point, and then
recompile ffado to gain access to this added feature.
""")
else:
print("Installed Jack Audio Connection Kit (JACK) supports FFADO setbuffersize API")
elif env['ENABLE_SETBUFFERSIZE_API_VER'] == 'true':
if (have_jack and not(good_jack1) and not(good_jack2)):
print("""
SetBufferSize API version is enabled but no suitable version of Jack Audio
Connection Kit (JACK) has been found. The resulting FFADO would cause your
jackd to abort with "incompatible FFADO version". Please upgrade to
jack1 >=0.122.0 or jack2 >=1.9.9, or set ENABLE_SETBUFFERSIZE_API_VER to "auto"
or "false".
""")
# Although it's not strictly an error, in almost every case that
# this occurs the user will want to know about it and fix the
# problem, so we exit so they're guaranteed of seeing the above
# message.
Exit( 1 )
else:
print("Will report SetBufferSize API version at runtime")
elif env['ENABLE_SETBUFFERSIZE_API_VER'] == 'force':
print("Will report SetBufferSize API version at runtime")
else:
FFADO_API_VERSION="8"
print("Will not report SetBufferSize API version at runtime")
for pkg in pkgs:
name2 = pkg.replace("+","").replace(".","").replace("-","").upper()
env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, pkgs[pkg] )
#print('%s_FLAGS' % name2)
if env['%s_FLAGS'%name2] == 0:
allpresent &= 0
if not allpresent:
print("""
(At least) One of the dependencies is missing. I can't go on without it, please
install the needed packages for each of the lines saying "no".
(Remember to also install the *-devel packages!)
And remember to remove the cache with "rm -Rf .sconsign.dblite cache" so the
results above get rechecked.
""")
Exit( 1 )
# libxml++-2.6 requires a c++11 compiler as of version 2.39.1. The
# gnu++11 standard seems to work both with these later libxml++ versions
# and ffado itself, although a significant number of warnings are
# produced. Add the necessary option to CXXFLAGS if required.
if conf.CheckPKG('libxml++-2.6 >= 2.39.1'):
env.Append(CXXFLAGS = '-std=gnu++11')
if conf.CheckPKG('libxml++-3.0 >= 3.0.0'):
env.Append(CXXFLAGS = '-std=gnu++11')
# Check for C99 lrint() and lrintf() functions used to convert from
# float to integer more efficiently via float_cast.h. If not
# present the standard slower methods will be used instead. This
# might not be the best way of testing for these but it's the only
# way which seems to work properly. CheckFunc() fails due to
# argument count problems.
if 'CFLAGS' in env:
oldcf = env['CFLAGS']
else:
oldcf = ""
env.Append(CFLAGS = '-std=c99')
if conf.CheckLibWithHeader( "m", "math.h", "c", "lrint(3.2);" ):
HAVE_LRINT = 1
else:
HAVE_LRINT = 0
if conf.CheckLibWithHeader( "m", "math.h", "c", "lrintf(3.2);" ):
HAVE_LRINTF = 1
else:
HAVE_LRINTF = 0
env['HAVE_LRINT'] = HAVE_LRINT;
env['HAVE_LRINTF'] = HAVE_LRINTF;
env.Replace(CFLAGS=oldcf)
#
# Optional checks follow:
#
# PyQT checks
if env['BUILD_MIXER'] != 'false':
if ( conf.CheckForApp( 'which pyuic4' ) \
and conf.CheckForPyModule( 'PyQt4' ) \
and conf.CheckForPyModule( 'dbus.mainloop.qt' )) \
or ( conf.CheckForApp( 'which pyuic5' ) \
and conf.CheckForPyModule( 'PyQt5' ) \
and conf.CheckForPyModule( 'dbus.mainloop.pyqt5' )):
env['BUILD_MIXER'] = 'true'
elif not env.GetOption('clean'):
if env['BUILD_MIXER'] == 'auto':
env['BUILD_MIXER'] = 'false'
print("""
The prerequisites ('pyuic4'/'pyuic5' and the python-modules 'dbus' and
'PyQt4'/'PyQt5', the packages could be named like dbus-python and PyQt) to
build the mixer were not found. Therefore the qt mixer will not be installed.""")
else: # env['BUILD_MIXER'] == 'true'
print("""
The prerequisites ('pyuic4'/'pyuic5' and the python-modules 'dbus' and
'PyQt4'/'PyQt5', the packages could be named like dbus-python and PyQt) to
build the mixer were not found, but BUILD_MIXER was requested.""")
Exit( 1 )
env['XDG_TOOLS'] = False
if env['BUILD_MIXER'] == 'true':
if conf.CheckForApp( 'xdg-desktop-menu --help' ) and conf.CheckForApp( 'xdg-icon-resource --help' ):
env['XDG_TOOLS'] = True
else:
print("""
I couldn't find the 'xdg-desktop-menu' and 'xdg-icon-resource' programs. These
are needed to add the fancy entry for the mixer to your menu, but you can still
start it by executing "ffado-mixer".""")
#
# Optional pkg-config
#
pkgs = {
'alsa': '0',
'dbus-1': '1.0',
'dbus-c++-1' : '0',
}
for pkg in pkgs:
name2 = pkg.replace("+","").replace(".","").replace("-","").upper()
env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, pkgs[pkg] )
if not env['DBUS1_FLAGS'] or not env['DBUSC1_FLAGS'] or not conf.CheckForApp('which dbusxx-xml2cpp'):
env['DBUS1_FLAGS'] = b""
env['DBUSC1_FLAGS'] = b""
print("""
One of the dbus-headers, the dbus-c++-headers and/or the application
'dbusxx-xml2cpp' where not found. The dbus-server for ffado will therefore not
be built.
""")
else:
# Get the directory where dbus stores the service-files
env['dbus_service_dir'] = conf.GetPKGVariable( 'dbus-1', 'session_bus_services_dir' ).strip()
# this is required to indicate that the DBUS version we use has support
# for platform dependent threading init functions
# this is true for DBUS >= 0.96 or so. Since we require >= 1.0 it is
# always true
env['DBUS1_FLAGS'] += b" -DDBUS_HAS_THREADS_INIT_DEFAULT"
# The controlserver-glue.h file generated by dbusxx-xml2cpp generates
# a large number of instances where call.reader()'s return value is
# stored (in ri) but not used. This generates a compiler warning which
# we can do nothing about. Therefore when compiling dbus-related
# code, suppress the "set but not used" warning.
env['DBUS1_FLAGS'] += b" -Wno-unused-but-set-variable"
config_guess = conf.ConfigGuess()
env = conf.Finish()
if env['DEBUG']:
print("Doing a debug build")
env.MergeFlags( "-Wall -g -DDEBUG" )
env['DEBUG_MESSAGES'] = True
elif not custom_flags:
# Only merge -O2 to flags if the user has not specified custom flags.
env.MergeFlags( "-O2" )
if env['DEBUG_MESSAGES']:
env.MergeFlags( "-DDEBUG_MESSAGES" )
if env['PROFILE']:
print("Doing a PROFILE build")
env.MergeFlags( "-Wall -g" )
if env['PEDANTIC']:
env.MergeFlags( "-Werror" )
if env['ENABLE_ALL']:
env['ENABLE_BEBOB'] = True
env['ENABLE_FIREWORKS'] = True
env['ENABLE_OXFORD'] = True
env['ENABLE_MOTU'] = True
env['ENABLE_DICE'] = True
env['ENABLE_METRIC_HALO'] = True
env['ENABLE_RME'] = True
env['ENABLE_DIGIDESIGN'] = True
env['ENABLE_BOUNCE'] = True
env['BUILD_STATIC_LIB'] = False
if env['BUILD_STATIC_TOOLS']:
print("Building static versions of the tools...")
env['BUILD_STATIC_LIB'] = True
env['build_base']="#/"
#
# Get the DESTDIR (if wanted) from the commandline
#
env.destdir = ARGUMENTS.get( 'DESTDIR', "" )
#
# Uppercase variables are for usage in code, lowercase versions for usage in
# scons-files for installing.
#
env['BINDIR'] = Template( env['BINDIR'] ).safe_substitute( env )
env['LIBDIR'] = Template( env['LIBDIR'] ).safe_substitute( env )
env['INCLUDEDIR'] = Template( env['INCLUDEDIR'] ).safe_substitute( env )
env['SHAREDIR'] = Template( env['SHAREDIR'] ).safe_substitute( env )
env['LIBDATADIR'] = Template( env['LIBDATADIR'] ).safe_substitute( env )
env['UDEVDIR'] = Template( env['UDEVDIR'] ).safe_substitute( env )
env['PYTHON_INTERPRETER'] = Template( env['PYTHON_INTERPRETER'] ).safe_substitute( env )
env['prefix'] = Template( env.destdir + env['PREFIX'] ).safe_substitute( env )
env['bindir'] = Template( env.destdir + env['BINDIR'] ).safe_substitute( env )
env['libdir'] = Template( env.destdir + env['LIBDIR'] ).safe_substitute( env )
env['includedir'] = Template( env.destdir + env['INCLUDEDIR'] ).safe_substitute( env )
env['sharedir'] = Template( env.destdir + env['SHAREDIR'] ).safe_substitute( env )
env['libdatadir'] = Template( env.destdir + env['LIBDATADIR'] ).safe_substitute( env )
env['mandir'] = Template( env.destdir + env['MANDIR'] ).safe_substitute( env )
env['pypkgdir'] = Template( env.destdir + env['PYPKGDIR'] ).safe_substitute( env )
env['udevdir'] = Template( env.destdir + env['UDEVDIR'] ).safe_substitute( env )
env['PYPKGDIR'] = Template( env['PYPKGDIR'] ).safe_substitute( env )
env['metainfodir'] = Template( env.destdir + "/usr/share/metainfo" ).safe_substitute( env )
env.Command( target=env['sharedir'], source="", action=Mkdir( env['sharedir'] ) )
env.Alias( "install", env['libdir'] )
env.Alias( "install", env['includedir'] )
env.Alias( "install", env['sharedir'] )
env.Alias( "install", env['libdatadir'] )
env.Alias( "install", env['bindir'] )
env.Alias( "install", env['mandir'] )
if env['BUILD_MIXER'] == 'true':
env.Alias( "install", env['pypkgdir'] )
env.Alias( "install", env['metainfodir'] )
#
# shamelessly copied from the Ardour scons file
#
opt_flags = []
env['USE_SSE'] = 0
# guess at the platform, used to define compiler flags
config_cpu = 0
config_arch = 1
config_kernel = 2
config_os = 3
config = config_guess.split ("-")
needs_fPIC = False
#=== Begin Revised CXXFLAGS =========================================
def cpuinfo_kv():
"""generator which reads lines from Linux /proc/cpuinfo and splits them
into key:value tokens and yields (key, value) tuple.
"""
with open('/proc/cpuinfo', 'r') as f:
for line in f:
line = line.strip()
if line:
k,v = line.split(':', 1)
yield (k.strip(), v.strip())
class CpuInfo (object):
"""Collects information about the CPU, mainly from /proc/cpuinfo
"""
def __init__(self):
self.sysname, self.hostname, self.release, self.version, self.machine = os.uname()
# general CPU architecture
self.is_x86 = self.machine in ('i686', 'x86_64') or \
re.match("i[3-5]86", self.machine) or False
self.is_powerpc = self.machine in ('ppc64', 'ppc', 'powerpc', 'powerpc64', 'ppc64le')
#!!! probably not comprehensive
self.is_mips = self.machine == 'mips'
#!!! not a comprehensive list. uname -m on one android phone reports 'armv71'
# I have no other arm devices I can check
self.is_arm = self.machine in ('armv71', )
self.cpu_count = 0
if self.is_x86:
self.cpu_info_x86()
elif self.is_powerpc:
self.cpu_info_ppc()
elif self.is_mips:
self.cpu_info_mips()
# 64-bit (x86_64/AMD64/Intel64)
# Long Mode (x86-64: amd64, also known as Intel 64, i.e. 64-bit capable)
self.is_64bit = (self.is_x86 and 'lm' in self.x86_flags) or \
(self.is_powerpc and \
('970' in self.ppc_type or 'power8' in self.ppc_type.lower()))
# Hardware virtualization capable: vmx (Intel), svm (AMD, Hygon)
self.has_hwvirt = self.is_x86 and (
((self.is_amd or self.is_hygon) and
'svm' in self.x86_flags) or
(self.is_intel and 'vmx' in self.x86_flags))
# Physical Address Extensions (support for more than 4GB of RAM)
self.has_pae = self.is_x86 and 'pae' in self.x86_flags
def cpu_info_x86(self):
"parse /proc/cpuinfo for x86 kernels"
for k,v in cpuinfo_kv():
if k == 'processor':
self.cpu_count += 1
if self.cpu_count > 1:
# assume all CPUs are identical features, no need to
# parse all of them
continue
elif k == 'vendor_id': # AuthenticAMD, HygonGenuine, GenuineIntel
self.vendor_id = v
self.is_amd = v == 'AuthenticAMD'
self.is_hygon = v == 'HygonGenuine'
self.is_intel = v == 'GenuineIntel'
elif k == 'flags':
self.x86_flags = v.split()
elif k == 'model name':
self.model_name = v
elif k == 'cpu family':
self.cpu_family = v
elif k == 'model':
self.model = v
def cpu_info_ppc(self):
"parse /proc/cpuinfo for PowerPC kernels"
# http://en.wikipedia.org/wiki/List_of_PowerPC_processors
# PowerPC 7xx family
# PowerPC 740 and 750, 233-366 MHz
# 745/755, 300–466 MHz
# PowerPC G4 series
# 7400/7410 350 - 550 MHz, uses AltiVec, a SIMD extension of the original PPC specs
# 7450 micro-architecture family up to 1.5 GHz and 256 kB on-chip L2 cache and improved Altivec
# 7447/7457 micro-architecture family up to 1.8 GHz with 512 kB on-chip L2 cache
# 7448 micro-architecture family (1.5 GHz) in 90 nm with 1MB L2 cache and slightly
# improved AltiVec (out of order instructions).
# 8640/8641/8640D/8641D with one or two e600 (Formerly known as G4) cores, 1MB L2 cache
# PowerPC G5 series
# 970 (2003), 64-bit, derived from POWER4, enhanced with VMX, 512 kB L2 cache, 1.4 – 2 GHz
# 970FX (2004), manufactured at 90 nm, 1.8 - 2.7 GHz
# 970GX (2006), manufactured at 90 nm, 1MB L2 cache/core, 1.2 - 2.5 GHz
# 970MP (2005), dual core, 1 MB L2 cache/core, 1.6 - 2.5 GHz
for k,v in cpuinfo_kv():
if k == 'processor':
self.cpu_count += 1
elif k == 'cpu':
self.is_altivec_supported = 'altivec' in v
if ',' in v:
ppc_type, x = v.split(',')
else:
ppc_type = v
self.ppc_type = ppc_type.strip()
# older kernels might not have a 'processor' line
if self.cpu_count == 0:
self.cpu_count += 1
def cpu_info_mips(self):
"parse /proc/cpuinfo for MIPS kernels"
for k,v in cpuinfo_kv():
if k == 'processor':
self.cpu_count += 1
elif k == 'cpu model':
self.mips_cpu_model = v
def is_userspace_32bit(cpuinfo):
"""Even if `uname -m` reports a 64-bit architecture, userspace could still
be 32-bit, such as Debian on powerpc64. This function tries to figure out
if userspace is 32-bit, i.e. we might need to pass '-m32' or '-m64' to gcc.
"""
if not cpuinfo.is_64bit:
return True
# note that having a 64-bit CPU means nothing for these purposes. You could
# run a completely 32-bit system on a 64-bit capable CPU.
answer = None
# If setting DIST_TARGET to i686 on a 64-bit CPU to facilitate
# compilation of a multilib environment, force 32-bit.
if env['DIST_TARGET'] == 'i686':
return True
# Debian ppc64 returns machine 'ppc64', but userspace might be 32-bit
# We'll make an educated guess by examining a known executable
exe = '/bin/mount'
if os.path.isfile(exe):
#print('Found %s' % exe)
if os.path.islink(exe):
real_exe = os.path.join(os.path.dirname(exe), os.readlink(exe))
#print('%s is a symlink to %s' % (exe, real_exe))
else:
real_exe = exe
# presumably if a person is running this script, they should have
# a gcc toolchain installed...
x = check_output(('objdump', '-Wi', real_exe)).decode()
# should emit a line that looks like this:
# /bin/mount: file format elf32-i386
# or like this:
# /bin/mount: file format elf64-x86-64
# or like this:
# /bin/mount: file format elf32-powerpc
for line in x.split('\n'):
line = line.strip()
if line.startswith(real_exe):
x, fmt = line.rsplit(None, 1)
answer = 'elf32' in fmt
break
else:
print('!!! Not found %s' % exe)
return answer
def cc_flags_x86(cpuinfo, enable_optimizations):
"""add certain gcc -m flags based on CPU features
"""
# See http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/i386-and-x86_002d64-Options.html
cc_opts = []
if cpuinfo.machine == 'i586':
cc_opts.append('-march=i586')
elif cpuinfo.machine == 'i686':
cc_opts.append('-march=i686')
if 'mmx' in cpuinfo.x86_flags:
cc_opts.append('-mmmx')
# map from proc/cpuinfo flags to gcc options
opt_flags = [
('sse', ('-mfpmath=sse', '-msse')),
('sse2', '-msse2'),
('ssse3', '-mssse3'),
('sse4', '-msse4'),
('sse4_1', '-msse4.1'),
('sse4_2', '-msse4.2'),
('sse4a', '-msse4a'),
('3dnow', '-m3dnow'),
]
if enable_optimizations:
for flag, gccopt in opt_flags:
if flag in cpuinfo.x86_flags:
if isinstance(gccopt, (tuple, list)):
cc_opts.extend(gccopt)
else:
cc_opts.append(gccopt)
return cc_opts
def cc_flags_powerpc(cpuinfo, enable_optimizations):
"""add certain gcc -m flags based on CPU model
"""
cc_opts = []
if cpuinfo.is_altivec_supported:
cc_opts.append ('-maltivec')
cc_opts.append ('-mabi=altivec')
if re.match('74[0145][0578]A?', cpuinfo.ppc_type) is not None:
cc_opts.append ('-mcpu=7400')
cc_opts.append ('-mtune=7400')
elif re.match('750', cpuinfo.ppc_type) is not None:
cc_opts.append ('-mcpu=750')
cc_opts.append ('-mtune=750')
elif re.match('PPC970', cpuinfo.ppc_type) is not None:
cc_opts.append ('-mcpu=970')
cc_opts.append ('-mtune=970')
elif re.match('Cell Broadband Engine', cpuinfo.ppc_type) is not None:
cc_opts.append('-mcpu=cell')
cc_opts.append('-mtune=cell')
return cc_opts
#=== End Revised CXXFLAGS =========================================
# Autodetect
if env['DIST_TARGET'] == 'auto':
if re.search ("x86_64", config[config_cpu]) is not None:
env['DIST_TARGET'] = 'x86_64'
elif re.search("i[0-5]86", config[config_cpu]) is not None:
env['DIST_TARGET'] = 'i386'
elif re.search("i686", config[config_cpu]) is not None:
env['DIST_TARGET'] = 'i686'
elif re.search("powerpc64", config[config_cpu]) is not None:
env['DIST_TARGET'] = 'powerpc64'
elif re.search("powerpc", config[config_cpu]) is not None:
env['DIST_TARGET'] = 'powerpc'
else:
env['DIST_TARGET'] = config[config_cpu]
print("Detected DIST_TARGET = " + env['DIST_TARGET'])
#=== Begin Revised CXXFLAGS =========================================
# comment on DIST_TARGET up top implies it can be used for cross-compiling
# but that's not true because even if it is not 'auto' the original
# script still reads /proc/cpuinfo to determine gcc arch flags.
# This script does the same as the original. Needs to be fixed someday.
cpuinfo = CpuInfo()
if cpuinfo.is_x86:
opt_flags.extend(cc_flags_x86(cpuinfo, env['ENABLE_OPTIMIZATIONS']))
if cpuinfo.is_powerpc:
opt_flags.extend(cc_flags_powerpc(cpuinfo, env['ENABLE_OPTIMIZATIONS']))
if '-msse' in opt_flags:
env['USE_SSE'] = 1
if '-msse2' in opt_flags:
env['USE_SSE2'] = 1
if env['DETECT_USERSPACE_ENV']:
m32 = is_userspace_32bit(cpuinfo)
print('User space is %s' % (m32 and '32-bit' or '64-bit'))
if cpuinfo.is_powerpc:
if m32:
print("Doing a 32-bit PowerPC build for %s CPU" % cpuinfo.ppc_type)
machineflags = { 'CXXFLAGS' : ['-m32'] }
else:
print("Doing a 64-bit PowerPC build for %s CPU" % cpuinfo.ppc_type)
machineflags = { 'CXXFLAGS' : ['-m64'] }
env.MergeFlags( machineflags )
elif cpuinfo.is_x86:
if m32:
print("Doing a 32-bit %s build for %s" % (cpuinfo.machine, cpuinfo.model_name))
if cpuinfo.machine == 'x86_64':
machineflags = { 'CXXFLAGS' : ['-mx32'] }
else:
machineflags = { 'CXXFLAGS' : ['-m32'] }
else:
print("Doing a 64-bit %s build for %s" % (cpuinfo.machine, cpuinfo.model_name))
machineflags = { 'CXXFLAGS' : ['-m64'] }
needs_fPIC = True
env.MergeFlags( machineflags )
#=== End Revised CXXFLAGS =========================================
if needs_fPIC or ( 'COMPILE_FLAGS' in env and '-fPIC' in env['COMPILE_FLAGS'] ):
env.MergeFlags( "-fPIC" )
# end of processor-specific section
if env['ENABLE_OPTIMIZATIONS']:
opt_flags.extend (["-fomit-frame-pointer","-ffast-math","-funroll-loops"])
env.MergeFlags( opt_flags )
print("Doing an optimized build...")
try:
env['REVISION'] = check_output(('svnversion', '.',)).decode().rstrip()
except:
env['REVISION'] = ''
# This may be as simple as '89' or as complex as '4123:4184M'.
# We'll just use the last bit.
env['REVISION'] = env['REVISION'].split(':')[-1]
# Assume an unversioned directory indicates a release.
if env['REVISION'].startswith ('Unversioned'):
env['REVISION'] = ''
# try to circumvent localized versions
if env['REVISION'].startswith ('export'):
env['REVISION'] = ''
# avoid the 1.999.41- type of version for exported versions
if env['REVISION'] != '':
env['REVISIONSTRING'] = '-' + env['REVISION']
else:
env['REVISIONSTRING'] = ''
env['FFADO_API_VERSION'] = FFADO_API_VERSION
env['PACKAGE'] = "libffado"
env['VERSION'] = FFADO_VERSION
env['LIBVERSION'] = "1.0.0"
env['CONFIGDIR'] = "~/.ffado"
env['CACHEDIR'] = "~/.ffado"
env['USER_CONFIG_FILE'] = env['CONFIGDIR'] + "/configuration"
env['SYSTEM_CONFIG_FILE'] = env['SHAREDIR'] + "/configuration"
env['REGISTRATION_URL'] = "http://ffado.org/deviceregistration/register.php?action=register"
#
# To have the top_srcdir as the doxygen-script is used from auto*
#
env['top_srcdir'] = env.Dir( "." ).abspath
#
# Start building
#
env.ScanReplace( "config.h.in" )
env.ScanReplace( "config_debug.h.in" )
env.ScanReplace( "version.h.in" )
# ensure that the config.h is updated
env.Depends( "config.h", "SConstruct" )
env.Depends( "config.h", 'cache/options.cache' )
# update version.h whenever the version or SVN revision changes
env.Depends( "version.h", env.Value(env['REVISION']))
env.Depends( "version.h", env.Value(env['VERSION']))
env.Depends( "libffado.pc", "SConstruct" )
pkgconfig = env.ScanReplace( "libffado.pc.in" )
env.Install( env['libdir'] + '/pkgconfig', pkgconfig )
env.Install( env['sharedir'], 'configuration' )
subdirs=['src','libffado','support','doc']
if env['BUILD_TESTS']:
subdirs.append('tests')
env.SConscript( dirs=subdirs, exports="env" )
if 'debian' in COMMAND_LINE_TARGETS:
env.SConscript("deb/SConscript", exports="env")
# By default only src is built but all is cleaned
if not env.GetOption('clean'):
Default( 'src' )
Default( 'support' )
if env['BUILD_TESTS']:
Default( 'tests' )
if env['BUILD_DOC'] != 'none':
Default( 'doc' )
env.Install( env['metainfodir'], "support/xdg/ffado-mixer.appdata.xml" )
#
# Deal with the DESTDIR vs. xdg-tools conflict (which is basicely that the
# xdg-tools can't deal with DESTDIR, so the packagers have to deal with this
# their own :-/
#
if len(env.destdir) > 0:
if not len( ARGUMENTS.get( "WILL_DEAL_WITH_XDG_MYSELF", "" ) ) > 0:
print("""
WARNING!
You are using the (packagers) option DESTDIR to install this package to a
different place than the real prefix. As the xdg-tools can't cope with
that, the .desktop-files are not installed by this build, you have to
deal with them your own.
(And you have to look into the SConstruct to learn how to disable this
message.)
""")
else:
def CleanAction( action ):
if env.GetOption( "clean" ):
env.Execute( action )
if env['BUILD_MIXER'] == 'true' and env['XDG_TOOLS']:
if not env.GetOption("clean"):
action = "install"
else:
action = "uninstall"
mixerdesktopaction = env.Action( "-xdg-desktop-menu %s support/xdg/ffado.org-ffadomixer.desktop" % action )
mixericonaction = env.Action( "-xdg-icon-resource %s --size 64 --novendor --context apps support/xdg/hi64-apps-ffado.png ffado" % action )
env.Command( "__xdgstuff1", None, mixerdesktopaction )
env.Command( "__xdgstuff2", None, mixericonaction )
env.Alias( "install", ["__xdgstuff1", "__xdgstuff2" ] )
CleanAction( mixerdesktopaction )
CleanAction( mixericonaction )
#
# Create a tags-file for easier emacs/vim-source-browsing
# I don't know if the dependency is right...
#
findcommand = "find . \( -path \"*.h\" -o -path \"*.cpp\" -o -path \"*.c\" \) \! -path \"*.svn*\" \! -path \"./doc*\" \! -path \"./cache*\""
env.Command( "tags", "", findcommand + " |xargs ctags" )
env.Command( "TAGS", "", findcommand + " |xargs etags" )
env.AlwaysBuild( "tags", "TAGS" )
if 'NoCache' in dir(env):
env.NoCache( "tags", "TAGS" )
# Another convinience target
if env.GetOption( "clean" ):
env.Execute( "rm cache/objects -Rf" )
#
# vim: ts=4 sw=4 et
libffado-2.4.2/support/ 0000755 0001750 0000144 00000000000 13541343163 014374 5 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ 0000755 0001750 0000144 00000000000 13541343162 016225 5 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/SConscript 0000644 0001750 0000144 00000003742 13541342701 020243 0 ustar jwoithe users #!/usr/bin/python
#
# Copyright (C) 2007-2009 Arnold Krille
# Copyright (C) 2007-2008 Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
import os
from string import Template
Import( 'env' )
if env['BUILD_MIXER'] == 'true':
e = env.Clone()
pythonfiles = [ 'ffado/config.py' ]
for root, dirs, files in os.walk( "ffado" ):
for name in files:
if name.endswith( '.pyc' ) or '.in' in name or name.startswith("."):
continue
pythonfiles.append( os.path.join( root, name ) )
e.ScanReplace( "ffado/config.py.in" )
e.Depends( "ffado/config.py", "#/SConstruct" )
for file in pythonfiles:
e.InstallAs( os.path.join(e['pypkgdir'], file), file )
e.ScanReplace( "ffado-mixer.in" )
e.Depends( "ffado-mixer", "SConscript" )
e.Depends( "ffado-mixer", "#/SConstruct" )
e.Install( "$bindir", "ffado-mixer" )
e.ScanReplace( "ffado-mixer-profiler.in" )
e.Depends( "ffado-mixer-profiler", "SConscript" )
e.Depends( "ffado-mixer-profiler", "#/SConstruct" )
e.Install( "$sharedir/icons", "../xdg/hi64-apps-ffado.png" )
# Install the ffado-mixer manpage in section 1
dest = os.path.join("$mandir", "man1", "ffado-mixer.1")
env.InstallAs(source="ffado-mixer.1", target=dest)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/ 0000755 0001750 0000144 00000000000 13541343162 017304 5 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/import_pyqt.py 0000644 0001750 0000144 00000004017 13541342701 022245 0 ustar jwoithe users #
# Copyright (C) 2017 by Jonathan Woithe
#
# 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
# This module handles the importing of PyQt modules for both PyQt4 and PyQt5
# under Python2 or Python3. If Python3 is installed it is assumed that
# PyQt5 is in use (this is reasonable because PyQt5 is what everyone wants
# to use under Python3). Otherwise (that is, under Python2), an import of
# PyQt4 is tried first; if an import error occurs then PyQt5 is assumed.
#
# All modules used by any part of ffado-mixer are imported. This greatly
# simplifies the process. Otherwise the modules to import would be delivered
# by string variables, and there isn't a supported way to do this across
# Python2 and Python3.
import sys
ffado_python3 = sys.version_info >= (3,)
if ffado_python3:
ffado_pyqt_version = 5
else:
try:
from PyQt4 import QtGui
ffado_pyqt_version = 4
except ImportError:
ffado_pyqt_version = 5
if ffado_pyqt_version == 4:
from PyQt4 import QtGui, QtCore, Qt, uic
from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot
from PyQt4.QtGui import *
else:
from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic
from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
libffado-2.4.2/support/mixer-qt4/ffado/ffadowindow.py 0000644 0001750 0000144 00000025237 13246707102 022176 0 ustar jwoithe users # Copyright (C) 2005-2008 by Pieter Palmers
# 2007-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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
import ctypes
import datetime
import os
from ffado.config import *
import subprocess
# from PyQt4.QtCore import QObject, QTimer, Qt
# from PyQt4.QtGui import *
from ffado.import_pyqt import *
from ffado.dbus_util import *
from ffado.panelmanager import PanelManager
from ffado.logginghandler import *
"""Just a small helper to ask the retry-question without a blocking messagebox"""
class StartDialog(QWidget):
def __init__(self, parent):
QWidget.__init__(self, parent)
self.setObjectName("Restart Dialog")
self.label = QLabel("Somehow the connection to the dbus-service of FFADO couldn't be established.\nShall we take another try?
",self)
self.button = QPushButton("Retry", self)
self.layout = QGridLayout(self)
self.layout.setContentsMargins( 50, 10, 50, 10 )
self.layout.addWidget(self.label, 0, 0, Qt.AlignHCenter|Qt.AlignBottom)
self.layout.addWidget(self.button, 1, 0, Qt.AlignHCenter|Qt.AlignTop)
class FFADOWindow(QMainWindow):
def __init__(self, parent):
QMainWindow.__init__(self, parent)
self.textlogger = QTextLogger(self)
dock = QDockWidget("Log Messages",self)
dock.setWidget(self.textlogger.textedit)
logging.getLogger('').addHandler(self.textlogger)
self.addDockWidget(Qt.BottomDockWidgetArea, dock)
self.statuslogger = QStatusLogger(self, self.statusBar(), 20)
logging.getLogger('').addHandler(self.statuslogger)
self.manager = PanelManager(self)
self.manager.connectionLost.connect(self.connectToDBUS)
filemenu = self.menuBar().addMenu("&File")
self.openaction = QAction(QIcon.fromTheme("document-open"),"&Open", self)
self.openaction.setShortcut(self.tr("Ctrl+O"))
self.openaction.setEnabled(False)
self.openaction.triggered.connect(self.manager.readSettings)
filemenu.addAction(self.openaction)
self.saveaction = QAction(QIcon.fromTheme("document-save-as"),"&Save as...", self)
self.saveaction.setShortcut(self.tr("Ctrl+S"))
self.saveaction.setEnabled(False)
self.saveaction.triggered.connect(self.manager.saveSettings)
filemenu.addAction(self.saveaction)
self.quitaction = QAction(QIcon.fromTheme("application-exit"),"&Quit", self)
self.quitaction.setShortcut(self.tr("Ctrl+q"))
self.quitaction.triggered.connect(self.close)
filemenu.addAction(self.quitaction)
self.editmenu = self.menuBar().addMenu("&View")
self.thememenu = self.editmenu.addMenu("Theme")
themes = QStyleFactory.keys()
self.menuTheme = {}
for theme in themes:
self.menuTheme[theme] = QAction(QIcon.fromTheme("preferences-desktop-theme"), theme, self )
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() 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 )
self.thememenu.addAction( self.menuTheme[theme] )
self.updateaction = QAction(QIcon.fromTheme("view-refresh"),"&Update Mixer Panels", self)
self.updateaction.setEnabled(False)
self.updateaction.triggered.connect(self.manager.updatePanels)
self.editmenu.addAction(self.updateaction)
self.refreshaction = QAction(QIcon.fromTheme("view-refresh"),"&Refresh Current Panels", self)
self.refreshaction.triggered.connect(self.manager.refreshPanels)
self.editmenu.addAction(self.refreshaction)
self.editmenu.addSeparator()
self.devices = {}
helpmenu = self.menuBar().addMenu( "&Help" )
self.aboutaction = QAction(QIcon.fromTheme("help-about"), "About &FFADO", self )
self.aboutaction.triggered.connect(self.aboutFFADO)
helpmenu.addAction( self.aboutaction )
self.aboutqtaction = QAction(QIcon.fromTheme("help-about"), "About &Qt", self )
self.aboutqtaction.triggered.connect(QApplication.instance().aboutQt)
helpmenu.addAction( self.aboutqtaction )
log.info( "Starting up" )
QTimer.singleShot( 1, self.tryStartDBUSServer )
def __del__(self):
log.info("__del__")
del self.manager
log.info("__del__ finished")
def switchTheme(self, checked) :
for theme in self.menuTheme :
if not self.menuTheme[theme].isEnabled() :
self.menuTheme[theme].setChecked(False)
self.menuTheme[theme].setDisabled(False)
for theme in self.menuTheme :
if self.menuTheme[theme].isChecked() :
self.menuTheme[theme].setDisabled(True)
QApplication.setStyle(QStyleFactory.create(theme))
def closeEvent(self, event):
log.info("closeEvent()")
event.accept()
def connectToDBUS(self):
log.info("connectToDBUS")
try:
self.setupDeviceManager()
except dbus.DBusException as ex:
log.error("Could not communicate with the FFADO DBus service...")
if not hasattr(self,"retry"):
self.retry = StartDialog(self)
self.retry.button.clicked.connect(self.tryStartDBUSServer)
if hasattr(self, "retry"):
self.manager.setParent(None)
self.setCentralWidget(self.retry)
self.retry.setEnabled(True)
def tryStartDBUSServer(self):
try:
self.setupDeviceManager()
except dbus.DBusException as ex:
if hasattr(self, "retry"):
self.retry.setEnabled(False)
subprocess.Popen(['ffado-dbus-server', '-v3']).pid
QTimer.singleShot(5000, self.connectToDBUS)
def setupDeviceManager(self):
devmgr = DeviceManagerInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH)
self.manager.setManager(devmgr)
if hasattr(self, "retry"):
self.retry.setParent(None)
self.setCentralWidget(self.manager)
self.updateaction.setEnabled(True)
def aboutFFADO(self):
QMessageBox.about( self, "About FFADO", """
ffado.org
{ffado_version}
FFADO is the new approach to have firewire audio on linux.
© 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:
- Pieter Palmers
- Daniel Wagner
- Jonathan Woithe
- Arnold Krille
- Philippe Carriere
- Takashi Sakamoto
with contributions from:
- Adrian Knoth
- Stefan Richter
- Jano Svitok
""".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
import sys
global lock_socket
lock_socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
try:
lock_socket.bind('\0' + process_name)
# Lock acquired
except socket.error:
print( 'ffado-mixer instance is already running' )
sys.exit()
def ffadomain(args):
#set up logging
import logging
logging.basicConfig( datefmt="%H:%M:%S", format="%(asctime)s %(name)-16s %(levelname)-8s %(message)s" )
if DEBUG:
debug_level = logging.DEBUG
else:
debug_level = logging.INFO
get_lock('ffado-mixer')
# Very simple command line option parser
if (len(args) > 1) and (args[1] == "-b" or args[1] == "--bypassdbus"):
ffado.config.bypassdbus = True
# main loggers:
logging.getLogger('main').setLevel(debug_level)
logging.getLogger('dbus').setLevel(debug_level)
logging.getLogger('registration').setLevel(debug_level)
logging.getLogger('panelmanager').setLevel(debug_level)
logging.getLogger('configparser').setLevel(logging.INFO)
# widgets:
logging.getLogger('matrixmixer').setLevel(debug_level)
logging.getLogger('crossbarrouter').setLevel(debug_level)
# mixers:
logging.getLogger('audiofire').setLevel(debug_level)
logging.getLogger('bridgeco').setLevel(debug_level)
logging.getLogger('edirolfa101').setLevel(debug_level)
logging.getLogger('edirolfa66').setLevel(debug_level)
logging.getLogger('motu').setLevel(debug_level)
logging.getLogger('rme').setLevel(debug_level)
logging.getLogger('phase24').setLevel(debug_level)
logging.getLogger('phase88').setLevel(debug_level)
logging.getLogger('quatafire').setLevel(debug_level)
logging.getLogger('saffirebase').setLevel(debug_level)
logging.getLogger('saffire').setLevel(debug_level)
logging.getLogger('saffirepro').setLevel(debug_level)
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" ) )
app.setOrganizationName("FFADO")
app.setOrganizationDomain("ffado.org")
app.setApplicationName("ffado-mixer")
mainwindow = FFADOWindow(None)
# rock & roll
mainwindow.show()
return app.exec_()
if __name__ == "__main__":
import sys
sys.exit(ffadomain(sys.argv))
#
# vim: ts=4 sw=4 et
libffado-2.4.2/support/mixer-qt4/ffado/logginghandler.py 0000644 0001750 0000144 00000004461 13246707102 022647 0 ustar jwoithe users #
# Copyright (C) 2008 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
# from PyQt4.QtGui import QTextEdit, QAbstractSlider, QColor
# from PyQt4.QtCore import QObject, pyqtSignal, QString
from ffado.import_pyqt import *
import logging
log = logging.getLogger('logginghandler')
class QStatusLogger( QObject, logging.Handler ):
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 )
self.setFormatter( logging.Formatter( "%(name)s: %(message)s" ) )
self.log.connect(statusbar.showMessage)
def emit( self, record ):
self.log.emit('%s: %s'.format(record.name, record.getMessage()), 5000)
class QTextLogger( logging.Handler ):
def __init__( self, parent, level=logging.NOTSET ):
logging.Handler.__init__( self, level )
self.textedit = QTextEdit( parent )
self.textedit.setReadOnly( True )
self.textedit.setAcceptRichText( True )
def emit( self, record ):
color = QColor( "#000000" )
if record.levelno > 20:
color = QColor( "#ffff00" )
if record.levelno > 30:
color = QColor( "#ff0000" )
if record.levelno <= 10:
color = QColor( "#808080" )
self.textedit.setTextColor( color )
tmp = "%s %s: %s" % (record.asctime, record.name, record.getMessage())
self.textedit.append( tmp )
self.textedit.verticalScrollBar().triggerAction( QAbstractSlider.SliderToMaximum )
#
# vim: et
#
libffado-2.4.2/support/mixer-qt4/ffado/mixer/ 0000755 0001750 0000144 00000000000 13541343162 020430 5 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/mixer/audiofire.py 0000644 0001750 0000144 00000043025 13246707102 022755 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtCore import Qt, QTimer
# from PyQt4.QtGui import QWidget, QHBoxLayout, QVBoxLayout
# from PyQt4.QtGui import QGroupBox, QTabWidget, QLabel
# from PyQt4.QtGui import QPushButton, QToolButton, QSpacerItem, QSizePolicy
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('audiofire')
class AfMonitorWidget(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/audiofire_strip", self)
class AfSettingsWidget(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/audiofire_settings", self)
class AudioFire(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
log.debug("Init AudioFire mixer window")
def getDisplayTitle(self):
modelId = self.configrom.getModelId()
if modelId == 0x0AF2:
return "AudioFire2"
if modelId == 0x0AF4:
return "AudioFire4"
if modelId == 0x0AF8:
return "AudioFire8"
if modelId == 0x0AF9:
return "AudioFirePre8"
if modelId == 0x0AF12:
return "AudioFire12"
return "Generic FireWorks"
def updateMatrixButton(self,a0):
sender = self.sender()
if a0:
state = 1
else:
state = 0
log.debug("set %s %d %d to %d" % (
self.MatrixButtonControls[sender][0],
self.MatrixButtonControls[sender][1],
self.MatrixButtonControls[sender][2],
state))
self.hw.setMatrixMixerValue(self.MatrixButtonControls[sender][0],
self.MatrixButtonControls[sender][1],
self.MatrixButtonControls[sender][2],
state)
def updateMatrixRotary(self,a0):
sender = self.sender()
vol = a0
log.debug("set %s %d %d to %d" % (
self.MatrixRotaryControls[sender][0],
self.MatrixRotaryControls[sender][1],
self.MatrixRotaryControls[sender][2],
vol))
self.hw.setMatrixMixerValue(self.MatrixRotaryControls[sender][0],
self.MatrixRotaryControls[sender][1],
self.MatrixRotaryControls[sender][2],
vol)
def updateMatrixVolume(self,a0):
sender = self.sender()
vol = a0
#vol = 0x01000000-vol
log.debug("set %s %d %d to %d" % (
self.MatrixVolumeControls[sender][0],
self.MatrixVolumeControls[sender][1],
self.MatrixVolumeControls[sender][2],
vol))
self.hw.setMatrixMixerValue(self.MatrixVolumeControls[sender][0],
self.MatrixVolumeControls[sender][1],
self.MatrixVolumeControls[sender][2],
vol)
def updateVolume(self,a0):
sender = self.sender()
vol = a0
#vol = 0x01000000-vol
log.debug("set %s to %d" % (
self.VolumeControls[sender][0],
vol))
self.hw.setContignuous(self.VolumeControls[sender][0],
vol)
def updateSelector(self,a0):
sender = self.sender()
if a0:
state = 1
else:
state = 0
log.debug("set %s to %d" % (
self.SelectorControls[sender][0],
state))
self.hw.setDiscrete(self.SelectorControls[sender][0], state)
def updateTrigger(self):
sender = self.sender()
log.debug("trigger %s" % (self.TriggerControls[sender][0]))
self.hw.setDiscrete(self.TriggerControls[sender][0], 1)
def updateSPDIFmodeControl(self,a0):
sender = self.sender()
if a0:
state = 1
else:
state = 0
if state:
log.debug("set %s to %d" % (
self.SPDIFmodeControls[sender][0],
self.SPDIFmodeControls[sender][1]))
self.hw.setDiscrete(self.SPDIFmodeControls[sender][0], self.SPDIFmodeControls[sender][1])
def updateDigIfaceControl(self, a0):
sender = self.sender()
state = a0
# 0/2/3 is available but GUI set 0/1/2
if a0 > 0:
state += 1
log.debug("set %s to %d" % (
self.DigIfaceControls[sender][0], state))
self.hw.setDiscrete(self.DigIfaceControls[sender][0], state)
def updatePlbkRouteControl(self, src):
sender = self.sender()
path = self.PlbkRouteControls[sender][0]
sink = self.PlbkRouteControls[sender][1]
self.hw.setDiscrete(path, sink, src)
self.setStreamLabel(src, sink)
def setStreamLabel(self, src, sink):
pos = src * 2 + 1
self.StreamMonitors[sink].lblName.setText("Playback %d/%d" % (pos, pos + 1))
def buildMixer(self):
log.debug("Building mixer")
self.MatrixButtonControls={}
self.MatrixRotaryControls={}
self.MatrixVolumeControls={}
self.VolumeControls={}
self.SelectorControls={}
self.SPDIFmodeControls={}
self.TriggerControls={}
self.DigIfaceControls={}
self.PlbkRouteControls={}
self.StreamMonitors=[]
nb_pys_out = self.hw.getDiscrete("/HwInfo/PhysicalAudioOutCount")
nb_pys_in = self.hw.getDiscrete("/HwInfo/PhysicalAudioInCount")
outputtabslayout = QHBoxLayout( self )
outputtabs = QTabWidget(self)
outputtabslayout.addWidget( outputtabs, 1 )
for outpair in range(int(nb_pys_out/2)):
tab = QWidget( outputtabs )
tablayout = QHBoxLayout( tab )
grpMonitor = QGroupBox(tab)
tablayout.addWidget(grpMonitor)
grpPlayback = QGroupBox(tab)
tablayout.addWidget(grpPlayback)
grpOutput = QGroupBox(tab)
tablayout.addWidget(grpOutput)
grpMonitor.setTitle("Monitor")
grpPlayback.setTitle("Playback")
grpOutput.setTitle("Output")
# monitor controls
grpMonitorLayout = QHBoxLayout()
grpMonitor.setLayout(grpMonitorLayout);
output_id = outpair * 2
for inpair in range(int(nb_pys_in/2)):
# create GUI elements
strip = AfMonitorWidget( grpMonitor )
grpMonitorLayout.addWidget( strip, 1 )
input_id = inpair*2
strip.lblName.setText("In %d/%d" % (input_id+1, input_id+2))
# add the elements to the control structure
self.MatrixButtonControls[strip.btnMute0] = ['/Mixer/MonitorMute', input_id, output_id]
self.MatrixButtonControls[strip.btnMute1] = ['/Mixer/MonitorMute', input_id + 1, output_id + 1]
self.MatrixButtonControls[strip.btnSolo0] = ['/Mixer/MonitorSolo', input_id, output_id]
self.MatrixButtonControls[strip.btnSolo1] = ['/Mixer/MonitorSolo', input_id + 1, output_id + 1]
self.MatrixRotaryControls[strip.rotPan0] = ['/Mixer/MonitorPan', input_id, output_id]
self.MatrixRotaryControls[strip.rotPan1] = ['/Mixer/MonitorPan', input_id + 1, output_id + 1]
self.MatrixVolumeControls[strip.sldGain0] = ['/Mixer/MonitorGain', input_id, output_id]
self.MatrixVolumeControls[strip.sldGain1] = ['/Mixer/MonitorGain', input_id + 1, output_id + 1]
# playback
grpPlaybackLayout = QHBoxLayout()
grpPlayback.setLayout(grpPlaybackLayout);
strip = AfMonitorWidget( grpPlayback )
grpPlaybackLayout.addWidget(strip, 1)
strip.lblName.setText("Playback %d/%d" % (output_id+1, output_id+2))
self.StreamMonitors.append(strip)
self.VolumeControls[strip.sldGain0] = ["/Mixer/PC%dGain" % (output_id)]
self.VolumeControls[strip.sldGain1] = ["/Mixer/PC%dGain" % (output_id+1)]
self.SelectorControls[strip.btnMute0] = ["/Mixer/PC%dMute" % (output_id)]
self.SelectorControls[strip.btnMute1] = ["/Mixer/PC%dMute" % (output_id+1)]
self.SelectorControls[strip.btnSolo0] = ["/Mixer/PC%dSolo" % (output_id)]
self.SelectorControls[strip.btnSolo1] = ["/Mixer/PC%dSolo" % (output_id+1)]
# fix up mixer strip gui
strip.rotPan0.hide()
strip.rotPan1.hide()
# output
grpOutputLayout = QHBoxLayout()
grpOutput.setLayout(grpOutputLayout);
strip = AfMonitorWidget( grpOutput )
grpOutputLayout.addWidget(strip, 1)
strip.lblName.setText("Output %d/%d" % (output_id+1, output_id+2))
self.VolumeControls[strip.sldGain0] = ["/Mixer/OUT%dGain" % (output_id)]
self.VolumeControls[strip.sldGain1] = ["/Mixer/OUT%dGain" % (output_id+1)]
self.SelectorControls[strip.btnMute0] = ["/Mixer/OUT%dMute" % (output_id)]
self.SelectorControls[strip.btnMute1] = ["/Mixer/OUT%dMute" % (output_id+1)]
self.SelectorControls[strip.btnSolo0] = ["/Mixer/OUT%dNominal" % (output_id)]
self.SelectorControls[strip.btnSolo1] = ["/Mixer/OUT%dNominal" % (output_id+1)]
# fix up mixer strip gui
strip.btnSolo0.setText("Pad")
strip.btnSolo1.setText("Pad")
strip.rotPan0.hide()
strip.rotPan1.hide()
# add the tab
outputtabs.addTab( tab, "Out %d/%d" % (output_id+1, output_id+2))
# add an input config tab
tab = QWidget( outputtabs )
tablayout = QHBoxLayout( tab )
for inpair in range(nb_pys_in):
# create GUI elements
log.debug("strip")
grpInput = QGroupBox(tab)
tablayout.addWidget(grpInput)
grpInput.setTitle("In %d" % (inpair+1))
grpInputLayout = QVBoxLayout()
grpInput.setLayout(grpInputLayout);
label = QLabel( grpInput )
grpInputLayout.addWidget( label )
label.setText("In %d" % (inpair+1))
label.setAlignment(Qt.AlignCenter)
btn = QToolButton( grpInput )
grpInputLayout.addWidget( btn )
btn.setText("Pad")
btn.setCheckable(True)
self.SelectorControls[btn] = ["/Mixer/IN%dNominal" % (inpair)]
spacer = QSpacerItem(1,1,QSizePolicy.Minimum,QSizePolicy.Expanding)
grpInputLayout.addItem(spacer)
outputtabs.addTab( tab, "Input")
# add an settings tab
tab = QWidget( outputtabs )
tablayout = QHBoxLayout( tab )
outputtabs.addTab( tab, "Settings")
settings = AfSettingsWidget( tab )
has_sw_phantom = self.hw.getDiscrete("/HwInfo/PhantomPower")
if has_sw_phantom:
self.SelectorControls[settings.btnPhantom] = ["/PhantomPower"]
else:
settings.btnPhantom.hide()
has_opt_iface = self.hw.getDiscrete('/HwInfo/OpticalInterface')
if has_opt_iface:
self.DigIfaceControls[settings.cmbDigIface] = ['/DigitalInterface']
else:
settings.DigIface.hide()
has_plbk_route = self.hw.getDiscrete('/HwInfo/PlaybackRouting')
if has_plbk_route:
self.PlbkRouteControls[settings.cmbRoute1] = ['/PlaybackRouting', 0]
self.PlbkRouteControls[settings.cmbRoute2] = ['/PlaybackRouting', 1]
self.PlbkRouteControls[settings.cmbRoute3] = ['/PlaybackRouting', 2]
if self.configrom.getModelId() == 0x0AF2:
label_route2 = 'Headphone Out 1/2'
else:
label_route2 = 'Analog Out 3/4'
settings.labelRoute2.setText(label_route2)
else:
settings.PlbkRoute.hide()
self.TriggerControls[settings.btnSaveSettings] = ["/SaveSettings"]
self.TriggerControls[settings.btnIdentify] = ["/Identify"]
if self.configrom.getModelId() == 0x0AF12:
settings.spdifMode.hide()
else:
self.SPDIFmodeControls[settings.radioConsumer] = ["/SpdifMode", 0]
self.SPDIFmodeControls[settings.radioProfessional] = ["/SpdifMode", 1]
# Store a reference to the "save" button for later manipulation
self.btnSaveSettings = settings.btnSaveSettings
def polledUpdate(self):
ss = self.streamingstatus.selected()
# Only alter controls sensitive to the streaming state when the
# streaming state has changed.
if (ss != self.streaming_state):
ss_txt = self.streamingstatus.getEnumLabel(ss)
# The device doesn't cope very well if "save settings" is done
# while streaming is active
self.btnSaveSettings.setEnabled(ss_txt=='Idle')
self.streaming_state = ss
def initValues(self):
log.debug("Init values")
for ctrl, info in self.MatrixVolumeControls.items():
vol = self.hw.getMatrixMixerValue(self.MatrixVolumeControls[ctrl][0],
self.MatrixVolumeControls[ctrl][1],
self.MatrixVolumeControls[ctrl][2])
#vol = 0x01000000-vol
log.debug("%s volume is %d" % (ctrl.objectName() , vol))
ctrl.setValue(vol)
# connect the UI element
ctrl.valueChanged.connect(self.updateMatrixVolume)
for ctrl, info in self.MatrixButtonControls.items():
state = self.hw.getMatrixMixerValue(self.MatrixButtonControls[ctrl][0],
self.MatrixButtonControls[ctrl][1],
self.MatrixButtonControls[ctrl][2])
log.debug("%s state is %d" % (ctrl.objectName() , state))
if state:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
# connect the UI element
ctrl.clicked.connect(self.updateMatrixButton)
for ctrl, info in self.MatrixRotaryControls.items():
vol = self.hw.getMatrixMixerValue(self.MatrixRotaryControls[ctrl][0],
self.MatrixRotaryControls[ctrl][1],
self.MatrixRotaryControls[ctrl][2])
log.debug("%s value is %d" % (ctrl.objectName(), vol))
ctrl.setValue(vol)
# connect the UI element
ctrl.valueChanged.connect(self.updateMatrixRotary)
for ctrl, info in self.VolumeControls.items():
vol = self.hw.getContignuous(self.VolumeControls[ctrl][0])
#vol = 0x01000000-vol
log.debug("%s volume is %d" % (ctrl.objectName() , vol))
ctrl.setValue(vol)
# connect the UI element
ctrl.valueChanged.connect(self.updateVolume)
for ctrl, info in self.SelectorControls.items():
state = self.hw.getDiscrete(self.SelectorControls[ctrl][0])
log.debug("%s state is %d" % (ctrl.objectName() , state))
if state:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
# connect the UI element
ctrl.clicked.connect(self.updateSelector)
for ctrl, info in self.TriggerControls.items():
# connect the UI element
ctrl.clicked.connect(self.updateTrigger)
for ctrl, info in self.SPDIFmodeControls.items():
state = self.hw.getDiscrete(self.SPDIFmodeControls[ctrl][0])
log.debug("%s state is %d" % (ctrl.objectName() , state))
if state == self.SPDIFmodeControls[ctrl][1]:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
# connect the UI element
ctrl.toggled.connect(self.updateSPDIFmodeControl)
for ctrl, info in self.DigIfaceControls.items():
state = self.hw.getDiscrete(self.DigIfaceControls[ctrl][0])
# 0/2/3 is available but GUI set 0/1/2
if state > 0:
state -= 1
ctrl.setCurrentIndex(state)
ctrl.activated.connect(self.updateDigIfaceControl)
for ctrl, info in self.PlbkRouteControls.items():
sink = self.PlbkRouteControls[ctrl][1]
src = self.hw.getDiscrete(self.PlbkRouteControls[ctrl][0], sink)
ctrl.setCurrentIndex(src)
self.setStreamLabel(src, sink)
ctrl.activated.connect(self.updatePlbkRouteControl)
self.update_timer = QTimer(self)
self.update_timer.timeout.connect(self.polledUpdate)
self.update_timer.start(1000)
self.streaming_state = -1
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/phase88control.py 0000644 0001750 0000144 00000020506 13246707102 023666 0 ustar jwoithe users #
# Copyright (C) 2014-2015 by Andras Muranyi
# Copyright (c) 2013 by Takashi Sakamoto (Yamaha GO Control)
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
import logging
log = logging.getLogger('phase88')
class Phase88Control(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
def initValues(self):
uicLoad("ffado/mixer/phase88", self)
self.VolumeControls={
self.sldInputMasterL: ['/Mixer/Feature_Volume_1', 1, self.sldInputMasterR, 2, self.linkButtonMaster, self.decibelMasterL, 0],
self.sldInputMasterR: ['/Mixer/Feature_Volume_1', 2, self.sldInputMasterL, 1, self.linkButtonMaster, self.decibelMasterR, 0],
self.sldInput1: ['/Mixer/Feature_Volume_2', 1, self.sldInput2, 2, self.linkButton12, self.decibel1, 0],
self.sldInput2: ['/Mixer/Feature_Volume_2', 2, self.sldInput1, 1, self.linkButton12, self.decibel2, 0],
self.sldInput3: ['/Mixer/Feature_Volume_3', 1, self.sldInput4, 2, self.linkButton34, self.decibel3, 0],
self.sldInput4: ['/Mixer/Feature_Volume_3', 2, self.sldInput3, 1, self.linkButton34, self.decibel4, 0],
self.sldInput5: ['/Mixer/Feature_Volume_4', 1, self.sldInput6, 2, self.linkButton56, self.decibel5, 0],
self.sldInput6: ['/Mixer/Feature_Volume_4', 2, self.sldInput5, 1, self.linkButton56, self.decibel6, 0],
self.sldInput7: ['/Mixer/Feature_Volume_5', 1, self.sldInput8, 2, self.linkButton78, self.decibel7, 0],
self.sldInput8: ['/Mixer/Feature_Volume_5', 2, self.sldInput7, 1, self.linkButton78, self.decibel8, 0],
self.sldInputSPDIFL: ['/Mixer/Feature_Volume_6', 1, self.sldInputSPDIFR, 2, self.linkButtonSPDIF, self.decibelSPDIFL, 0],
self.sldInputSPDIFR: ['/Mixer/Feature_Volume_6', 2, self.sldInputSPDIFL, 1, self.linkButtonSPDIF, self.decibelSPDIFR, 0],
self.sldInputWavePlayL: ['/Mixer/Feature_Volume_7', 1, self.sldInputWavePlayR, 2, self.linkButtonWavePlay, self.decibelWavePlayL, 0],
self.sldInputWavePlayR: ['/Mixer/Feature_Volume_7', 2, self.sldInputWavePlayL, 1, self.linkButtonWavePlay, self.decibelWavePlayR, 0]
}
self.SelectorControls={
self.comboOutAssign: '/Mixer/Selector_6',
self.comboInAssign: '/Mixer/Selector_7',
self.comboExtSync: '/Mixer/Selector_8',
self.comboSyncSource: '/Mixer/Selector_9',
self.comboFrontBack: '/Mixer/Selector_10'
}
self.MuteControls={
self.muteButtonMasterL: [self.sldInputMasterL, self.muteButtonMasterR],
self.muteButtonMasterR: [self.sldInputMasterR, self.muteButtonMasterL],
self.muteButton1: [self.sldInput1, self.muteButton2],
self.muteButton2: [self.sldInput2, self.muteButton1],
self.muteButton3: [self.sldInput3, self.muteButton4],
self.muteButton4: [self.sldInput4, self.muteButton3],
self.muteButton5: [self.sldInput5, self.muteButton6],
self.muteButton6: [self.sldInput6, self.muteButton5],
self.muteButton7: [self.sldInput7, self.muteButton8],
self.muteButton8: [self.sldInput8, self.muteButton7],
self.muteButtonSPDIFL: [self.sldInputSPDIFL, self.muteButtonSPDIFR],
self.muteButtonSPDIFR: [self.sldInputSPDIFR, self.muteButtonSPDIFL],
self.muteButtonWavePlayL: [self.sldInputWavePlayL, self.muteButtonWavePlayR],
self.muteButtonWavePlayR: [self.sldInputWavePlayR, self.muteButtonWavePlayL]
}
# gain control
for ctl, params in self.VolumeControls.items():
path = params[0]
idx = params[1]
dbmeter = params[5]
#db = self.hw.getContignuous(path, idx)
#vol = self.db2vol(db)
vol = self.hw.getContignuous(path, idx)
print("%s ch %d volume is %d" % (path, idx, vol))
ctl.setValue(vol)
dbmeter.setText(self.vol2dbstr(vol))
self.VolumeControls[ctl][6] = vol
pair = params[2]
pidx = params[3]
link = params[4]
# pdb = self.hw.getContignuous(path, pidx)
# pvol = self.db2vol(db)
pvol = self.hw.getContignuous(path, pidx)
if pvol == vol:
link.setChecked(True)
ctl.valueChanged.connect(self.updateVolume)
# selector controls
for ctl, param in self.SelectorControls.items():
state = self.hw.getDiscrete(param)
ctl.setCurrentIndex(state)
ctl.activated.connect(self.updateSelector)
# mute controls
for ctl, param in self.MuteControls.items():
ctl.toggled.connect(self.muteVolume)
# helper functions
def muteVolume(self, state):
sender = self.sender()
volctl = self.MuteControls[sender][0]
path = self.VolumeControls[volctl][0]
idx = self.VolumeControls[volctl][1]
pair = self.VolumeControls[volctl][2]
pidx = self.VolumeControls[volctl][3]
link = self.VolumeControls[volctl][4]
savedvol = self.VolumeControls[volctl][6]
psavedvol = self.VolumeControls[pair][6]
if state == True :
self.hw.setContignuous(path, -25600, idx) # The PHASE88 supports volume between 0 and -25600
if link.isChecked():
pair.setDisabled(state)
self.MuteControls[sender][1].setChecked(state)
# self.hw.setContignuous(path, 0, pidx)
else:
self.hw.setContignuous(path, savedvol, idx)
if link.isChecked():
pair.setDisabled(state)
self.MuteControls[sender][1].setChecked(state)
# self.hw.setContignuous(path, psavedvol, pidx)
def updateVolume(self, vol):
sender = self.sender()
path = self.VolumeControls[sender][0]
idx = self.VolumeControls[sender][1]
pair = self.VolumeControls[sender][2]
pidx = self.VolumeControls[sender][3]
link = self.VolumeControls[sender][4]
dbmeter = self.VolumeControls[sender][5]
#db = self.vol2dbstr(vol)
#self.hw.setContignuous(path, db, idx)
self.hw.setContignuous(path, vol, idx)
dbmeter.setText(self.vol2dbstr(vol))
self.VolumeControls[sender][6] = vol
if link.isChecked():
pair.setValue(vol)
def updateSelector(self, state):
sender = self.sender()
path = self.SelectorControls[sender]
self.hw.setDiscrete(path, state)
# if path == '/Mixer/Selector_7'
# ctrl = self.VolumeControls['line78']
# vol = self.hw.getContignuous(ctrl[0]) # Recall volume for selected channel *******************************************************
# name = 'line78'
# log.debug("%s volume is %d" % (name , vol))
# ctrl[1].setValue(-vol)
def vol2dbstr(self, vol):
vol = vol + 25600
if vol == 0 :
return "- "+u"\u221E"+" dB"
return str("{0:.2f}".format(log10( float(abs(vol) + 0.001) / 25600 ) * 20))+"dB"
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/rme.py 0000644 0001750 0000144 00000072224 13167773265 021613 0 ustar jwoithe users #
# Copyright (C) 2009, 2011 by Jonathan Woithe
#
# 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 .
#
# from PyQt4 import QtGui
# from PyQt4.QtCore import QObject, Qt, QTimer
# from PyQt4.QtGui import QWidget, QApplication, QVBoxLayout
from ffado.import_pyqt import *
from ffado.config import *
from ffado.widgets.matrixmixer import MatrixMixer
import logging
log = logging.getLogger('rme')
# Model defines. These must agree with what is used in rme_avdevice.h.
RME_MODEL_NONE = 0x0000
RME_MODEL_FF800 = 0x0001
RME_MODEL_FF400 = 0x0002
class Rme(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/rme", self)
self.init()
def init(self):
self.PhantomSwitches={
self.phantom_0: ['/Control/Phantom', 0],
self.phantom_1: ['/Control/Phantom', 1],
self.phantom_2: ['/Control/Phantom', 2],
self.phantom_3: ['/Control/Phantom', 3],
}
self.Switches={
self.ff400_chan3_opt_instr: ['/Control/Chan3_opt_instr'],
self.ff400_chan3_opt_pad: ['/Control/Chan3_opt_pad'],
self.ff400_chan4_opt_instr: ['/Control/Chan4_opt_instr'],
self.ff400_chan4_opt_pad: ['/Control/Chan4_opt_pad'],
self.spdif_output_optical: ['/Control/SPDIF_output_optical', 0],
self.spdif_output_emphasis: ['/Control/SPDIF_output_emphasis', 0],
self.spdif_output_pro: ['/Control/SPDIF_output_pro', 0],
self.spdif_output_nonaudio: ['/Control/SPDIF_output_nonaudio', 0],
}
self.Radiobuttons={
self.level_in_lo_gain: ['/Control/Input_level', 0],
self.level_in_p4dBu: ['/Control/Input_level', 2],
self.level_in_m10dBV: ['/Control/Input_level', 1],
self.level_out_hi_gain: ['/Control/Output_level', 2],
self.level_out_p4dBu: ['/Control/Output_level', 1],
self.level_out_m10dBV: ['/Control/Output_level', 0],
self.spdif_input_coax: ['/Control/SPDIF_input_mode', 0],
self.spdif_input_optical: ['/Control/SPDIF_input_mode', 1],
self.phones_hi_gain: ['/Control/Phones_level', 0],
self.phones_p4dBu: ['/Control/Phones_level', 1],
self.phones_m10dBV: ['/Control/Phones_level', 2],
self.clock_mode_autosync: ['/Control/Clock_mode', 1],
self.clock_mode_master: ['/Control/Clock_mode', 0],
self.sync_ref_wordclk: ['/Control/Sync_ref', 0],
self.sync_ref_adat1: ['/Control/Sync_ref', 1],
self.sync_ref_adat2: ['/Control/Sync_ref', 2],
self.sync_ref_spdif: ['/Control/Sync_ref', 3],
self.sync_ref_tco: ['/Control/Sync_ref', 4],
# TCO controls
self.sync_source_ltc: ['/Control/Tco_sync_src', 0],
self.sync_source_video: ['/Control/Tco_sync_src', 1],
self.sync_source_wordclk: ['/Control/Tco_sync_src', 2],
self.frame_rate_24fps: ['/Control/Tco_frame_rate', 0],
self.frame_rate_25fps: ['/Control/Tco_frame_rate', 1],
self.frame_rate_29_97fps: ['/Control/Tco_frame_rate', 2],
self.frame_rate_29_97dfps: ['/Control/Tco_frame_rate', 3],
self.frame_rate_30fps: ['/Control/Tco_frame_rate', 4],
self.frame_rate_30dfps: ['/Control/Tco_frame_rate', 5],
self.sample_rate_44k1: ['/Control/Tco_sample_rate', 0],
self.sample_rate_48k: ['/Control/Tco_sample_rate', 1],
self.sample_rate_0pc: ['/Control/Tco_sample_rate_ofs', 0],
self.sample_rate_p01pc: ['/Control/Tco_sample_rate_ofs', 1],
self.sample_rate_n01pc: ['/Control/Tco_sample_rate_ofs', 2],
self.sample_rate_p40pc: ['/Control/Tco_sample_rate_ofs', 3],
self.sample_rate_n40pc: ['/Control/Tco_sample_rate_ofs', 4],
self.wordclk_conv_1_1: ['/Control/Tco_word_clk_conv', 0],
self.wordclk_conv_44k1_48k: ['/Control/Tco_word_clk_conv', 1],
self.wordclk_conv_48k_44k1: ['/Control/Tco_word_clk_conv', 2],
}
self.Checkboxes={
self.ch1_instr_fuzz: ['/Control/Chan1_instr_opts', 0x04],
self.ch1_instr_limiter: ['/Control/Chan1_instr_opts', 0x08],
self.ch1_instr_filter: ['/Control/Chan1_instr_opts', 0x02],
# TCO controls
self.video_input_termination_on: ['/Control/Tco_video_in_term', 0x01],
}
self.Gains={
self.gain_mic1: ['/Control/Gains', 0],
self.gain_mic2: ['/Control/Gains', 1],
self.gain_input3: ['/Control/Gains', 2],
self.gain_input4: ['/Control/Gains', 3],
}
self.Combos={
self.ff800_ch1_src: ['/Control/Chan1_source'],
self.ff800_ch7_src: ['/Control/Chan7_source'],
self.ff800_ch8_src: ['/Control/Chan8_source'],
}
self.CommandButtons={
self.control_load: ['/Control/Flash_control', 0],
self.control_save: ['/Control/Flash_control', 1],
self.mixer_load: ['/Control/Flash_control', 2],
self.mixer_save: ['/Control/Flash_control', 3],
self.mixer_preset_ffado_default: ['/Control/Mixer_preset', 0],
}
# Other mixer variables
self.is_streaming = 0
self.sample_rate = 0
self.model = 0
self.tco_present = 0
# Public slot: update phantom power hardware switches
def updatePhantomSwitch(self, a0):
sender = self.sender()
# Value is the phantom switch value, with a corresponding enable
# bit in the high 16 bit word
val = (a0 << self.PhantomSwitches[sender][1]) | (0x00010000 << self.PhantomSwitches[sender][1])
log.debug("phantom switch %d set to %d" % (self.PhantomSwitches[sender][1], a0))
self.hw.setDiscrete(self.PhantomSwitches[sender][0], val)
# Public slot: update generic switches
def updateSwitch(self, a0):
sender = self.sender()
log.debug("switch %s set to %d" % (self.Switches[sender][0], a0))
self.hw.setDiscrete(self.Switches[sender][0], a0)
# Public slot: update generic radiobuttons
def updateRadiobutton(self, a0):
sender = self.sender()
if (a0 != 0):
# Only change the control state on a button being "checked"
log.debug("radiobutton group %s set to %d" % (self.Radiobuttons[sender][0], self.Radiobuttons[sender][1]))
self.hw.setDiscrete(self.Radiobuttons[sender][0], self.Radiobuttons[sender][1])
def updateCheckboxes(self, a0):
sender = self.sender()
val = self.hw.getDiscrete(self.Checkboxes[sender][0]);
if (a0 != 0):
val = val | self.Checkboxes[sender][1]
else:
val = val & ~self.Checkboxes[sender][1]
log.debug("checkbox group %s set to %d" % (self.Checkboxes[sender][0], val));
self.hw.setDiscrete(self.Checkboxes[sender][0], val)
# Public slot: update gains
def updateGain(self, a0):
sender = self.sender()
log.debug("gain %s[%d] set to %d" % (self.Gains[sender][0], self.Gains[sender][1], a0))
self.hw.setMatrixMixerValue(self.Gains[sender][0], 0, self.Gains[sender][1], a0)
def updateBandwidthLimit(self, a0):
# Account for the "No ADAT-2" item which will not be present on
# a FF400.
if (self.model==RME_MODEL_FF400 and a0>0):
a0 = a0 + 1
# log.debug("limit update: %d" % (a0));
self.hw.setDiscrete('/Control/Bandwidth_limit', a0);
# Public slot: send command
def sendCommand(self, a0):
sender = self.sender()
log.debug("command %d sent to %s" % (self.CommandButtons[sender][1], self.CommandButtons[sender][0]))
self.hw.setDiscrete(self.CommandButtons[sender][0], self.CommandButtons[sender][1])
# If mixer values have been reloaded, refresh the mixer GUI. This
# will also commit the new values to the hardware via the "changed"
# signal handlers of the mixer elements.
if (self.CommandButtons[sender][1] == 2):
self.inputmatrix.refreshValues()
self.outputmatrix.refreshValues()
self.playbackmatrix.refreshValues()
# If settings have been reloaded from flash, refresh the GUI. The
# settings will be made active in the hardware via the "changed"
# signal handlers of the respective GUI control widgets.
if (self.CommandButtons[sender][1] == 0):
self.getValuesFromFF()
def updateCombo(self, a0):
sender = self.sender()
log.debug("combo %s set to %d" % (self.Combos[sender][0], a0))
self.hw.setDiscrete(self.Combos[sender][0], a0)
# Enable the limiter control only when the front source is active
if (sender == self.ff800_ch1_src):
self.ch1_instr_limiter.setEnabled(a0==0)
def updateStreamingState(self):
ss = self.streamingstatus.selected()
ss_txt = self.streamingstatus.getEnumLabel(ss)
if ss_txt != 'Idle':
self.is_streaming = True
else:
self.is_streaming = False
if (self.last_streaming_state != self.is_streaming):
self.bandwidth_limit.setEnabled(not(self.is_streaming));
self.control_load.setEnabled(not(self.is_streaming));
self.last_streaming_state = self.is_streaming
def status_update(self):
# log.debug("timer event")
self.updateStreamingState()
clk_mode = ['Master', 'Slave']
src_str = ['None', 'ADAT 1', 'ADAT 2', 'SPDIF', 'Wordclock', 'TCO']
sync_stat = ['No lock', 'Locked', 'Synced']
sysclock_mode = self.hw.getDiscrete('/Control/sysclock_mode')
sysclock_freq = self.hw.getDiscrete('/Control/sysclock_freq')
autosync_freq = self.hw.getDiscrete('/Control/autosync_freq')
autosync_src = self.hw.getDiscrete('/Control/autosync_src')
sync_status = self.hw.getDiscrete('/Control/sync_status')
spdif_freq = self.hw.getDiscrete('/Control/spdif_freq')
self.sysclock_freq.setText("%d Hz" % (sysclock_freq))
self.sysclock_mode.setText(clk_mode[sysclock_mode])
self.autosync_freq.setText("%d Hz" % (autosync_freq))
self.autosync_src.setText(src_str[autosync_src])
self.sync_check_adat1_status.setText(sync_stat[sync_status & 0x03])
self.sync_check_adat2_status.setText(sync_stat[(sync_status >> 2) & 0x03])
self.sync_check_spdif_status.setText(sync_stat[(sync_status >> 4) & 0x03])
self.sync_check_wclk_status.setText(sync_stat[(sync_status >> 6) & 0x03])
self.sync_check_tco_status.setText(sync_stat[(sync_status >> 8) & 0x03])
self.spdif_freq.setText("%d Hz" % (spdif_freq))
if (self.tco_present):
ltc_valid_str = ['Not detected', 'Valid']
ltc_framerate_str = ['24 fps', '25 fps', '29.97 fps', '30 fps']
ltc_frametype_str = ['Normal (full frame)', 'Dropframe']
video_type_str = ['No video', 'PAL', 'NTSC']
word_clock_str = ['None', 'Single Speed', 'Double Speed', 'Quad Speed']
status_str = ['Not locked', "Locked"]
ltc = self.hw.getDiscrete('/Control/Tco_ltc_in')
ltc_valid = self.hw.getDiscrete('/Control/Tco_input_ltc_valid')
ltc_fps = self.hw.getDiscrete('/Control/Tco_input_ltc_fps')
ltc_dropframe = self.hw.getDiscrete('/Control/Tco_input_ltc_dropframe')
videotype = self.hw.getDiscrete('/Control/Tco_input_video_type')
wordclk = self.hw.getDiscrete('/Control/Tco_input_word_clk')
input_lock = self.hw.getDiscrete('/Control/Tco_input_lock')
tco_freq = self.hw.getDiscrete('/Control/Tco_freq')
self.state_ltc_valid_label.setText(ltc_valid_str[ltc_valid])
if (ltc_valid):
self.ltc_in_hours.setText("%02d" % (ltc >> 24))
self.ltc_in_minutes.setText("%02d" % ((ltc >> 16) & 0xff))
self.ltc_in_seconds.setText("%02d" % ((ltc >> 8) & 0xff))
self.ltc_in_frames.setText("%02d" % (ltc & 0xff))
self.state_ltc_framerate.setText(ltc_framerate_str[ltc_fps])
self.state_ltc_frame_type.setText(ltc_frametype_str[ltc_dropframe])
else:
self.ltc_in_hours.setText("--")
self.ltc_in_minutes.setText("--")
self.ltc_in_seconds.setText("--")
self.ltc_in_frames.setText("--")
self.state_ltc_framerate.setText("-")
self.state_ltc_frame_type.setText("-")
self.state_video_type.setText(video_type_str[videotype])
self.state_word_clk.setText(word_clock_str[wordclk])
self.sync_source_status.setText(status_str[input_lock])
self.tco_frequency_label.setText("%d Hz" % (tco_freq))
# Hide and disable a control
def disable_hide(self,widget):
for w in widget.children():
if isinstance(w, QWidget):
w.hide()
w.setEnabled(False)
widget.hide()
widget.setEnabled(False)
def setupSignals(self):
# Connect signal handlers for all command buttons
for ctrl, info in self.CommandButtons.items():
if (not(ctrl.isEnabled())):
continue
ctrl.clicked.connect(self.sendCommand)
for ctrl, info in self.Combos.items():
if (not(ctrl.isEnabled())):
continue;
ctrl.currentIndexChanged.connect(self.updateCombo)
self.bandwidth_limit.currentIndexChanged.connect(self.updateBandwidthLimit)
# Get current hardware values and connect GUI element signals to
# their respective slots
for ctrl, info in self.PhantomSwitches.items():
if (not(ctrl.isEnabled())):
continue
ctrl.toggled.connect(self.updatePhantomSwitch)
for ctrl, info in self.Switches.items():
if (not(ctrl.isEnabled())):
continue
ctrl.toggled.connect(self.updateSwitch)
for ctrl, info in self.Radiobuttons.items():
if (not(ctrl.isEnabled())):
continue;
ctrl.toggled.connect(self.updateRadiobutton)
for ctrl, info in self.Checkboxes.items():
if (not(ctrl.isEnabled())):
continue;
ctrl.toggled.connect(self.updateCheckboxes)
for ctrl, info in self.Gains.items():
if (not(ctrl.isEnabled())):
continue
ctrl.valueChanged.connect(self.updateGain)
# Obtain control values from the Fireface and make the GUI reflect these
def getValuesFromFF(self):
for ctrl, info in self.Combos.items():
if (not(ctrl.isEnabled())):
continue;
val = self.hw.getDiscrete(info[0])
log.debug("combo %s is %d" % (info[0], val));
ctrl.setCurrentIndex(val);
# Set the bandwidth limit control to reflect the current device
# setting, allowing for the additional "No ADAT-2" item which is
# present on the FF800.
val = self.hw.getDiscrete('/Control/Bandwidth_limit')
if (self.model==RME_MODEL_FF400 and val>1):
val = val - 1
self.bandwidth_limit.setCurrentIndex(val);
# Get current hardware values
for ctrl, info in self.PhantomSwitches.items():
if (not(ctrl.isEnabled())):
continue
val = (self.hw.getDiscrete(info[0]) >> info[1]) & 0x01
log.debug("phantom switch %d is %d" % (info[1], val))
if val:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
for ctrl, info in self.Switches.items():
if (not(ctrl.isEnabled())):
continue
val = self.hw.getDiscrete(info[0])
log.debug("switch %s is %d" % (info[0], val))
if val:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
for ctrl, info in self.Radiobuttons.items():
if (not(ctrl.isEnabled())):
continue;
# This is a touch wasteful since it means we retrieve the control
# value once per radio button rather than once per radio button
# group. In time we might introduce radiobutton groupings in the
# self.* datastructures to avoid this, but for the moment this is
# easy and it works.
val = self.hw.getDiscrete(info[0])
if (val == info[1]):
val = 1
else:
val = 0
ctrl.setChecked(val)
log.debug("Radiobutton %s[%d] is %d" % (info[0], info[1], val))
# Make sure the Limiter control can receive a value
if (self.ff800_ch1_src.isEnabled()):
self.ch1_instr_limiter.setEnabled(1)
for ctrl, info in self.Checkboxes.items():
if (not(ctrl.isEnabled())):
continue;
# This is a touch wasteful since it means we retrieve the control
# value once per checkbox button rather than once per checkbox
# group. In time we might introduce checkbox groupings in the
# self.* datastructures to avoid this, but for the moment this is
# easy and it works.
val = self.hw.getDiscrete(info[0])
if (val & info[1]):
val = 1
else:
val = 0
ctrl.setChecked(val)
log.debug("Checkbox %s[%d] is %d" % (info[0], info[1], val))
# The limiter (a checkbox) can only be controlled if the front
# source is selected for channel 1.
ch1_src = self.ff800_ch1_src.currentIndex()
if (self.ff800_ch1_src.isEnabled()):
self.ch1_instr_limiter.setEnabled(ch1_src==0)
for ctrl, info in self.Gains.items():
if (not(ctrl.isEnabled())):
continue
val = self.hw.getMatrixMixerValue(info[0], 0, info[1])
log.debug("gain %s[%d] is %d" % (info[0], info[1], val))
ctrl.setValue(val);
def initValues(self):
# print( self.hw.servername )
# print( self.hw.basepath )
self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True)
layout = QVBoxLayout()
layout.addWidget(self.inputmatrix)
self.mixer.setLayout(layout)
self.playbackmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/PlaybackFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/PlaybackMutes", self.hw.basepath+"/Mixer/PlaybackInverts", True)
layout = QVBoxLayout()
layout.addWidget(self.playbackmatrix)
self.playbackmixer.setLayout(layout)
self.outputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/OutputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/OutputMutes", None, True)
layout = QVBoxLayout()
# This is a bit of a hack, but it works to ensure this single-row
# matrix mixer doesn't fill the entire screen but also doesn't end
# up with a pointless scrollbar. The matrix mixer's minimum height
# is 0 according to minimumHeight(), which is probably the
# fundamental issue here; however, I've already wasted too much time
# trying to get this to work so if the hack is effective we'll run
# with it.
self.outputmatrix.setMinimumHeight(150)
layout.addWidget(self.outputmatrix, 0, Qt.AlignTop)
self.outputmixer.setLayout(layout)
self.is_streaming = False
self.last_streaming_state = False
# Disable the "load settings" button if streaming is active. Its
# enable state will be kept up to date by updateStreamingState().
self.control_load.setEnabled(not(self.is_streaming))
# Also disable other controls which are not yet implemented.
self.mixer_preset_ffado_default.setEnabled(False)
# Retrieve other device settings as needed and customise the UI
# based on these options.
self.model = self.hw.getDiscrete('/Control/Model')
log.debug("device model identifier: %d" % (self.model))
self.tco_present = self.hw.getDiscrete('/Control/TCO_present')
log.debug("device has TCO: %d" % (self.tco_present))
#self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate')
#log.debug("device sample rate: %d" % (self.sample_rate))
# Assume the TCO options tab is the second from the left (index 1)
if (not(self.tco_present)):
self.disable_hide(self.tco_options);
self.tabWidget.setTabEnabled(1, False)
self.tabWidget.removeTab(1)
# The Fireface-400 only has 2 phantom-capable channels
if (self.model == RME_MODEL_FF400):
self.disable_hide(self.phantom_2)
self.disable_hide(self.phantom_3)
else:
self.phantom_0.setText("Mic 7")
self.phantom_1.setText("Mic 8")
self.phantom_2.setText("Mic 9")
self.phantom_3.setText("Mic 10")
# Instrument options, input jack selection controls and an ADAT2
# input are applicable only to the FF800
if (self.model != RME_MODEL_FF800):
self.instrument_options_group.setEnabled(False)
self.input_plug_select_group.setEnabled(False)
self.sync_ref_adat2.setEnabled(False)
self.sync_check_adat2_label.setEnabled(False)
self.sync_check_adat2_status.setEnabled(False)
self.spdif_output_optical.setText("ADAT optical")
self.spdif_input_optical.setText("ADAT optical")
if (not(self.tco_present)):
self.sync_check_tco_label.setEnabled(False)
self.sync_check_tco_status.setEnabled(False)
self.sync_ref_tco.setEnabled(False)
# Only the FF400 has specific channel 3/4 options, input gain
# controls and switchable phones level
if (self.model != RME_MODEL_FF400):
# Hide the upper-level frame (and everything in it) to ensure it
# requests no vertical space when its contents aren't needed.
self.disable_hide(self.igains_chan34_opts_frame)
self.phones_level_group.setEnabled(False)
# Add the "No ADAT-2" item to the bandwidth limit control if the
# device is not a FF400.
if (self.model != RME_MODEL_FF400):
self.bandwidth_limit.insertItem(1, "No ADAT-2")
self.getValuesFromFF()
self.setupSignals()
# Ensure the limiter checkbox has a signal handler associated with
# it. If getValuesFromFF() disabled it because the front input was
# not selected, setupSignals() would not have configured a handler.
if (not(self.ch1_instr_limiter.isEnabled())):
self.ch1_instr_limiter.toggled.connect(self.updateCheckboxes)
self.updateStreamingState()
#log.debug("device streaming flag: %d" % (self.is_streaming))
self.update_timer = QTimer(self)
self.update_timer.timeout.connect(self.status_update)
self.update_timer.start(1000)
def saveSettings(self, indent):
saveString = []
idt = indent + " "
saveString.append('%s\n' % indent)
saveString.extend(self.inputmatrix.saveSettings(idt))
# Do not forget to mention the adopted rule for matrix columns mixer
# This might be useful for future import function
saveString.append("%s \n" % indent)
saveString.append("%s Columns_are_inputs\n" % indent)
saveString.append("%s \n" % indent)
saveString.append('%s\n' % indent)
saveString.append('%s\n' % indent)
saveString.extend(self.playbackmatrix.saveSettings(idt))
# Do not forget to mention the adopted rule for matrix columns mixer
# This might be useful for future import function
saveString.append("%s \n" % indent)
saveString.append("%s Columns_are_inputs\n" % indent)
saveString.append("%s \n" % indent)
saveString.append('%s\n' % indent)
saveString.append('%s\n' % indent)
saveString.extend(self.outputmatrix.saveSettings(idt))
# Do not forget to mention the adopted rule for matrix columns mixer
# This might be useful for future import function
saveString.append("%s \n" % indent)
saveString.append("%s Columns_are_inputs\n" % indent)
saveString.append("%s \n" % indent)
saveString.append('%s\n' % indent)
return saveString
def readSettings(self, readString):
try:
idxb = readString.index('')
idxe = readString.index('')
except Exception:
log.debug("No Input matrix settings found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb + 1:
stringMixer = []
for s in readString[idxb+1:idxe]:
stringMixer.append(s)
# When trying to import from a different device, the rule for column interpretation is
# not necessarily the same
try:
idx = stringMixer.index('')
except Exception:
log.debug('Do not know how to handle column versus input/output')
idx = -1
transpose_coeff = False
if idx >=0:
if stringMixer[idx+1].find("Columns_are_inputs") == -1:
log.debug('Transposing the matrix coefficient; you are importing, are not you ?')
transpose_coeff = True
if self.inputmatrix.readSettings(stringMixer, transpose_coeff):
log.debug("Input matrix settings modified")
del stringMixer
try:
idxb = readString.index('')
idxe = readString.index('')
except Exception:
log.debug("No Plaback matrix settings found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb + 1:
stringMixer = []
for s in readString[idxb+1:idxe]:
stringMixer.append(s)
# When trying to import from a different device, the rule for column interpretation is
# not necessarily the same
try:
idx = stringMixer.index('')
except Exception:
log.debug('Do not know how to handle column versus input/output')
idx = -1
transpose_coeff = False
if idx >=0:
if stringMixer[idx+1].find("Columns_are_inputs") == -1:
log.debug('Transposing the matrix coefficient; you are importing, are not you ?')
transpose_coeff = True
if self.playbackmatrix.readSettings(stringMixer, transpose_coeff):
log.debug("Plaback matrix settings modified")
del stringMixer
try:
idxb = readString.index('')
idxe = readString.index('')
except Exception:
log.debug("No Output matrix settings found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb + 1:
stringMixer = []
for s in readString[idxb+1:idxe]:
stringMixer.append(s)
# When trying to import from a different device, the rule for column interpretation is
# not necessarily the same
try:
idx = stringMixer.index('')
except Exception:
log.debug('Do not know how to handle column versus input/output')
idx = -1
transpose_coeff = False
if idx >=0:
if stringMixer[idx+1].find("Columns_are_inputs") == -1:
log.debug('Transposing the matrix coefficient; you are importing, are not you ?')
transpose_coeff = True
if self.outputmatrix.readSettings(stringMixer, transpose_coeff):
log.debug("Output matrix settings modified")
del stringMixer
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire_dice.py 0000644 0001750 0000144 00000046352 13150451613 023414 0 ustar jwoithe users #
# Copyright (C) 2009-2010 by Arnold Krille
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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 .
#
# from PyQt4 import QtGui, QtCore, Qt
# from PyQt4.QtGui import QWidget, QScrollArea
from ffado.import_pyqt import *
import dbus
from ffado.widgets.matrixmixer import MatrixMixer
from ffado.widgets.crossbarrouter import *
from ffado.mixer.generic_dice_eap import *
from ffado.config import *
class BooleanControl:
def __init__(self, hw, path):
if bypassdbus:
self.value = False
return
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 bypassdbus:
return False
if self.iface.select(n):
self.value = n
return True
return False
class DiscreteControl:
def __init__(self, hw, path):
if bypassdbus:
self.value = 0
return
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 Saffire_Dice(Generic_Dice_EAP):
def __init__(self, parent=None):
Generic_Dice_EAP.__init__(self, parent)
def buildMixer(self):
#print( self.hw )
#print( self.hw.getText("/Generic/Nickname") )
Generic_Dice_EAP.buildMixer(self)
widget = QWidget()
ModelName = self.configrom.getModelName().rstrip()
if ffado.config.bypassdbus:
# A hack for the bypassdbus case, where ModelName has a slightly
# different format. Rather than using the name as returned by
# the device (eg: "SAFFIRE_PRO_40"), the name is taken from the
# configuration file desciption (eg: "Saffire PRO 40").
if ModelName[-2:] == "-1":
ModelName = ModelName[:-2]
if ModelName[-4:] == " DSP":
ModelName = ModelName[:-4]
ModelNum = ModelName[-2:]
ModelName = "SAFFIRE_PRO"
if ModelNum != "26":
ModelName += "_"
ModelName += ModelNum
print( ModelName )
if ModelName == "SAFFIRE_PRO_14":
uicLoad("ffado/mixer/Saffire_Pro14_monitoring.ui", widget)
elif ModelName == "SAFFIRE_PRO_24" or self.configrom.getModelName() == "SAFFIRE_PRO_24DSP":
uicLoad("ffado/mixer/Saffire_Pro24_monitoring.ui", widget)
elif ModelName == "SAFFIRE_PRO26":
uicLoad("ffado/mixer/Saffire_Pro26_monitoring.ui", widget)
elif ModelName == "SAFFIRE_PRO_40":
uicLoad("ffado/mixer/Saffire_Pro40_monitoring.ui", widget)
# Add Monitoring to ffado-mixer panels
scrollarea = QScrollArea(self.tabs)
scrollarea.setWidgetResizable(False)
scrollarea.setWidget(widget)
self.tabs.addTab(scrollarea, "Monitoring")
# Global settings
self.muteInterface = BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalMute/State")
widget.GlobalMute.setChecked(self.muteInterface.selected())
widget.GlobalMute.toggled.connect(self.muteToggle)
self.dimInterface = BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalDim/State")
widget.GlobalDim.setChecked(self.dimInterface.selected())
widget.GlobalDim.toggled.connect(self.dimToggle)
self.dimLevelInterface = DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/GlobalDim/Level")
widget.DimLevel.setValue(self.dimLevelInterface.getvalue())
widget.DimLevel.valueChanged.connect(self.dimLevelChanged)
self.DimLevel = widget.DimLevel
widget.DimLevel.setEnabled(self.dimInterface.selected())
# Per line monitoring
from collections import namedtuple
LineInfo = namedtuple('LineInfo', ['widget','Interface'])
self.nbLines = 4
self.LineMonos = []
if ModelName != "SAFFIRE_PRO26":
# TODO: is this redundant on any other interface?
# Mono/Stereo Switch
p = LineInfo(widget.Mono_12, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/Mono/Line1Line2"))
self.LineMonos.append(p)
p = LineInfo(widget.Mono_34, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/Mono/Line3Line4"))
self.LineMonos.append(p)
# Volume Unactivating
self.LineUnActivates = []
p = LineInfo(widget.LineUnActivate_1, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate1"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate2"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_3, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate3"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate4"))
self.LineUnActivates.append(p)
# Mute
self.LineMutes = []
p = LineInfo(widget.LineMute_1, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute1"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute2"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_3, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute3"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute4"))
self.LineMutes.append(p)
# per line Global Mute switch
self.LineGMutes = []
p = LineInfo(widget.LineGMute_1, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute1"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute2"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_3, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute3"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute4"))
self.LineGMutes.append(p)
# per line Global Dim switch
self.LineGDims = []
p = LineInfo(widget.LineGDim_1, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim1"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim2"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_3, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim3"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim4"))
self.LineGDims.append(p)
# Volume
self.LineVolumes = []
p = LineInfo(widget.LineVolume_1, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume1"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_2, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume2"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_3, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume3"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_4, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume4"))
self.LineVolumes.append(p)
if ModelName != "SAFFIRE_PRO_14":
self.nbLines = 6
if ModelName != "SAFFIRE_PRO26":
# Mono/Stereo Switch
p = LineInfo(widget.Mono_56, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/Mono/Line5Line6"))
self.LineMonos.append(p)
# Volume Unactivating
p = LineInfo(widget.LineUnActivate_5, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate5"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_6, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate6"))
self.LineUnActivates.append(p)
# Mute
p = LineInfo(widget.LineMute_5, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute5"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_6, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute6"))
self.LineMutes.append(p)
# per line Global Mute switch
p = LineInfo(widget.LineGMute_5, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute5"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_6, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute6"))
self.LineGMutes.append(p)
# per line Global Dim switch
p = LineInfo(widget.LineGDim_5, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim5"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_6, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim6"))
self.LineGDims.append(p)
# Volume
p = LineInfo(widget.LineVolume_5, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume5"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_6, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume6"))
self.LineVolumes.append(p)
if ModelName == "SAFFIRE_PRO_40":
self.nbLines = 10
# Mono/Stereo Switch
p = LineInfo(widget.Mono_78, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/Mono/Line7Line8"))
self.LineMonos.append(p)
p = LineInfo(widget.Mono_910, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/Mono/Line9Line10"))
self.LineMonos.append(p)
# Volume Unactivating
p = LineInfo(widget.LineUnActivate_7, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate7"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_8, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate8"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_9, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate9"))
self.LineUnActivates.append(p)
p = LineInfo(widget.LineUnActivate_10, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/UnActivate10"))
self.LineUnActivates.append(p)
# Mute
p = LineInfo(widget.LineMute_7, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute7"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_8, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute8"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_9, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute9"))
self.LineMutes.append(p)
p = LineInfo(widget.LineMute_10, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Mute10"))
self.LineMutes.append(p)
# per line Global Mute switch
p = LineInfo(widget.LineGMute_7, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute7"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_8, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute8"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_9, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute9"))
self.LineGMutes.append(p)
p = LineInfo(widget.LineGMute_10, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GMute10"))
self.LineGMutes.append(p)
# per line Global Dim switch
p = LineInfo(widget.LineGDim_7, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim7"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_8, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim8"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_9, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim9"))
self.LineGDims.append(p)
p = LineInfo(widget.LineGDim_10, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/GDim10"))
self.LineGDims.append(p)
# Volume
p = LineInfo(widget.LineVolume_7, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume7"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_8, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume8"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_9, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume9"))
self.LineVolumes.append(p)
p = LineInfo(widget.LineVolume_10, DiscreteControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineOut/Volume10"))
self.LineVolumes.append(p)
# Adat/Spdif switch control from interface for Pro40
self.adatSpdifInterface = BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/AdatSpdif/State")
widget.AdatSpdif.setChecked(self.adatSpdifInterface.selected())
widget.AdatSpdif.toggled.connect(self.adatSpdifToggle)
if ModelName in ("SAFFIRE_PRO_14", "SAFFIRE_PRO_24"):
# Line/Inst and Hi/Lo switches for Pro14 and 24
widget.LineInSwitches.setVisible(True)
self.LineInSwitches = []
p = LineInfo(widget.LineInSwitchInst_1, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineInstGain/LineInst1"))
self.LineInSwitches.append(p)
p = LineInfo(widget.LineInSwitchInst_2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineInstGain/LineInst2"))
self.LineInSwitches.append(p)
p = LineInfo(widget.LineInSwitchHi_3, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineInstGain/LineGain3"))
self.LineInSwitches.append(p)
p = LineInfo(widget.LineInSwitchHi_4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Monitoring/LineInstGain/LineGain4"))
self.LineInSwitches.append(p)
for i in range(4):
self.LineInSwitches[i].widget.setChecked(self.LineInSwitches[i].Interface.selected())
self.LineInSwitches[i].widget.toggled.connect(self.LineInSwitches[i].Interface.select)
widget.LineInSwitchLine_1.setChecked(not self.LineInSwitches[0].Interface.selected())
widget.LineInSwitchLine_2.setChecked(not self.LineInSwitches[1].Interface.selected())
widget.LineInSwitchLo_3.setChecked(not self.LineInSwitches[2].Interface.selected())
widget.LineInSwitchLo_4.setChecked(not self.LineInSwitches[3].Interface.selected())
# Mono/Stereo Switch
if ModelName != "SAFFIRE_PRO26":
for i in range(int(self.nbLines/2)):
self.LineMonos[i].widget.setChecked(self.LineMonos[i].Interface.selected())
self.LineMonos[i].widget.toggled.connect(self.LineMonos[i].Interface.select)
for i in range(self.nbLines):
self.LineUnActivates[i].widget.setChecked(self.LineUnActivates[i].Interface.selected())
self.LineUnActivates[i].widget.toggled.connect(self.LineUnActivates[i].Interface.select)
self.LineMutes[i].widget.setChecked(self.LineMutes[i].Interface.selected())
self.LineMutes[i].widget.toggled.connect(self.LineMutes[i].Interface.select)
self.LineGMutes[i].widget.setChecked(self.LineGMutes[i].Interface.selected())
self.LineGMutes[i].widget.toggled.connect(self.LineGMutes[i].Interface.select)
self.LineGDims[i].widget.setChecked(self.LineGDims[i].Interface.selected())
self.LineGDims[i].widget.toggled.connect(self.LineGDims[i].Interface.select)
self.LineVolumes[i].widget.setValue(self.LineVolumes[i].Interface.getvalue())
self.LineVolumes[i].widget.valueChanged.connect(self.LineVolumes[i].Interface.setvalue)
# HW switch controls the possibility of monitoring each output separatly
widget.HWSwitch.setChecked(self.HWselected())
widget.HWSwitch.toggled.connect(self.HWToggle)
# Line Out monitoring enabling depends on H/W switch
self.LineOut = widget.LineOut
self.LineOut.setEnabled(self.HWselected())
def muteToggle(self, mute):
self.muteInterface.select(mute)
def dimToggle(self, dim):
self.dimInterface.select(dim)
self.DimLevel.setEnabled(dim)
def adatSpdifToggle(self, spdif):
self.adatSpdifInterface.select(spdif)
# FIXME
# Here we should consider that router configuration has changed inside the device
# so that the device has to be rediscovered by the dbus (as it is the case when
self.onSamplerateChange()
def HWToggle(self, HW):
for i in range(self.nbLines):
self.LineUnActivates[i].widget.setChecked(not HW)
self.LineMutes[i].widget.setChecked(False)
self.LineGMutes[i].widget.setChecked(True)
self.LineGDims[i].widget.setChecked(True)
self.LineVolumes[i].widget.setValue(0)
for i in self.LineMonos:
i.widget.setChecked(False)
self.LineOut.setEnabled(HW)
def HWselected(self):
selected = False
for i in range(self.nbLines):
if (not self.LineUnActivates[i].Interface.selected()):
selected = True
if (self.LineMutes[i].Interface.selected()):
selected = True
return selected
def dimLevelChanged(self, value):
self.dimLevelInterface.setvalue(value)
def volumeChanged(self, value):
self.volumeInterface.setvalue(value)
def getDisplayTitle(self):
return "Saffire PRO40/26/24/14 Mixer"
#
# vim: et ts=4 sw=4
libffado-2.4.2/support/mixer-qt4/ffado/mixer/mackieonyx.py 0000644 0001750 0000144 00000002123 13115514145 023145 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
class MackieOnyx(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/mackieonyx", self)
def initValues(self):
pass
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/mackieonyx.ui 0000644 0001750 0000144 00000003044 13115514145 023135 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MackieOnyxMixerUI
0
0
166
238
Mackie Onyx Mixer Control
-
No additional controls are available for the Mackie Onyx Mixer
Qt::AlignVCenter
true
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/maudio_bebob.py 0000644 0001750 0000144 00000060305 13114472141 023411 0 ustar jwoithe users #
# Copyright (c) 2013 by Takashi Sakamoto
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtCore import Qt
# from PyQt4.QtGui import QSizePolicy, QHBoxLayout, QVBoxLayout, QGroupBox
# from PyQt4.QtGui import QWidget, QTabWidget, QLabel, QSlider, QToolButton
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
import logging
log = logging.getLogger('MAudioBeBoB')
class MAudio_BeBoB_Input_Widget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
uicLoad("ffado/mixer/maudio_bebob_input", self)
class MAudio_BeBoB_Output_Widget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
uicLoad("ffado/mixer/maudio_bebob_output", self)
class MAudio_BeBoB(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
info = {
0x0000000a: (0, "Ozonic"),
0x00010062: (1, "Firewire Solo"),
0x00010060: (2, "Firewire Audiophile"),
0x00010046: (3, "Firewire 410"),
0x00010071: (4, "Firewire 1814"),
0x00010091: (4, "ProjectMix I/O"),
}
labels = (
{
"inputs": ("Analog 1/2", "Analog 3/4",
"Stream 1/2", "Stream 3/4"),
"mixers": ("Mixer 1/2", "Mixer 3/4"),
"outputs": ("Analog 1/2", "Analog 3/4")
},
{
"inputs": ("Analog 1/2", "Digital 1/2",
"Stream 1/2", "Stream 3/4"),
"mixers": ("Mixer 1/2", "Mixer 3/4"),
"outputs": ("Analog 1/2", "Digital 1/2")
},
{
"inputs": ("Analog 1/2", "Digital 1/2",
"Stream 1/2", "Stream 3/4", "Stream 5/6"),
"mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Aux 1/2"),
"outputs": ("Analog 1/2", "Analog 3/4", "Digital 1/2",
"Headphone 1/2")
},
{
"inputs": ("Analog 1/2", "Digital 1/2",
"Stream 1/2", "Stream 3/4", "Stream 5/6",
"Stream 7/8", "Stream 9/10"),
"mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Mixer 7/8",
"Mixer 9/10", "Aux 1/2"),
"outputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
"Digital 1/2", "Headphone 1/2")
},
{
"inputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
"Stream 1/2", "Stream 3/4", "S/PDIF 1/2",
"ADAT 1/2", "ADAT 3/4", "ADAT 5/6", "ADAT 7/8"),
"mixers": ("Mixer 1/2", "Mixer 3/4", "Aux 1/2"),
"outputs": ("Analog 1/2", "Analog 3/4",
"Headphone 1/2", "Headphone 3/4")
}
)
# hardware inputs and stream playbacks
# format: function_id/channel_idx/panning-able
# NOTE: function_id = channel_idx = panning-able = labels["inputs"]
inputs = (
(
(0x03, 0x04, 0x01, 0x02),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(True, True, False, False)
),
(
(0x01, 0x02, 0x04, 0x03),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(True, True, False, False)
),
(
(0x04, 0x05, 0x01, 0x02, 0x03),
((0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(True, True, False, False, False)
),
(
(0x03, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08)),
(True, True, False, False, False, False, False)
),
(
(0x01, 0x02, 0x03, 0x04, 0x0a, 0x0b, 0x05, 0x06, 0x07, 0x08, 0x09),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(True, True, True, True, False, False, True,
True, True, True, True)
)
)
# jack sources except for headphone
# format: function_id/source id
# NOTE: "function_id" = labels["output"] - "Headphone 1/2/3/4"
# NOTE: "source_id" = labels["mixer"]
jack_src = (
None,
None,
((0x01, 0x02, 0x03),
(0x00, 0x00, 0x00, 0x01)),
((0x02, 0x03, 0x04, 0x05, 0x06),
(0x00, 0x00, 0x00, 0x00, 0x00, 0x01)),
((0x03, 0x04),
(0x00, 0x01, 0x02))
)
# headphone sources
# format: sink id/source id
# NOTE: "source_id" = labels["mixer"]
hp_src = (
None,
None,
((0x04,),
(0x00, 0x01, 0x02, 0x03)),
((0x07,),
(0x02, 0x03, 0x04, 0x05, 0x06, 0x07)),
((0x01, 0x02),
(0x01, 0x02, 0x04))
)
# hardware outputs
# format: function id
# NOTE: "function_id" = labels["output"]
outputs = (
(0x05, 0x06),
(0x02, 0x03),
(0x0c, 0x0d, 0x0e, 0x0f),
(0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f),
(0x0c, 0x0d, 0x0f, 0x10)
)
# Mixer inputs/outputs
# format: function_id/out_stereo_channel_id/in_id/in_stereo_channel_id
# NOTE: function_id = out_stereo_channel_id = labels["mixers"]
# NOTE: in_id = in_stereo_channel_id = labels["inputs"]
mixers = (
(
(0x01, 0x02),
((0x01, 0x02), (0x01, 0x02)),
(0x02, 0x03, 0x00, 0x01),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
),
(
(0x01, 0x01),
((0x01, 0x02), (0x03, 0x04)),
(0x00, 0x01, 0x03, 0x02),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
),
(
(0x01, 0x02, 0x03, 0x04),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(0x03, 0x04, 0x00, 0x01, 0x02),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02))
),
(
(0x01, 0x01, 0x01, 0x01, 0x01, 0x07),
((0x01, 0x02), (0x03, 0x04),
(0x05, 0x06), (0x07, 0x08), (0x09, 0x0a), (0x01, 0x02)),
(0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00),
((0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x03, 0x04),
(0x05, 0x06), (0x07, 0x08))
),
(
(0x01, 0x02, 0x03),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
(0x01, 0x01, 0x01, 0x01,
0x02, 0x02, 0x03,
0x04, 0x04, 0x04, 0x04),
((0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08),
(0x01, 0x02), (0x03, 0x04), (0x01, 0x02),
(0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
)
)
# Aux mixer inputs/outputs
# format: function_id/input_id/input_stereo_channel_id
# NOTE: input_id = labels["inputs"]
aux = (
None,
None,
(
0x0b,
(0x09, 0x0a, 0x06, 0x07, 0x08),
((0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
),
(
0x09,
(0x07, 0x08, 0x06, 0x05, 0x05, 0x05, 0x05),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
),
(
0x0e,
(0x13, 0x14, 0x15, 0x16, 0x11, 0x12, 0x17, 0x18, 0x19, 0x1a, 0x1b),
((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
(0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
)
)
def getDisplayTitle(self):
model = self.configrom.getModelId()
return self.info[model][1]
def buildMixer(self):
self.Selectors = {}
self.Pannings = {}
self.Volumes = {}
self.Mutes = {}
self.Mixers = {}
self.FW410HP = 0
model = self.configrom.getModelId()
if model not in self.info:
return
self.id = self.info[model][0]
tabs_layout = QHBoxLayout(self)
tabs = QTabWidget(self)
self.addInputTab(tabs)
self.addMixTab(tabs)
if self.aux[self.id] is not None:
self.addAuxTab(tabs)
self.addOutputTab(tabs)
tabs_layout.addWidget(tabs)
def addInputTab(self, tabs):
tab_input = QWidget(self)
tabs.addTab(tab_input, "In")
tab_input_layout = QHBoxLayout()
tab_input.setLayout(tab_input_layout)
in_labels = self.labels[self.id]["inputs"]
in_ids = self.inputs[self.id][0]
in_pan = self.inputs[self.id][2]
for i in range(len(in_ids)):
l_idx = self.inputs[self.id][1][i][0]
r_idx = self.inputs[self.id][1][i][1]
widget = MAudio_BeBoB_Input_Widget(tab_input)
tab_input_layout.addWidget(widget)
widget.name.setText(in_labels[i])
self.Volumes[widget.l_sld] = (
"/Mixer/Feature_Volume_%d" % in_ids[i], l_idx,
widget.r_sld, r_idx,
widget.link
)
self.Volumes[widget.r_sld] = (
"/Mixer/Feature_Volume_%d" % in_ids[i], r_idx,
widget.l_sld, l_idx,
widget.link
)
self.Mutes[widget.mute] = (widget.l_sld, widget.r_sld)
if not in_pan[i]:
widget.l_pan.setDisabled(True)
widget.r_pan.setDisabled(True)
else:
self.Pannings[widget.l_pan] = (
"/Mixer/Feature_LRBalance_%d" % in_ids[i],
l_idx
)
self.Pannings[widget.r_pan] = (
"/Mixer/Feature_LRBalance_%d" % in_ids[i],
r_idx
)
tab_input_layout.addStretch()
def addMixTab(self, tabs):
tab_mix = QWidget(self)
tabs.addTab(tab_mix, "Mix")
tab_layout = QHBoxLayout()
tab_mix.setLayout(tab_layout)
in_labels = self.labels[self.id]["inputs"]
in_idxs = self.inputs[self.id][0]
mix_labels = self.labels[self.id]["mixers"]
mix_idxs = self.mixers[self.id][0]
for i in range(len(mix_idxs)):
if mix_labels[i] == 'Aux 1/2':
continue
grp = QGroupBox(tab_mix)
grp_layout = QVBoxLayout()
grp.setLayout(grp_layout)
tab_layout.addWidget(grp)
label = QLabel(grp)
grp_layout.addWidget(label)
label.setText(mix_labels[i])
label.setAlignment(Qt.AlignCenter)
label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
for j in range(len(in_idxs)):
mix_in_id = self.mixers[self.id][2][j]
button = QToolButton(grp)
grp_layout.addWidget(button)
button.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
button.setText('%s In' % in_labels[j])
button.setCheckable(True)
self.Mixers[button] = (
"/Mixer/EnhancedMixer_%d" % mix_idxs[i],
mix_in_id, j, i
)
grp_layout.addStretch()
tab_layout.addStretch()
def addAuxTab(self, tabs):
#local functions
def addLinkButton(parent, layout):
button = QToolButton(parent)
layout.addWidget(button)
button.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
button.setText('Link')
button.setCheckable(True)
return button
def addMuteButton(parent, layout):
button = QToolButton(parent)
layout.addWidget(button)
button.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
button.setText('Mute')
button.setCheckable(True)
return button
# local processing
tab_aux = QWidget(self)
tabs.addTab(tab_aux, "Aux")
layout = QHBoxLayout()
tab_aux.setLayout(layout)
aux_label = self.labels[self.id]["mixers"][-1]
aux_id = self.aux[self.id][0]
aux_in_labels = self.labels[self.id]["inputs"]
aux_in_ids = self.aux[self.id][1]
for i in range(len(aux_in_ids)):
in_ch_l = self.aux[self.id][2][i][0]
in_ch_r = self.aux[self.id][2][i][1]
grp = QGroupBox(tab_aux)
grp_layout = QVBoxLayout()
grp.setLayout(grp_layout)
layout.addWidget(grp)
label = QLabel(grp)
grp_layout.addWidget(label)
label.setText("%s\nIn" % aux_in_labels[i])
label.setAlignment(Qt.AlignCenter)
grp_sld = QGroupBox(grp)
grp_sld_layout = QHBoxLayout()
grp_sld.setLayout(grp_sld_layout)
grp_layout.addWidget(grp_sld)
l_sld = QSlider(grp_sld)
grp_sld_layout.addWidget(l_sld)
r_sld = QSlider(grp_sld)
grp_sld_layout.addWidget(r_sld)
button = addLinkButton(grp, grp_layout)
self.Volumes[l_sld] = (
"/Mixer/Feature_Volume_%d" % aux_in_ids[i], in_ch_l,
r_sld, in_ch_r,
button
)
self.Volumes[r_sld] = (
"/Mixer/Feature_Volume_%d" % aux_in_ids[i], in_ch_r,
l_sld, in_ch_l,
button
)
button = addMuteButton(grp, grp_layout)
self.Mutes[button] = (l_sld, r_sld)
grp = QGroupBox(tab_aux)
grp_layout = QVBoxLayout()
grp.setLayout(grp_layout)
layout.addWidget(grp)
label = QLabel(grp)
grp_layout.addWidget(label)
label.setText("%s\nOut" % aux_label)
label.setAlignment(Qt.AlignCenter)
grp_sld = QGroupBox(grp)
grp_sld_layout = QHBoxLayout()
grp_sld.setLayout(grp_sld_layout)
grp_layout.addWidget(grp_sld)
l_sld = QSlider(grp_sld)
grp_sld_layout.addWidget(l_sld)
r_sld = QSlider(grp_sld)
grp_sld_layout.addWidget(r_sld)
button = addLinkButton(grp, grp_layout)
self.Volumes[l_sld] = (
"/Mixer/Feature_Volume_%d" % aux_id, 1,
r_sld, 2,
button
)
self.Volumes[r_sld] = (
"/Mixer/Feature_Volume_%d" % aux_id, 2,
l_sld, 1,
button
)
button = addMuteButton(grp, grp_layout)
self.Mutes[button] = (l_sld, r_sld)
layout.addStretch()
def addOutputTab(self, tabs):
tab_out = QWidget(self)
tabs.addTab(tab_out, "Out")
layout = QHBoxLayout()
tab_out.setLayout(layout)
out_labels = self.labels[self.id]["outputs"]
out_ids = self.outputs[self.id]
mixer_labels = self.labels[self.id]["mixers"]
if self.jack_src[self.id] is None:
for i in range(len(out_ids)):
label = QLabel(tab_out)
layout.addWidget(label)
label.setText("%s Out is fixed to %s Out" %
(mixer_labels[i], out_labels[i]))
return
mixer_ids = self.jack_src[self.id][1]
for i in range(len(out_ids)):
out_label = out_labels[i]
if out_label.find('Headphone') >= 0:
continue
out_id = self.jack_src[self.id][0][i]
widget = MAudio_BeBoB_Output_Widget(tab_out)
layout.addWidget(widget)
widget.name.setText(out_label)
self.Volumes[widget.l_sld] = (
"/Mixer/Feature_Volume_%d" % out_ids[i], 1,
widget.r_sld, 2,
widget.link
)
self.Volumes[widget.r_sld] = (
"/Mixer/Feature_Volume_%d" % out_ids[i], 2,
widget.l_sld, 1,
widget.link
)
self.Mutes[widget.mute] = (widget.l_sld, widget.r_sld)
self.Selectors[widget.cmb_src] = ("/Mixer/Selector_%d" % out_id, )
for j in range(len(mixer_ids)):
if i != j and j != len(mixer_ids) - 1:
continue
widget.cmb_src.addItem("%s Out" % mixer_labels[j], mixer_ids[j])
# add headphone
hp_idx = 0
for i in range(len(out_ids)):
out_label = out_labels[i]
if out_label.find('Headphone') < 0:
continue
hp_label = self.labels[self.id]["outputs"][i]
hp_id = self.hp_src[self.id][0][hp_idx]
hp_idx += 1
mixer_labels = self.labels[self.id]["mixers"]
widget = MAudio_BeBoB_Output_Widget(tab_out)
layout.addWidget(widget)
widget.name.setText(hp_label)
mixer_labels = self.labels[self.id]["mixers"]
mixer_ids = self.mixers[self.id][0]
self.Volumes[widget.l_sld] = (
"/Mixer/Feature_Volume_%d" % out_ids[i], 1,
widget.r_sld, 2,
widget.link
)
self.Volumes[widget.r_sld] = (
"/Mixer/Feature_Volume_%d" % out_ids[i], 2,
widget.l_sld, 1,
widget.link
)
self.Mutes[widget.mute] = (widget.l_sld, widget.r_sld)
for i in range(len(mixer_ids)):
widget.cmb_src.addItem("%s Out" % mixer_labels[i], mixer_ids[i])
if self.id != 3:
self.Selectors[widget.cmb_src] = ("/Mixer/Selector_%d" % hp_id, )
else:
widget.cmb_src.activated.connect(self.update410HP)
self.FW410HP = widget.cmb_src
layout.addStretch()
def initValues(self):
for ctl, params in list(self.Selectors.items()):
path = params[0]
state = self.hw.getDiscrete(path)
ctl.setCurrentIndex(state)
ctl.activated.connect(self.updateSelector)
# Right - Center - Left
# 0x8000 - 0x0000 - 0x0001 - 0x7FFE
# ..., -1, 0, +1, ...
for ctl, params in list(self.Pannings.items()):
path = params[0]
idx = params[1]
curr = self.hw.getContignuous(path, idx)
state = -(curr / 0x7FFE) * 50 + 50
ctl.setValue(state)
ctl.valueChanged.connect(self.updatePanning)
for ctl, params in list(self.Volumes.items()):
path = params[0]
idx = params[1]
p_idx = params[3]
link = params[4]
db = self.hw.getContignuous(path, idx)
vol = self.db2vol(db)
ctl.setValue(vol)
ctl.valueChanged.connect(self.updateVolume)
# to activate link button, a pair is checked twice, sign...
pair_db = self.hw.getContignuous(path, p_idx)
if pair_db == db:
link.setChecked(True)
for ctl, params in list(self.Mutes.items()):
ctl.clicked.connect(self.updateMute)
for ctl, params in list(self.Mixers.items()):
path = params[0]
in_id = params[1]
mix_in_idx = params[2]
mix_out_idx = params[3]
in_ch_l = self.mixers[self.id][3][mix_in_idx][0]
out_ch_l = self.mixers[self.id][1][mix_out_idx][0]
# see /libffado/src/bebob/bebob_mixer.cpp
mux_id = self.getMultiplexedId(in_id, in_ch_l, out_ch_l)
curr = self.hw.getContignuous(path, mux_id)
if curr == 0:
state = True
else:
state = False
ctl.setChecked(state)
ctl.clicked.connect(self.updateMixer)
if self.id == 3:
self.read410HP()
# helper functions
def vol2db(self, vol):
return (log10(vol + 1) - 2) * 16384
def db2vol(self, db):
return pow(10, db / 16384 + 2) - 1
def getMultiplexedId(self, in_id, in_ch_l, out_ch_l):
# see /libffado/src/bebob/bebob_mixer.cpp
return (in_id << 8) | (in_ch_l << 4) | (out_ch_l << 0)
def updateSelector(self, state):
sender = self.sender()
path = self.Selectors[sender][0]
log.debug("set %s to %d" % (path, state))
self.hw.setDiscrete(path, state)
def updatePanning(self, state):
sender = self.sender()
path = self.Pannings[sender][0]
idx = self.Pannings[sender][1]
value = (state - 50) * 0x7FFE / -50
log.debug("set %s for %d to %d(%d)" % (path, idx, value, state))
self.hw.setContignuous(path, value, idx)
def updateVolume(self, vol):
sender = self.sender()
path = self.Volumes[sender][0]
idx = self.Volumes[sender][1]
pair = self.Volumes[sender][2]
link = self.Volumes[sender][4]
db = self.vol2db(vol)
log.debug("set %s for %d to %d(%d)" % (path, idx, db, vol))
self.hw.setContignuous(path, db, idx)
if link.isChecked():
pair.setValue(vol)
# device remeber gain even if muted
def updateMute(self, state):
sender = self.sender()
l_sld = self.Mutes[sender][0]
r_sld = self.Mutes[sender][1]
if state:
db = 0x8000
else:
db = 0x0000
for w in [l_sld, r_sld]:
path = self.Volumes[w][0]
self.hw.setContignuous(path, db)
w.setDisabled(state)
def updateMixer(self, checked):
if checked:
state = 0x0000
else:
state = 0x8000
sender = self.sender()
path = self.Mixers[sender][0]
in_id = self.Mixers[sender][1]
mix_in_idx = self.Mixers[sender][2]
mix_out_idx = self.Mixers[sender][3]
in_ch_l = self.mixers[self.id][3][mix_in_idx][0]
out_ch_l = self.mixers[self.id][1][mix_out_idx][0]
mux_id = self.getMultiplexedId(in_id, in_ch_l, out_ch_l)
log.debug("set %s for 0x%04X(%d/%d/%d) to %d" %
(path, mux_id, in_id, in_ch_l, out_ch_l, state))
self.hw.setContignuous(path, state, mux_id)
def read410HP(self):
path = "/Mixer/Selector_7"
sel = self.hw.getDiscrete(path)
if sel > 0:
enbl = 5
else:
enbl = -1
path = "/Mixer/EnhancedMixer_7"
for i in range(5):
in_id = 0
in_ch_l = i * 2 + 1
out_ch_l = 1
mux_id = self.getMultiplexedId(in_id, in_ch_l, out_ch_l)
state = self.hw.getContignuous(path, mux_id)
if enbl < 0 and state == 0:
enbl = i
else:
self.hw.setContignuous(path, 0x8000, mux_id)
# if inconsistency between Selector and Mixer, set AUX as default
if enbl == -1:
self.hw.setDiscrete('/Mixer/Selector_7', 1)
enbl = 5
self.FW410HP.setCurrentIndex(enbl)
def update410HP(self, state):
# each output from mixer can be multiplexed in headphone
# but here they are exclusive because of GUI simpleness, sigh...
path = "/Mixer/EnhancedMixer_7"
for i in range(5):
in_id = 0
in_ch_l = i * 2 + 1
out_ch_l = 1
mux_id = self.getMultiplexedId(in_id, in_ch_l, out_ch_l)
if i == state:
value = 0x0000
else:
value = 0x8000
self.hw.setContignuous(path, value, mux_id)
# Mixer/Aux is selectable exclusively
path = "/Mixer/Selector_7"
sel = (state == 5)
self.hw.setDiscrete(path, sel)
libffado-2.4.2/support/mixer-qt4/ffado/mixer/profire2626.py 0000644 0001750 0000144 00000007347 13114471135 023001 0 ustar jwoithe users #
# Copyright (C) 2009-2010 by Arnold Krille
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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 .
#
# from PyQt4 import QtGui, QtCore, Qt
# from PyQt4.QtGui import QWidget, QScrollArea
from ffado.import_pyqt import *
import dbus
import ffado.config
from ffado.widgets.matrixmixer import MatrixMixer
from ffado.widgets.crossbarrouter import *
from ffado.mixer.generic_dice_eap import *
from ffado.config import *
class BooleanControl:
def __init__(self, hw, path):
if ffado.config.bypassdbus:
self.value = False
return
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):
if ffado.config.bypassdbus:
self.value = 0
return
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 Profire2626(Generic_Dice_EAP):
def __init__(self, parent=None):
Generic_Dice_EAP.__init__(self, parent)
def buildMixer(self):
#print( self.hw )
#print( self.hw.getText("/Generic/Nickname") )
Generic_Dice_EAP.buildMixer(self)
widget = QWidget()
uicLoad("ffado/mixer/profire2626_settings.ui", widget)
# Add Settings to ffado-mixer panels
scrollarea = QScrollArea(self.tabs)
scrollarea.setWidgetResizable(False)
scrollarea.setWidget(widget)
self.tabs.addTab(scrollarea, "Settings")
# Master volume knob
from collections import namedtuple
LineInfo = namedtuple('LineInfo', ['widget','Interface'])
# Volume Unactivating
self.LineUnActivates = []
p = LineInfo(widget.line1line2, BooleanControl(self.hw, self.hw.basepath+"/EAP/Settings/VolumeKnob/Line1Line2"))
self.LineUnActivates.append(p)
p = LineInfo(widget.line3line4, BooleanControl(self.hw, self.hw.basepath+"/EAP/Settings/VolumeKnob/Line3Line4"))
self.LineUnActivates.append(p)
p = LineInfo(widget.line5line6, BooleanControl(self.hw, self.hw.basepath+"/EAP/Settings/VolumeKnob/Line5Line6"))
self.LineUnActivates.append(p)
p = LineInfo(widget.line7line8, BooleanControl(self.hw, self.hw.basepath+"/EAP/Settings/VolumeKnob/Line7Line8"))
self.LineUnActivates.append(p)
for l in self.LineUnActivates:
l.widget.setChecked(l.Interface.selected())
l.widget.toggled.connect(l.Interface.select)
def getDisplayTitle(self):
return "M-Audio Profire 2626 Mixer"
#
# vim: et ts=4 sw=4
libffado-2.4.2/support/mixer-qt4/ffado/mixer/dummy.py 0000644 0001750 0000144 00000002111 13114471135 022126 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
class Dummy(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/dummy", self)
def initValues(self):
pass
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffirepro.py 0000644 0001750 0000144 00000057352 13114471135 023154 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget, QHBoxLayout, QMessageBox
from ffado.import_pyqt import *
from ffado.config import *
from ffado.mixer.saffire_base import SaffireMixerBase
import logging
log = logging.getLogger('saffirepro')
class SaffirePro(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self, parent)
self.have_adat = False
self.samplerate = None
self.is_pro10 = None
# make a layout
self.layout = QHBoxLayout()
self.setLayout(self.layout)
def show(self):
self.selectCorrectMode()
QWidget.show(self)
def getDisplayTitle(self):
try:
return self.nickname.text()
except:
if self.is_pro10:
return "SaffirePRO10"
else:
return "SaffirePRO26"
def selectCorrectMode(self):
if self.samplerate <= 96000:
log.debug("large")
self.small.hide()
self.large.initValues()
self.large.show()
else:
log.debug("small")
self.large.hide()
self.small.initValues()
self.small.show()
def initValues(self):
self.is_not_streaming = self.samplerateselect.canChangeValue()
selected = self.samplerateselect.selected()
self.samplerate = int(self.samplerateselect.getEnumLabel( selected ))
log.debug("detected samplerate %d" % self.samplerate)
# adat on PRO26 makes a difference
modelId = self.configrom.getModelId()
if modelId == 0x00000003: # PRO26
self.is_pro10 = False
state = self.hw.getDiscrete('/Control/ADATDisable')
if state:
self.have_adat = False
log.debug("detected PRO26, ADAT disabled")
else:
self.have_adat = True
log.debug("detected PRO26, ADAT enabled")
elif modelId == 0x00000006: # PRO10
self.is_pro10 = True
self.have_adat = False
# create the child widgets
self.small = SaffireProMixerSmall(self)
self.layout.addWidget(self.small)
self.large = SaffireProMixerLarge(self)
self.layout.addWidget(self.large)
self.small.hw = self.hw
self.small.configrom = self.configrom
self.large.hw = self.hw
self.large.configrom = self.configrom
self.selectCorrectMode()
def polledUpdate(self):
self.is_not_streaming = self.samplerateselect.canChangeValue()
if self.samplerate <= 96000:
self.large.polledUpdate()
else:
self.small.polledUpdate()
class SaffireProMixerLarge(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
SaffireMixerBase.__init__(self)
uicLoad("ffado/mixer/saffirepro_large", self)
self.have_adat = False
log.debug("Init large Saffire Pro mixer window")
self.VolumeControls={
self.sldIMixAnalog1L: ['/Mixer/InputMix', 0, 0],
self.sldIMixAnalog1R: ['/Mixer/InputMix', 0, 1],
self.sldIMixAnalog2L: ['/Mixer/InputMix', 1, 0],
self.sldIMixAnalog2R: ['/Mixer/InputMix', 1, 1],
self.sldIMixAnalog3L: ['/Mixer/InputMix', 2, 0],
self.sldIMixAnalog3R: ['/Mixer/InputMix', 2, 1],
self.sldIMixAnalog4L: ['/Mixer/InputMix', 3, 0],
self.sldIMixAnalog4R: ['/Mixer/InputMix', 3, 1],
self.sldIMixAnalog5L: ['/Mixer/InputMix', 4, 0],
self.sldIMixAnalog5R: ['/Mixer/InputMix', 4, 1],
self.sldIMixAnalog6L: ['/Mixer/InputMix', 5, 0],
self.sldIMixAnalog6R: ['/Mixer/InputMix', 5, 1],
self.sldIMixAnalog7L: ['/Mixer/InputMix', 6, 0],
self.sldIMixAnalog7R: ['/Mixer/InputMix', 6, 1],
self.sldIMixAnalog8L: ['/Mixer/InputMix', 7, 0],
self.sldIMixAnalog8R: ['/Mixer/InputMix', 7, 1],
self.sldIMixAnalog9L: ['/Mixer/InputMix', 8, 0],
self.sldIMixAnalog9R: ['/Mixer/InputMix', 8, 1],
self.sldIMixAnalog10L: ['/Mixer/InputMix', 9, 0],
self.sldIMixAnalog10R: ['/Mixer/InputMix', 9, 1],
self.sldIMixADAT11L: ['/Mixer/InputMix', 10, 0],
self.sldIMixADAT11R: ['/Mixer/InputMix', 10, 1],
self.sldIMixADAT12L: ['/Mixer/InputMix', 11, 0],
self.sldIMixADAT12R: ['/Mixer/InputMix', 11, 1],
self.sldIMixADAT13L: ['/Mixer/InputMix', 12, 0],
self.sldIMixADAT13R: ['/Mixer/InputMix', 12, 1],
self.sldIMixADAT14L: ['/Mixer/InputMix', 13, 0],
self.sldIMixADAT14R: ['/Mixer/InputMix', 13, 1],
self.sldIMixADAT15L: ['/Mixer/InputMix', 14, 0],
self.sldIMixADAT15R: ['/Mixer/InputMix', 14, 1],
self.sldIMixADAT16L: ['/Mixer/InputMix', 15, 0],
self.sldIMixADAT16R: ['/Mixer/InputMix', 15, 1],
self.sldIMixADAT17L: ['/Mixer/InputMix', 16, 0],
self.sldIMixADAT17R: ['/Mixer/InputMix', 16, 1],
self.sldIMixADAT18L: ['/Mixer/InputMix', 17, 0],
self.sldIMixADAT18R: ['/Mixer/InputMix', 17, 1],
self.sldIMixADAT21L: ['/Mixer/InputMix', 18, 0],
self.sldIMixADAT21R: ['/Mixer/InputMix', 18, 1],
self.sldIMixADAT22L: ['/Mixer/InputMix', 19, 0],
self.sldIMixADAT22R: ['/Mixer/InputMix', 19, 1],
self.sldIMixADAT23L: ['/Mixer/InputMix', 20, 0],
self.sldIMixADAT23R: ['/Mixer/InputMix', 20, 1],
self.sldIMixADAT24L: ['/Mixer/InputMix', 21, 0],
self.sldIMixADAT24R: ['/Mixer/InputMix', 21, 1],
self.sldIMixADAT25L: ['/Mixer/InputMix', 22, 0],
self.sldIMixADAT25R: ['/Mixer/InputMix', 22, 1],
self.sldIMixADAT26L: ['/Mixer/InputMix', 23, 0],
self.sldIMixADAT26R: ['/Mixer/InputMix', 23, 1],
self.sldIMixADAT27L: ['/Mixer/InputMix', 24, 0],
self.sldIMixADAT27R: ['/Mixer/InputMix', 24, 1],
self.sldIMixADAT28L: ['/Mixer/InputMix', 25, 0],
self.sldIMixADAT28R: ['/Mixer/InputMix', 25, 1],
self.sldOMixPC1O1: ['/Mixer/OutputMix', 0, 0],
self.sldOMixPC2O2: ['/Mixer/OutputMix', 1, 1],
self.sldOMixPC3O3: ['/Mixer/OutputMix', 2, 2],
self.sldOMixPC4O4: ['/Mixer/OutputMix', 3, 3],
self.sldOMixPC5O5: ['/Mixer/OutputMix', 4, 4],
self.sldOMixPC6O6: ['/Mixer/OutputMix', 5, 5],
self.sldOMixPC7O7: ['/Mixer/OutputMix', 6, 6],
self.sldOMixPC8O8: ['/Mixer/OutputMix', 7, 7],
self.sldOMixPC9O9: ['/Mixer/OutputMix', 8, 8],
self.sldOMixPC10O10: ['/Mixer/OutputMix', 9, 9],
self.sldOMixPC1O3: ['/Mixer/OutputMix', 0, 2],
self.sldOMixPC2O4: ['/Mixer/OutputMix', 1, 3],
self.sldOMixPC1O5: ['/Mixer/OutputMix', 0, 4],
self.sldOMixPC2O6: ['/Mixer/OutputMix', 1, 5],
self.sldOMixPC1O7: ['/Mixer/OutputMix', 0, 6],
self.sldOMixPC2O8: ['/Mixer/OutputMix', 1, 7],
self.sldOMixPC1O9: ['/Mixer/OutputMix', 0, 8],
self.sldOMixPC2O10: ['/Mixer/OutputMix', 1, 9],
self.sldOMixIMixO1: ['/Mixer/OutputMix', 10, 0],
self.sldOMixIMixO2: ['/Mixer/OutputMix', 11, 1],
self.sldOMixIMixO3: ['/Mixer/OutputMix', 10, 2],
self.sldOMixIMixO4: ['/Mixer/OutputMix', 11, 3],
self.sldOMixIMixO5: ['/Mixer/OutputMix', 10, 4],
self.sldOMixIMixO6: ['/Mixer/OutputMix', 11, 5],
self.sldOMixIMixO7: ['/Mixer/OutputMix', 10, 6],
self.sldOMixIMixO8: ['/Mixer/OutputMix', 11, 7],
self.sldOMixIMixO9: ['/Mixer/OutputMix', 10, 8],
self.sldOMixIMixO10: ['/Mixer/OutputMix', 11, 9],
}
self.SelectorControls={
# control elements
self.chkInsert1: ['/Control/Insert1'],
self.chkInsert2: ['/Control/Insert2'],
self.chkPhantom14: ['/Control/Phantom_1to4'],
self.chkPhantom58: ['/Control/Phantom_5to8'],
self.chkAC3: ['/Control/AC3pass'],
self.chkMidiThru: ['/Control/MidiTru'],
self.chkHighVoltage: ['/Control/UseHighVoltageRail'],
#self.chkEnableADAT1: ['/Control/EnableAdat1'],
#self.chkEnableADAT2: ['/Control/EnableAdat2'],
#self.chkEnableSPDIF1: ['/Control/EnableSPDIF1'],
self.chkMidiEnable: ['/Control/MIDIEnable'],
self.chkAdatDisable: ['/Control/ADATDisable'],
# Mixer switches
self.chkMute12: ['/Mixer/Out12Mute', [self.chkHwCtrl12]],
self.chkHwCtrl12: ['/Mixer/Out12HwCtrl'],
self.chkPad12: ['/Mixer/Out12Pad'],
self.chkDim12: ['/Mixer/Out12Dim'],
self.chkMute34: ['/Mixer/Out34Mute', [self.chkHwCtrl34]],
self.chkHwCtrl34: ['/Mixer/Out34HwCtrl'],
self.chkPad34: ['/Mixer/Out34Pad'],
self.chkDim34: ['/Mixer/Out34Dim'],
self.chkMute56: ['/Mixer/Out56Mute', [self.chkHwCtrl56]],
self.chkHwCtrl56: ['/Mixer/Out56HwCtrl'],
self.chkPad56: ['/Mixer/Out56Pad'],
self.chkDim56: ['/Mixer/Out56Dim'],
self.chkMute78: ['/Mixer/Out78Mute', [self.chkHwCtrl78]],
self.chkHwCtrl78: ['/Mixer/Out78HwCtrl'],
self.chkPad78: ['/Mixer/Out78Pad'],
self.chkDim78: ['/Mixer/Out78Dim'],
# direct monitoring
self.chkMonitor1: ['/Mixer/DirectMonitorCH1'],
self.chkMonitor2: ['/Mixer/DirectMonitorCH2'],
self.chkMonitor3: ['/Mixer/DirectMonitorCH3'],
self.chkMonitor4: ['/Mixer/DirectMonitorCH4'],
self.chkMonitor5: ['/Mixer/DirectMonitorCH5'],
self.chkMonitor6: ['/Mixer/DirectMonitorCH6'],
self.chkMonitor7: ['/Mixer/DirectMonitorCH7'],
self.chkMonitor8: ['/Mixer/DirectMonitorCH8'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
self.sldOut78Level: ['/Mixer/Out78Level'],
}
self.TriggerButtonControls={
self.btnReboot: ['/Control/Reboot'],
self.btnIdentify: ['/Control/FlashLed'],
self.btnSaveSettings: ['/Control/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
self.comboStandalone: ['/Control/StandaloneConfig'],
}
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
sender = self.sender()
#if sender == self.chkAC3 and not self.my_parent.is_not_streaming:
#msg = QMessageBox()
#msg.question( msg, "Error", \
#"Change not permitted. Is streaming active?", \
#QMessageBox.Ok )
#self.chkAC3.setEnabled(False)
#if a0:
#self.chkAC3.setChecked(False)
#else:
#self.chkAC3.setChecked(True)
#return
if sender == self.chkMidiEnable and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.chkMidiEnable.setEnabled(False)
state = self.hw.getDiscrete(self.SelectorControls[self.chkMidiEnable][0])
if state:
self.chkMidiEnable.setChecked(True)
else:
self.chkMidiEnable.setChecked(False)
return
if sender == self.chkAdatDisable and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.chkAdatDisable.setEnabled(False)
state = self.hw.getDiscrete(self.SelectorControls[self.chkAdatDisable][0])
if state:
self.chkAdatDisable.setChecked(True)
else:
self.chkAdatDisable.setChecked(False)
return
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
sender = self.sender()
if sender == self.btnReboot and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Operation not permitted. Is streaming active?", \
QMessageBox.Ok )
self.btnReboot.setEnabled(False)
return
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
for i in range(self.tabInputMix.count()):
self.tabInputMix.setTabEnabled(i, True)
if not self.my_parent.have_adat:
for i in range(self.tabInputMix.count()):
page = self.tabInputMix.widget(i)
name = page.objectName()
if name[0:4] == "adat":
self.tabInputMix.setTabEnabled(i, False)
else:
self.tabInputMix.setTabEnabled(i, True)
self.tabInputMix.setCurrentWidget(self.tabInputMix.widget(0))
SaffireMixerBase.updateValues(self)
def polledUpdate(self):
#log.debug("polled update (large)")
self.polledUpdateHwCtrl(self.chkHwCtrl12, self.sldOut12Level)
self.polledUpdateHwCtrl(self.chkHwCtrl34, self.sldOut34Level)
self.polledUpdateHwCtrl(self.chkHwCtrl56, self.sldOut56Level)
self.polledUpdateHwCtrl(self.chkHwCtrl78, self.sldOut78Level)
#make these inaccessible whenever streaming is running
#self.chkAC3.setEnabled(self.my_parent.is_not_streaming)
self.chkMidiEnable.setEnabled(self.my_parent.is_not_streaming)
self.chkAdatDisable.setEnabled(self.my_parent.is_not_streaming)
self.btnReboot.setEnabled(self.my_parent.is_not_streaming)
def polledUpdateHwCtrl(self, selector, volctrl):
state = selector.isChecked()
if state:
self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl, 2)
volctrl.setEnabled(False)
else:
volctrl.setEnabled(True)
class SaffireProMixerSmall(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
SaffireMixerBase.__init__(self)
uicLoad("ffado/mixer/saffirepro_small", self)
log.debug("Init small Saffire Pro mixer window")
self.VolumeControls={
self.sldOMixPC1O1: ['/Mixer/OutputMix', 0, 0],
self.sldOMixPC2O2: ['/Mixer/OutputMix', 1, 1],
self.sldOMixPC3O3: ['/Mixer/OutputMix', 2, 2],
self.sldOMixPC4O4: ['/Mixer/OutputMix', 3, 3],
self.sldOMixPC5O5: ['/Mixer/OutputMix', 4, 4],
self.sldOMixPC6O6: ['/Mixer/OutputMix', 5, 5],
self.sldOMixPC7O7: ['/Mixer/OutputMix', 6, 6],
self.sldOMixPC8O8: ['/Mixer/OutputMix', 7, 7],
self.sldOMixPC9O9: ['/Mixer/OutputMix', 8, 8],
self.sldOMixPC10O10: ['/Mixer/OutputMix', 9, 9],
self.sldOMixPC1O3: ['/Mixer/OutputMix', 0, 2],
self.sldOMixPC2O4: ['/Mixer/OutputMix', 1, 3],
self.sldOMixPC1O5: ['/Mixer/OutputMix', 0, 4],
self.sldOMixPC2O6: ['/Mixer/OutputMix', 1, 5],
self.sldOMixPC1O7: ['/Mixer/OutputMix', 0, 6],
self.sldOMixPC2O8: ['/Mixer/OutputMix', 1, 7],
self.sldOMixPC1O9: ['/Mixer/OutputMix', 0, 8],
self.sldOMixPC2O10: ['/Mixer/OutputMix', 1, 9],
self.sldOMixIMixO1: ['/Mixer/OutputMix', 10, 0],
self.sldOMixIMixO2: ['/Mixer/OutputMix', 11, 1],
self.sldOMixIMixO3: ['/Mixer/OutputMix', 10, 2],
self.sldOMixIMixO4: ['/Mixer/OutputMix', 11, 3],
self.sldOMixIMixO5: ['/Mixer/OutputMix', 10, 4],
self.sldOMixIMixO6: ['/Mixer/OutputMix', 11, 5],
self.sldOMixIMixO7: ['/Mixer/OutputMix', 10, 6],
self.sldOMixIMixO8: ['/Mixer/OutputMix', 11, 7],
self.sldOMixIMixO9: ['/Mixer/OutputMix', 10, 8],
self.sldOMixIMixO10: ['/Mixer/OutputMix', 11, 9],
}
self.SelectorControls={
# control elements
self.chkInsert1: ['/Control/Insert1'],
self.chkInsert2: ['/Control/Insert2'],
self.chkPhantom14: ['/Control/Phantom_1to4'],
self.chkPhantom58: ['/Control/Phantom_5to8'],
self.chkAC3: ['/Control/AC3pass'],
self.chkMidiThru: ['/Control/MidiTru'],
self.chkHighVoltage: ['/Control/UseHighVoltageRail'],
#self.chkEnableADAT1: ['/Control/EnableAdat1'],
#self.chkEnableADAT2: ['/Control/EnableAdat2'],
#self.chkEnableSPDIF1: ['/Control/EnableSPDIF1'],
self.chkMidiEnable: ['/Control/MIDIEnable'],
self.chkAdatDisable: ['/Control/ADATDisable'],
# Mixer switches
self.chkMute12: ['/Mixer/Out12Mute'],
self.chkHwCtrl12: ['/Mixer/Out12HwCtrl'],
self.chkPad12: ['/Mixer/Out12Pad'],
self.chkDim12: ['/Mixer/Out12Dim'],
self.chkMute34: ['/Mixer/Out34Mute'],
self.chkHwCtrl34: ['/Mixer/Out34HwCtrl'],
self.chkPad34: ['/Mixer/Out34Pad'],
self.chkDim34: ['/Mixer/Out34Dim'],
self.chkMute56: ['/Mixer/Out56Mute'],
self.chkHwCtrl56: ['/Mixer/Out56HwCtrl'],
self.chkPad56: ['/Mixer/Out56Pad'],
self.chkDim56: ['/Mixer/Out56Dim'],
self.chkMute78: ['/Mixer/Out78Mute'],
self.chkHwCtrl78: ['/Mixer/Out78HwCtrl'],
self.chkPad78: ['/Mixer/Out78Pad'],
self.chkDim78: ['/Mixer/Out78Dim'],
# direct monitoring
self.chkMonitor1: ['/Mixer/DirectMonitorCH1'],
self.chkMonitor2: ['/Mixer/DirectMonitorCH2'],
self.chkMonitor3: ['/Mixer/DirectMonitorCH3'],
self.chkMonitor4: ['/Mixer/DirectMonitorCH4'],
self.chkMonitor5: ['/Mixer/DirectMonitorCH5'],
self.chkMonitor6: ['/Mixer/DirectMonitorCH6'],
self.chkMonitor7: ['/Mixer/DirectMonitorCH7'],
self.chkMonitor8: ['/Mixer/DirectMonitorCH8'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
self.sldOut78Level: ['/Mixer/Out78Level'],
}
self.TriggerButtonControls={
self.btnReboot: ['/Control/Reboot'],
self.btnIdentify: ['/Control/FlashLed'],
self.btnSaveSettings: ['/Control/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
self.comboStandalone: ['/Control/StandaloneConfig'],
}
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
sender = self.sender()
#if sender == self.chkAC3 and not self.my_parent.is_not_streaming:
#msg = QMessageBox()
#msg.question( msg, "Error", \
#"Change not permitted. Is streaming active?", \
#QMessageBox.Ok )
#self.chkAC3.setEnabled(False)
#if a0:
#self.chkAC3.setChecked(False)
#else:
#self.chkAC3.setChecked(True)
#return
if sender == self.chkMidiEnable and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.chkMidiEnable.setEnabled(False)
state = self.hw.getDiscrete(self.SelectorControls[self.chkMidiEnable][0])
if state:
self.chkMidiEnable.setChecked(True)
else:
self.chkMidiEnable.setChecked(False)
return
if sender == self.chkAdatDisable and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.chkAdatDisable.setEnabled(False)
state = self.hw.getDiscrete(self.SelectorControls[self.chkAdatDisable][0])
if state:
self.chkAdatDisable.setChecked(True)
else:
self.chkAdatDisable.setChecked(False)
return
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
sender = self.sender()
if sender == self.btnReboot and not self.my_parent.is_not_streaming:
msg = QMessageBox()
msg.question( msg, "Error", \
"Operation not permitted. Is streaming active?", \
QMessageBox.Ok )
self.btnReboot.setEnabled(False)
return
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
SaffireMixerBase.updateValues(self)
def polledUpdate(self):
#log.debug("polled update (small)")
self.polledUpdateHwCtrl(self.chkHwCtrl12, self.sldOut12Level)
self.polledUpdateHwCtrl(self.chkHwCtrl34, self.sldOut34Level)
self.polledUpdateHwCtrl(self.chkHwCtrl56, self.sldOut56Level)
self.polledUpdateHwCtrl(self.chkHwCtrl78, self.sldOut78Level)
#make these inaccessible whenever streaming is running
#self.chkAC3.setEnabled(self.my_parent.is_not_streaming)
self.chkMidiEnable.setEnabled(self.my_parent.is_not_streaming)
self.chkAdatDisable.setEnabled(self.my_parent.is_not_streaming)
self.btnReboot.setEnabled(self.my_parent.is_not_streaming)
def polledUpdateHwCtrl(self, selector, volctrl):
state = selector.isChecked()
if state:
self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl, 2)
volctrl.setEnabled(False)
else:
volctrl.setEnabled(True)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/edirolfa66control.py 0000644 0001750 0000144 00000007307 13114471135 024351 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Daniel Wagner
#
# 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 .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('edirolfa66')
class EdirolFa66Control(QWidget):
def __init__(self, parent = None):
QWidget.__init__(self, parent)
uicLoad("ffado/mixer/edirolfa66", self)
self.VolumeControls = {
# feature name, channel, qt slider
'vol1' : ['/Mixer/Feature_Volume_1', 1, self.sldInput1],
'vol2' : ['/Mixer/Feature_Volume_1', 2, self.sldInput2],
'vol3' : ['/Mixer/Feature_Volume_2', 1, self.sldInput3],
'vol4' : ['/Mixer/Feature_Volume_2', 2, self.sldInput4],
'vol5' : ['/Mixer/Feature_Volume_3', 1, self.sldInput5],
'vol6' : ['/Mixer/Feature_Volume_3', 2, self.sldInput6],
'bal1' : ['/Mixer/Feature_LRBalance_1', 1, self.sldBal1],
'bal2' : ['/Mixer/Feature_LRBalance_1', 2, self.sldBal2],
'bal3' : ['/Mixer/Feature_LRBalance_2', 1, self.sldBal3],
'bal4' : ['/Mixer/Feature_LRBalance_2', 2, self.sldBal4],
'bal5' : ['/Mixer/Feature_LRBalance_3', 1, self.sldBal5],
'bal6' : ['/Mixer/Feature_LRBalance_3', 2, self.sldBal6],
}
def setVolumeIn1(self, vol):
self.setValue('vol1', vol)
def setVolumeIn2(self, vol):
self.setValue('vol2', vol)
def setVolumeIn3(self, vol):
self.setValue('vol3', vol)
def setVolumeIn4(self, vol):
self.setValue('vol4', vol)
def setVolumeIn5(self, vol):
self.setValue('vol5', vol)
def setVolumeIn6(self, vol):
self.setValue('vol6', vol)
def setBalanceIn1(self, bal):
self.setValue('bal1', bal)
def setBalanceIn2(self, bal):
self.setValue('bal2', bal)
def setBalanceIn3(self, bal):
self.setValue('bal3', bal)
def setBalanceIn4(self, bal):
self.setValue('bal4', bal)
def setBalanceIn5(self, bal):
self.setValue('bal5', bal)
def setBalanceIn6(self, bal):
self.setValue('bal6', bal)
def setValue(self, name, val):
ctrl = self.VolumeControls[name]
log.debug("setting %s to %d" % (name, val))
self.hw.setContignuous(ctrl[0], val, idx = ctrl[1])
def initValues(self):
for name, ctrl in self.VolumeControls.items():
val = self.hw.getContignuous(ctrl[0], idx = ctrl[1])
log.debug("%s value is %d" % (name , val))
# Workaround: The current value is not properly initialized
# on the device and returns after bootup always 0.
# Though we happen to know what the correct value should
# be therefore we overwrite the 0
if name[0:3] == 'bal' and val == 0:
if ctrl[1] == 1:
val = 32512
else:
val = -32768
ctrl[2].setValue(val)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/phase24control.py 0000644 0001750 0000144 00000012504 13114471135 023651 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('phase24')
class Phase24Control(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/phase24", self)
self.VolumeControls={
'analogin' : ['/Mixer/Feature_Volume_6', self.sldLineIn],
'spdifin' : ['/Mixer/Feature_Volume_7', self.sldSPDIFIn],
'out12' : ['/Mixer/Feature_Volume_3', self.sldInput12],
'out34' : ['/Mixer/Feature_Volume_4', self.sldInput34],
'outspdif' : ['/Mixer/Feature_Volume_5', self.sldSPDIFOut],
}
self.SelectorControls={
'outsource12': ['/Mixer/Selector_1', self.cmbOutSource12],
'outsource34': ['/Mixer/Selector_2', self.cmbOutSource34],
'outsourcespdif': ['/Mixer/Selector_3', self.cmbOutSourceSPDIF],
'syncsource': ['/Mixer/Selector_4', self.cmbSetSyncSource],
}
# public slot
def setVolume12(self,a0):
self.setVolume('out12', a0)
# public slot
def setVolume34(self,a0):
self.setVolume('out34', a0)
# public slot
def setVolumeLineIn(self,a0):
self.setVolume('analogin', a0)
# public slot
def setVolumeSPDIFOut(self,a0):
self.setVolume('outspdif', a0)
# public slot
def setVolumeSPDIFIn(self,a0):
self.setVolume('spdifin', a0)
# public slot
def setVolumeMaster(self,a0):
if self.isPhaseX24:
return
self.setVolume('master', a0)
# public slot
def setLineLevel(self,a0):
log.debug("setting line level to %d" % (a0 * -768))
self.hw.setContignuous('/Mixer/Feature_Volume_2', a0 * -768)
# public slot
def setFrontLevel(self,a0):
if self.isPhaseX24:
return
if(a0 == 0):
log.debug("setting front level to %d" % (0))
self.hw.setContignuous('/Mixer/Feature_Volume_8', 0)
else:
log.debug("setting front level to %d" % (1536))
self.hw.setContignuous('/Mixer/Feature_Volume_8', 1536)
# public slot
def setOutSource12(self,a0):
self.setSelector('outsource12', a0)
# public slot
def setOutSource34(self,a0):
self.setSelector('outsource34', a0)
# public slot
def setOutSourceSPDIF(self,a0):
self.setSelector('outsourcespdif', a0)
# public slot
def setSyncSource(self,a0):
self.setSelector('syncsource', a0)
def setVolume(self,a0,a1):
name=a0
vol = -a1
log.debug("setting %s volume to %d" % (name, vol))
self.hw.setContignuous(self.VolumeControls[name][0], vol)
def setSelector(self,a0,a1):
name=a0
state = a1
log.debug("setting %s state to %d" % (name, state))
self.hw.setDiscrete(self.SelectorControls[name][0], state)
def initValues(self):
self.modelId = self.configrom.getModelId()
if self.modelId == 0x00000007:
self.isPhaseX24 = True
else:
self.isPhaseX24 = False
if self.isPhaseX24:
self.setWindowTitle("Terratec Phase X24 Control")
self.cmbFrontLevel.setEnabled(False)
self.sldMaster.setEnabled(False)
else:
self.setWindowTitle("Terratec Phase 24 Control")
self.VolumeControls['master'] = ['/Mixer/Feature_Volume_1', self.sldMaster]
self.sldMaster.setEnabled(True)
self.cmbFrontLevel.setEnabled(True)
val = self.hw.getContignuous('/Mixer/Feature_Volume_8')
if val > 0:
self.cmbFrontLevel.setCurrentIndex(1)
else:
self.cmbFrontLevel.setCurrentIndex(0)
for name, ctrl in self.VolumeControls.items():
vol = self.hw.getContignuous(ctrl[0])
log.debug("%s volume is %d" % (name , vol))
ctrl[1].setValue(-vol)
for name, ctrl in self.SelectorControls.items():
state = self.hw.getDiscrete(ctrl[0])
log.debug("%s state is %d" % (name , state))
ctrl[1].setCurrentIndex(state)
val = self.hw.getContignuous('/Mixer/Feature_Volume_2')/-768
if val > 4:
self.cmbLineLevel.setCurrentIndex(4)
else:
self.cmbLineLevel.setCurrentIndex(val)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/bcoaudio5control.py 0000644 0001750 0000144 00000006440 13114471135 024257 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Daniel Wagner
#
# 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 .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('bridgeco')
class BCoAudio5Control(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/bcoaudio5", self)
self.VolumeControls={
'in_line12' : ['/Mixer/Feature_Volume_1', self.sldInput12],
'in_line34' : ['/Mixer/Feature_Volume_2', self.sldInput34],
'in_spdif' : ['/Mixer/Feature_Volume_3', self.sldInputSPDIF],
'out_line12' : ['/Mixer/Feature_Volume_6', self.sldOutput12],
'out_line34' : ['/Mixer/Feature_Volume_7', self.sldOutput34],
'cross_a' : ['/Mixer/Feature_Volume_4', self.sldCrossA],
'cross_b' : ['/Mixer/Feature_Volume_5', self.sldCrossB],
}
self.ComboControls={
'line34source': ['/Mixer/Selector_1', self.comboMixSource],
}
def setComboMixSource(self,a0):
self.setSelector('line34source', a0)
def setVolumeIn12(self,a0):
self.setVolume('in_line12', a0)
def setVolumeIn34(self,a0):
self.setVolume('in_line34', a0)
def setVolumeInSPDIF(self,a0):
self.setVolume('in_spdif', a0)
def setVolumeOut12(self,a0):
self.setVolume('out_line12', a0)
def setVolumeOut34(self,a0):
self.setVolume('out_line34', a0)
def setCrossA(self,a0):
self.setVolume('cross_a', a0)
def setCrossB(self,a0):
self.setVolume('cross_b', a0)
def setVolume(self,a0,a1):
name = a0
vol = -a1
log.debug("setting %s volume to %d" % (name, vol))
self.hw.setContignuous(self.VolumeControls[name][0], vol)
def setSelector(self,a0,a1):
name = a0
state = a1
log.debug("setting %s state to %d" % (name, state))
self.hw.setDiscrete(self.ComboControls[name][0], state)
# verify
state = self.hw.getDiscrete(self.ComboControls[name][0])
self.hw.setDiscrete(self.ComboControls[name][0], state)
def initValues(self):
for name, ctrl in self.VolumeControls.items():
vol = self.hw.getContignuous(ctrl[0])
log.debug("%s volume is %d" % (name , vol))
ctrl[1].setValue(-vol)
for name, ctrl in self.ComboControls.items():
state = self.hw.getDiscrete(ctrl[0])
log.debug("%s state is %d" % (name , state))
ctrl[1].setCurrentIndex( state )
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire.py 0000644 0001750 0000144 00000066025 13114471135 022430 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget, QHBoxLayout
from ffado.import_pyqt import *
from ffado.config import *
from ffado.mixer.saffire_base import SaffireMixerBase
import logging
log = logging.getLogger('saffire')
#MIXER LAYOUT:
#
# |-- Out9/10--| |-- Out1/2 --| |-- Out3/4 --| |-- Out5/6 --| |-- Out7/8 --|
#P5 0: 0/ 0 1: 110/ 110 2: 0/ 0 3: 0/ 0 4: 0/ 0
#P1 5: 0/ 0 6:32767/32767 7: 0/ 0 8: 0/ 0 9: 0/ 0
#P2 10: 0/ 0 11: 0/ 0 12:32767/32767 13: 0/ 0 14: 0/ 0
#P3 15: 0/ 0 16: 0/ 0 17: 0/ 0 18:32767/32767 19: 0/ 0
#P4 20: 0/ 0 21: 0/ 0 22: 0/ 0 23: 0/ 0 24:32767/32767
#R1 25: 0/ 0 26: 0/ 0 27: 0/ 0 28: 0/ 0 29: 0/ 0
#R2 30: 0/ 0 31: 0/ 0 32: 0/ 0 33: 0/ 0 34: 0/ 0
#Fx 35: 0/ 0 36: 0/ 0 37: 0/ 0 38: 0/ 0 39: 0/ 0
#
#P5: DAW ch 9/10
#P1: DAW ch 1/2
#P2: DAW ch 3/4
#P3: DAW ch 5/6
#P4: DAW ch 7/8
#R1: HW INPUT ch 1/2
#R2: HW INPUT ch 3/4
#Fx: reverb/fx return
class Saffire(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self, parent)
self.mono_mode = False
self.is_saffire_le = False
# make a layout
self.layout = QHBoxLayout()
self.setLayout(self.layout)
def show(self):
self.selectCorrectMode()
QWidget.show(self)
def getMonoMode(self):
return self.hw.getDiscrete('/Mixer/MonoMode')
def setMonoMode(self, mode):
if mode:
self.hw.setDiscrete('/Mixer/MonoMode', 1)
else:
self.hw.setDiscrete('/Mixer/MonoMode', 0)
self.mono_mode = self.getMonoMode()
def getDisplayTitle(self):
if self.is_saffire_le:
return "SaffireLE"
else:
return "Saffire"
def selectCorrectMode(self):
if self.is_saffire_le:
if self.samplerate <= 48000:
log.debug("large")
self.small.hide()
self.large.initValues()
self.large.show()
else:
log.debug("small")
self.large.hide()
self.small.initValues()
self.small.show()
else:
if self.mono_mode:
self.stereo.hide()
self.mono.initValues()
self.mono.show()
else:
self.mono.hide()
self.stereo.initValues()
self.stereo.show()
def initValues(self):
selected = self.samplerateselect.selected()
label = self.samplerateselect.getEnumLabel( selected )
try:
self.samplerate = int(label)
except:
# FIXME: this should be handled properly
self.samplerate = 44100
# Saffire: 0x130e010001????
# SaffireLE: 0x130e010004????
if int(self.configrom.getGUID(), 16) >= 0x130e0100040000:
self.is_saffire_le = True
log.debug("Found SaffireLE GUID")
else:
self.is_saffire_le = False
log.debug("Found Saffire GUID")
# init depending on what device we have
# and what mode it is in
if self.is_saffire_le:
# create the child widgets
self.small = SaffireLEMixerSmall(self)
self.layout.addWidget(self.small)
self.large = SaffireLEMixerLarge(self)
self.layout.addWidget(self.large)
self.small.hw = self.hw
self.small.configrom = self.configrom
self.large.hw = self.hw
self.large.configrom = self.configrom
else:
# create the child widgets
self.mono = SaffireMixerMono(self)
self.layout.addWidget(self.mono)
self.stereo = SaffireMixerStereo(self)
self.layout.addWidget(self.stereo)
self.mono_mode = self.getMonoMode()
self.mono.hw = self.hw
self.mono.configrom = self.configrom
self.stereo.hw = self.hw
self.stereo.configrom = self.configrom
self.selectCorrectMode()
def polledUpdate(self):
if self.is_saffire_le:
if self.samplerate <= 48000:
self.large.polledUpdate()
else:
self.small.polledUpdate()
else:
if self.mono_mode:
self.mono.polledUpdate()
else:
self.stereo.polledUpdate()
class SaffireMixerStereo(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/saffire_stereo", self)
SaffireMixerBase.__init__(self)
self.btnRefresh.clicked.connect(self.updateValues)
self.btnSwitchStereoMode.clicked.connect(self.switchStereoMode)
self.VolumeControls={
self.sldPC910Out910: ['/Mixer/MatrixMixerStereo', 0, 0],
self.sldPC910Out12: ['/Mixer/MatrixMixerStereo', 0, 1],
self.sldPC910Out34: ['/Mixer/MatrixMixerStereo', 0, 2],
self.sldPC910Out56: ['/Mixer/MatrixMixerStereo', 0, 3],
self.sldPC910Out78: ['/Mixer/MatrixMixerStereo', 0, 4],
self.sldPC12Out910: ['/Mixer/MatrixMixerStereo', 1, 0],
self.sldPC12Out12: ['/Mixer/MatrixMixerStereo', 1, 1],
self.sldPC12Out34: ['/Mixer/MatrixMixerStereo', 1, 2],
self.sldPC12Out56: ['/Mixer/MatrixMixerStereo', 1, 3],
self.sldPC12Out78: ['/Mixer/MatrixMixerStereo', 1, 4],
self.sldPC34Out910: ['/Mixer/MatrixMixerStereo', 2, 0],
self.sldPC34Out12: ['/Mixer/MatrixMixerStereo', 2, 1],
self.sldPC34Out34: ['/Mixer/MatrixMixerStereo', 2, 2],
self.sldPC34Out56: ['/Mixer/MatrixMixerStereo', 2, 3],
self.sldPC34Out78: ['/Mixer/MatrixMixerStereo', 2, 4],
self.sldPC56Out910: ['/Mixer/MatrixMixerStereo', 3, 0],
self.sldPC56Out12: ['/Mixer/MatrixMixerStereo', 3, 1],
self.sldPC56Out34: ['/Mixer/MatrixMixerStereo', 3, 2],
self.sldPC56Out56: ['/Mixer/MatrixMixerStereo', 3, 3],
self.sldPC56Out78: ['/Mixer/MatrixMixerStereo', 3, 4],
self.sldPC78Out910: ['/Mixer/MatrixMixerStereo', 4, 0],
self.sldPC78Out12: ['/Mixer/MatrixMixerStereo', 4, 1],
self.sldPC78Out34: ['/Mixer/MatrixMixerStereo', 4, 2],
self.sldPC78Out56: ['/Mixer/MatrixMixerStereo', 4, 3],
self.sldPC78Out78: ['/Mixer/MatrixMixerStereo', 4, 4],
self.sldIN12Out910: ['/Mixer/MatrixMixerStereo', 5, 0],
self.sldIN12Out12: ['/Mixer/MatrixMixerStereo', 5, 1],
self.sldIN12Out34: ['/Mixer/MatrixMixerStereo', 5, 2],
self.sldIN12Out56: ['/Mixer/MatrixMixerStereo', 5, 3],
self.sldIN12Out78: ['/Mixer/MatrixMixerStereo', 5, 4],
self.sldIN34Out910: ['/Mixer/MatrixMixerStereo', 6, 0],
self.sldIN34Out12: ['/Mixer/MatrixMixerStereo', 6, 1],
self.sldIN34Out34: ['/Mixer/MatrixMixerStereo', 6, 2],
self.sldIN34Out56: ['/Mixer/MatrixMixerStereo', 6, 3],
self.sldIN34Out78: ['/Mixer/MatrixMixerStereo', 6, 4],
self.sldFXOut910: ['/Mixer/MatrixMixerStereo', 7, 0],
self.sldFXOut12: ['/Mixer/MatrixMixerStereo', 7, 1],
self.sldFXOut34: ['/Mixer/MatrixMixerStereo', 7, 2],
self.sldFXOut56: ['/Mixer/MatrixMixerStereo', 7, 3],
self.sldFXOut78: ['/Mixer/MatrixMixerStereo', 7, 4],
}
# First column is the DBUS subpath of the control.
# Second column is a list of linked controls that should
# be rewritten whenever this control is updated
self.SelectorControls={
self.chkSpdifSwitch: ['/Mixer/SpdifSwitch'],
self.chkOut12Mute: ['/Mixer/Out12Mute', [self.chkOut12HwCtrl]],
self.chkOut12HwCtrl: ['/Mixer/Out12HwCtrl'],
self.chkOut12Dim: ['/Mixer/Out12Dim'],
self.chkOut34Mute: ['/Mixer/Out34Mute', [self.chkOut34HwCtrl]],
self.chkOut34HwCtrl: ['/Mixer/Out34HwCtrl'],
self.chkOut56Mute: ['/Mixer/Out56Mute', [self.chkOut56HwCtrl]],
self.chkOut56HwCtrl: ['/Mixer/Out56HwCtrl'],
self.chkOut78Mute: ['/Mixer/Out78Mute', [self.chkOut78HwCtrl]],
self.chkOut78HwCtrl: ['/Mixer/Out78HwCtrl'],
self.chkOut910Mute: ['/Mixer/Out910Mute'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
self.sldOut78Level: ['/Mixer/Out78Level'],
}
self.TriggerButtonControls={
self.btnSaveSettings: ['/Mixer/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
}
def polledUpdate(self):
self.polledUpdateHwCtrl(self.chkOut12HwCtrl, self.sldOut12Level)
self.polledUpdateHwCtrl(self.chkOut34HwCtrl, self.sldOut34Level)
self.polledUpdateHwCtrl(self.chkOut56HwCtrl, self.sldOut56Level)
self.polledUpdateHwCtrl(self.chkOut78HwCtrl, self.sldOut78Level)
def polledUpdateHwCtrl(self, selector, volctrl):
state = selector.isChecked()
if state:
self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl, 64)
volctrl.setEnabled(False)
else:
volctrl.setEnabled(True)
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
SaffireMixerBase.updateValues(self)
def switchStereoMode(self):
log.debug("should switch to mono mode")
self.my_parent.setMonoMode(1)
self.my_parent.selectCorrectMode()
class SaffireMixerMono(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/saffire_mono", self)
SaffireMixerBase.__init__(self)
self.btnRefresh.clicked.connect(self.updateValues)
self.btnSwitchStereoMode.clicked.connect(self.switchStereoMode)
self.VolumeControls={
self.sldIN1Out910: ['/Mixer/MatrixMixerMono', 0, 0],
self.sldIN1Out12: ['/Mixer/MatrixMixerMono', 0, 1],
self.sldIN1Out34: ['/Mixer/MatrixMixerMono', 0, 2],
self.sldIN1Out56: ['/Mixer/MatrixMixerMono', 0, 3],
self.sldIN1Out78: ['/Mixer/MatrixMixerMono', 0, 4],
self.sldIN3Out910: ['/Mixer/MatrixMixerMono', 1, 0],
self.sldIN3Out12: ['/Mixer/MatrixMixerMono', 1, 1],
self.sldIN3Out34: ['/Mixer/MatrixMixerMono', 1, 2],
self.sldIN3Out56: ['/Mixer/MatrixMixerMono', 1, 3],
self.sldIN3Out78: ['/Mixer/MatrixMixerMono', 1, 4],
self.sldFX1Out910: ['/Mixer/MatrixMixerMono', 2, 0],
self.sldFX1Out12: ['/Mixer/MatrixMixerMono', 2, 1],
self.sldFX1Out34: ['/Mixer/MatrixMixerMono', 2, 2],
self.sldFX1Out56: ['/Mixer/MatrixMixerMono', 2, 3],
self.sldFX1Out78: ['/Mixer/MatrixMixerMono', 2, 4],
self.sldIN2Out910: ['/Mixer/MatrixMixerMono', 3, 0],
self.sldIN2Out12: ['/Mixer/MatrixMixerMono', 3, 1],
self.sldIN2Out34: ['/Mixer/MatrixMixerMono', 3, 2],
self.sldIN2Out56: ['/Mixer/MatrixMixerMono', 3, 3],
self.sldIN2Out78: ['/Mixer/MatrixMixerMono', 3, 4],
self.sldIN4Out910: ['/Mixer/MatrixMixerMono', 4, 0],
self.sldIN4Out12: ['/Mixer/MatrixMixerMono', 4, 1],
self.sldIN4Out34: ['/Mixer/MatrixMixerMono', 4, 2],
self.sldIN4Out56: ['/Mixer/MatrixMixerMono', 4, 3],
self.sldIN4Out78: ['/Mixer/MatrixMixerMono', 4, 4],
self.sldFX2Out910: ['/Mixer/MatrixMixerMono', 5, 0],
self.sldFX2Out12: ['/Mixer/MatrixMixerMono', 5, 1],
self.sldFX2Out34: ['/Mixer/MatrixMixerMono', 5, 2],
self.sldFX2Out56: ['/Mixer/MatrixMixerMono', 5, 3],
self.sldFX2Out78: ['/Mixer/MatrixMixerMono', 5, 4],
self.sldPC910Out910: ['/Mixer/MatrixMixerMono', 6, 0],
self.sldPC910Out12: ['/Mixer/MatrixMixerMono', 6, 1],
self.sldPC910Out34: ['/Mixer/MatrixMixerMono', 6, 2],
self.sldPC910Out56: ['/Mixer/MatrixMixerMono', 6, 3],
self.sldPC910Out78: ['/Mixer/MatrixMixerMono', 6, 4],
self.sldPC12Out910: ['/Mixer/MatrixMixerMono', 7, 0],
self.sldPC12Out12: ['/Mixer/MatrixMixerMono', 7, 1],
self.sldPC12Out34: ['/Mixer/MatrixMixerMono', 7, 2],
self.sldPC12Out56: ['/Mixer/MatrixMixerMono', 7, 3],
self.sldPC12Out78: ['/Mixer/MatrixMixerMono', 7, 4],
self.sldPC34Out910: ['/Mixer/MatrixMixerMono', 8, 0],
self.sldPC34Out12: ['/Mixer/MatrixMixerMono', 8, 1],
self.sldPC34Out34: ['/Mixer/MatrixMixerMono', 8, 2],
self.sldPC34Out56: ['/Mixer/MatrixMixerMono', 8, 3],
self.sldPC34Out78: ['/Mixer/MatrixMixerMono', 8, 4],
self.sldPC56Out910: ['/Mixer/MatrixMixerMono', 9, 0],
self.sldPC56Out12: ['/Mixer/MatrixMixerMono', 9, 1],
self.sldPC56Out34: ['/Mixer/MatrixMixerMono', 9, 2],
self.sldPC56Out56: ['/Mixer/MatrixMixerMono', 9, 3],
self.sldPC56Out78: ['/Mixer/MatrixMixerMono', 9, 4],
self.sldPC78Out910: ['/Mixer/MatrixMixerMono', 10, 0],
self.sldPC78Out12: ['/Mixer/MatrixMixerMono', 10, 1],
self.sldPC78Out34: ['/Mixer/MatrixMixerMono', 10, 2],
self.sldPC78Out56: ['/Mixer/MatrixMixerMono', 10, 3],
self.sldPC78Out78: ['/Mixer/MatrixMixerMono', 10, 4],
}
# First column is the DBUS subpath of the control.
# Second column is a list of linked controls that should
# be rewritten whenever this control is updated
self.SelectorControls={
self.chkSpdifSwitch: ['/Mixer/SpdifSwitch'],
self.chkOut12Mute: ['/Mixer/Out12Mute', [self.chkOut12HwCtrl]],
self.chkOut12HwCtrl: ['/Mixer/Out12HwCtrl'],
self.chkOut12Dim: ['/Mixer/Out12Dim'],
self.chkOut34Mute: ['/Mixer/Out34Mute', [self.chkOut34HwCtrl]],
self.chkOut34HwCtrl: ['/Mixer/Out34HwCtrl'],
self.chkOut56Mute: ['/Mixer/Out56Mute', [self.chkOut56HwCtrl]],
self.chkOut56HwCtrl: ['/Mixer/Out56HwCtrl'],
self.chkOut78Mute: ['/Mixer/Out78Mute', [self.chkOut78HwCtrl]],
self.chkOut78HwCtrl: ['/Mixer/Out78HwCtrl'],
self.chkOut910Mute: ['/Mixer/Out910Mute'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
self.sldOut78Level: ['/Mixer/Out78Level'],
}
self.TriggerButtonControls={
self.btnSaveSettings: ['/Mixer/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
}
def polledUpdate(self):
self.polledUpdateHwCtrl(self.chkOut12HwCtrl, self.sldOut12Level)
self.polledUpdateHwCtrl(self.chkOut34HwCtrl, self.sldOut34Level)
self.polledUpdateHwCtrl(self.chkOut56HwCtrl, self.sldOut56Level)
self.polledUpdateHwCtrl(self.chkOut78HwCtrl, self.sldOut78Level)
def polledUpdateHwCtrl(self, selector, volctrl):
state = selector.isChecked()
if state:
self.polledUpdateVolumeLowRes('/Mixer/MonitorDial', volctrl, 4)
volctrl.setEnabled(False)
else:
volctrl.setEnabled(True)
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
SaffireMixerBase.updateValues(self)
def switchStereoMode(self):
log.debug("should switch to stereo mode")
self.my_parent.setMonoMode(0)
self.my_parent.selectCorrectMode()
class SaffireLEMixerLarge(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/saffirele_large", self)
SaffireMixerBase.__init__(self)
log.debug("Init large Saffire LE mixer window")
self.VolumeControls={
self.sldIN1Out1: ['/Mixer/LEMix48', 0, 0],
self.sldIN1Out2: ['/Mixer/LEMix48', 0, 1],
self.sldIN1Out3: ['/Mixer/LEMix48', 0, 2],
self.sldIN1Out4: ['/Mixer/LEMix48', 0, 3],
self.sldIN2Out1: ['/Mixer/LEMix48', 1, 0],
self.sldIN2Out2: ['/Mixer/LEMix48', 1, 1],
self.sldIN2Out3: ['/Mixer/LEMix48', 1, 2],
self.sldIN2Out4: ['/Mixer/LEMix48', 1, 3],
self.sldIN3Out1: ['/Mixer/LEMix48', 2, 0],
self.sldIN3Out2: ['/Mixer/LEMix48', 2, 1],
self.sldIN3Out3: ['/Mixer/LEMix48', 2, 2],
self.sldIN3Out4: ['/Mixer/LEMix48', 2, 3],
self.sldIN4Out1: ['/Mixer/LEMix48', 3, 0],
self.sldIN4Out2: ['/Mixer/LEMix48', 3, 1],
self.sldIN4Out3: ['/Mixer/LEMix48', 3, 2],
self.sldIN4Out4: ['/Mixer/LEMix48', 3, 3],
self.sldSPDIF1Out1: ['/Mixer/LEMix48', 4, 0],
self.sldSPDIF1Out2: ['/Mixer/LEMix48', 4, 1],
self.sldSPDIF1Out3: ['/Mixer/LEMix48', 4, 2],
self.sldSPDIF1Out4: ['/Mixer/LEMix48', 4, 3],
self.sldSPDIF2Out1: ['/Mixer/LEMix48', 5, 0],
self.sldSPDIF2Out2: ['/Mixer/LEMix48', 5, 1],
self.sldSPDIF2Out3: ['/Mixer/LEMix48', 5, 2],
self.sldSPDIF2Out4: ['/Mixer/LEMix48', 5, 3],
self.sldPC1Out1: ['/Mixer/LEMix48', 6, 0],
self.sldPC1Out2: ['/Mixer/LEMix48', 6, 1],
self.sldPC1Out3: ['/Mixer/LEMix48', 6, 2],
self.sldPC1Out4: ['/Mixer/LEMix48', 6, 3],
self.sldPC2Out1: ['/Mixer/LEMix48', 7, 0],
self.sldPC2Out2: ['/Mixer/LEMix48', 7, 1],
self.sldPC2Out3: ['/Mixer/LEMix48', 7, 2],
self.sldPC2Out4: ['/Mixer/LEMix48', 7, 3],
self.sldPC3Out1: ['/Mixer/LEMix48', 8, 0],
self.sldPC3Out2: ['/Mixer/LEMix48', 8, 1],
self.sldPC3Out3: ['/Mixer/LEMix48', 8, 2],
self.sldPC3Out4: ['/Mixer/LEMix48', 8, 3],
self.sldPC4Out1: ['/Mixer/LEMix48', 9, 0],
self.sldPC4Out2: ['/Mixer/LEMix48', 9, 1],
self.sldPC4Out3: ['/Mixer/LEMix48', 9, 2],
self.sldPC4Out4: ['/Mixer/LEMix48', 9, 3],
self.sldPC5Out1: ['/Mixer/LEMix48', 10, 0],
self.sldPC5Out2: ['/Mixer/LEMix48', 10, 1],
self.sldPC5Out3: ['/Mixer/LEMix48', 10, 2],
self.sldPC5Out4: ['/Mixer/LEMix48', 10, 3],
self.sldPC6Out1: ['/Mixer/LEMix48', 11, 0],
self.sldPC6Out2: ['/Mixer/LEMix48', 11, 1],
self.sldPC6Out3: ['/Mixer/LEMix48', 11, 2],
self.sldPC6Out4: ['/Mixer/LEMix48', 11, 3],
self.sldPC7Out1: ['/Mixer/LEMix48', 12, 0],
self.sldPC7Out2: ['/Mixer/LEMix48', 12, 1],
self.sldPC7Out3: ['/Mixer/LEMix48', 12, 2],
self.sldPC7Out4: ['/Mixer/LEMix48', 12, 3],
self.sldPC8Out1: ['/Mixer/LEMix48', 13, 0],
self.sldPC8Out2: ['/Mixer/LEMix48', 13, 1],
self.sldPC8Out3: ['/Mixer/LEMix48', 13, 2],
self.sldPC8Out4: ['/Mixer/LEMix48', 13, 3],
}
self.SelectorControls={
self.chkOut12Mute: ['/Mixer/Out12Mute'],
self.chkOut12HwCtrl: ['/Mixer/Out12HwCtrl'],
self.chkOut34Mute: ['/Mixer/Out34Mute'],
self.chkOut34HwCtrl: ['/Mixer/Out34HwCtrl'],
self.chkOut56Mute: ['/Mixer/Out56Mute'],
self.chkOut56HwCtrl: ['/Mixer/Out56HwCtrl'],
self.chkSPDIFTransparent: ['/Mixer/SpdifTransparent'],
self.chkMIDITru: ['/Mixer/MidiThru'],
self.chkHighGain3: ['/Mixer/HighGainLine3'],
self.chkHighGain4: ['/Mixer/HighGainLine4'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
}
self.TriggerButtonControls={
self.btnSaveSettings: ['/Mixer/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
}
def polledUpdate(self):
#fixme do what it takes to make the gui follow the front panel dial
pass
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
SaffireMixerBase.updateValues(self)
class SaffireLEMixerSmall(QWidget, SaffireMixerBase):
def __init__(self,parent = None):
self.my_parent = parent
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/saffirele_small", self)
SaffireMixerBase.__init__(self)
log.debug("Init small Saffire LE mixer window")
self.VolumeControls={
self.sldIN1RecMix: ['/Mixer/LEMix96', 0, 4],
self.sldIN2RecMix: ['/Mixer/LEMix96', 1, 4],
self.sldIN3RecMix: ['/Mixer/LEMix96', 2, 4],
self.sldIN4RecMix: ['/Mixer/LEMix96', 3, 4],
self.sldSPDIF1RecMix: ['/Mixer/LEMix96', 4, 4],
self.sldSPDIF2RecMix: ['/Mixer/LEMix96', 5, 4],
self.sldPC1Out1: ['/Mixer/LEMix96', 6, 0],
self.sldPC1Out2: ['/Mixer/LEMix96', 6, 1],
self.sldPC1Out3: ['/Mixer/LEMix96', 6, 2],
self.sldPC1Out4: ['/Mixer/LEMix96', 6, 3],
self.sldPC2Out1: ['/Mixer/LEMix96', 7, 0],
self.sldPC2Out2: ['/Mixer/LEMix96', 7, 1],
self.sldPC2Out3: ['/Mixer/LEMix96', 7, 2],
self.sldPC2Out4: ['/Mixer/LEMix96', 7, 3],
}
self.SelectorControls={
self.chkOut12Mute: ['/Mixer/Out12Mute'],
self.chkOut12HwCtrl: ['/Mixer/Out12HwCtrl'],
self.chkOut34Mute: ['/Mixer/Out34Mute'],
self.chkOut34HwCtrl: ['/Mixer/Out34HwCtrl'],
self.chkOut56Mute: ['/Mixer/Out56Mute'],
self.chkOut56HwCtrl: ['/Mixer/Out56HwCtrl'],
self.chkSPDIFTransparent: ['/Mixer/SpdifTransparent'],
self.chkMIDITru: ['/Mixer/MidiThru'],
self.chkHighGain3: ['/Mixer/HighGainLine3'],
self.chkHighGain4: ['/Mixer/HighGainLine4'],
}
self.VolumeControlsLowRes={
self.sldOut12Level: ['/Mixer/Out12Level'],
self.sldOut34Level: ['/Mixer/Out34Level'],
self.sldOut56Level: ['/Mixer/Out56Level'],
}
self.TriggerButtonControls={
self.btnSaveSettings: ['/Mixer/SaveSettings'],
}
self.TextControls={
}
self.saveTextControls={
}
self.ComboControls={
}
def polledUpdate(self):
#fixme do what it takes to make the gui follow the front panel dial
pass
def updateMatrixVolume(self,a0):
SaffireMixerBase.updateMatrixVolume(self,a0)
def updateLowResVolume(self,a0):
SaffireMixerBase.updateLowResVolume(self,a0)
def updateSelector(self,a0):
SaffireMixerBase.updateSelector(self,a0)
def triggerButton(self):
SaffireMixerBase.triggerButton(self)
def saveText(self):
SaffireMixerBase.saveText(self)
def initCombo(self, combo):
SaffireMixerBase.initCombo(self,combo)
def selectCombo(self, mode):
SaffireMixerBase.selectCombo(self,mode)
def updateValues(self):
SaffireMixerBase.updateValues(self)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/motu_mark3.py 0000644 0001750 0000144 00000005274 13114471135 023071 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
# Copyright (C) 2008, 2013 by Jonathan Woithe
#
# 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 .
#
# from PyQt4.QtGui import QWidget, QApplication
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('motu_mark3')
# Model defines. These must agree with what is used in motu_avdevice.h.
MOTU_MODEL_NONE = 0x0000
MOTU_MODEL_828mkII = 0x0001
MOTU_MODEL_TRAVELER = 0x0002
MOTU_MODEL_ULTRALITE = 0x0003
MOTU_MODEL_8PRE = 0x0004
MOTU_MODEL_828MkI = 0x0005
MOTU_MODEL_896HD = 0x0006
MOTU_MODEL_828mk3 = 0x0007
MOTU_MODEL_ULTRALITEmk3 = 0x0008
MOTU_MODEL_ULTRALITEmk3_HYB = 0x0009
MOTU_MODEL_TRAVELERmk3 = 0x000a
MOTU_MODEL_896HDmk3 = 0x000b
class Motu_Mark3(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/motu_mark3", self)
self.init()
def init(self):
# Initialise any object members as needed
# Other mixer variables
self.is_streaming = 0
self.sample_rate = 0
self.model = MOTU_MODEL_NONE
# Hide and disable a control
def disable_hide(self,widget):
widget.hide()
widget.setEnabled(False)
def initValues_g3(self):
# Set up widgets for generation-3 (aka Mark-3) devices
return
def initValues(self):
# Is the device streaming?
self.is_streaming = self.hw.getDiscrete('/Mixer/Info/IsStreaming')
log.debug("device streaming flag: %d" % (self.is_streaming))
# Retrieve other device settings as needed and customise the UI
# based on these options.
self.model = self.hw.getDiscrete('/Mixer/Info/Model')
log.debug("device model identifier: %d" % (self.model))
self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate')
log.debug("device sample rate: %d" % (self.sample_rate))
self.initValues_g3()
libffado-2.4.2/support/mixer-qt4/ffado/mixer/motu.py 0000644 0001750 0000144 00000132400 13114471135 021764 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
# Copyright (C) 2008 by Jonathan Woithe
#
# 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 .
#
# from PyQt4.QtCore import Qt
# from PyQt4.QtGui import QWidget, QApplication
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('motu')
# Model defines. These must agree with what is used in motu_avdevice.h.
MOTU_MODEL_NONE = 0x0000
MOTU_MODEL_828mkII = 0x0001
MOTU_MODEL_TRAVELER = 0x0002
MOTU_MODEL_ULTRALITE = 0x0003
MOTU_MODEL_8PRE = 0x0004
MOTU_MODEL_828MkI = 0x0005
MOTU_MODEL_896HD = 0x0006
MOTU_MODEL_828mk3 = 0x0007
MOTU_MODEL_ULTRALITEmk3 = 0x0008
MOTU_MODEL_ULTRALITEmk3_HYB = 0x0009
MOTU_MODEL_TRAVELERmk3 = 0x000a
MOTU_MODEL_896HDmk3 = 0x000b
class Motu(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/motu", self)
self.init()
def init(self):
# For matrix mixer controls (channel faders, pans, solos, mutes) the
# first index (the row) is the zero-based mix number while the
# second index (the column) is the zero-based channel number. The
# third index gives the control of the stereo pair of the control
# used as the key. The order of the channel enumeration must agree
# with that used when creating the dbus controls within
# motu_avdevice.cpp.
self.ChannelFaders={
self.mix1ana1_fader: ['/Mixer/fader', 0, 0, self.mix1ana2_fader],
self.mix1ana2_fader: ['/Mixer/fader', 0, 1, self.mix1ana1_fader],
self.mix1ana3_fader: ['/Mixer/fader', 0, 2, self.mix1ana4_fader],
self.mix1ana4_fader: ['/Mixer/fader', 0, 3, self.mix1ana3_fader],
self.mix1ana5_fader: ['/Mixer/fader', 0, 4, self.mix1ana6_fader],
self.mix1ana6_fader: ['/Mixer/fader', 0, 5, self.mix1ana5_fader],
self.mix1ana7_fader: ['/Mixer/fader', 0, 6, self.mix1ana8_fader],
self.mix1ana8_fader: ['/Mixer/fader', 0, 7, self.mix1ana7_fader],
self.mix1aes1_fader: ['/Mixer/fader', 0, 8, self.mix1aes2_fader],
self.mix1aes2_fader: ['/Mixer/fader', 0, 9, self.mix1aes1_fader],
self.mix1spdif1_fader: ['/Mixer/fader', 0, 10, self.mix1spdif2_fader],
self.mix1spdif2_fader: ['/Mixer/fader', 0, 11, self.mix1spdif1_fader],
self.mix1adat1_fader: ['/Mixer/fader', 0, 12, self.mix1adat2_fader],
self.mix1adat2_fader: ['/Mixer/fader', 0, 13, self.mix1adat1_fader],
self.mix1adat3_fader: ['/Mixer/fader', 0, 14, self.mix1adat4_fader],
self.mix1adat4_fader: ['/Mixer/fader', 0, 15, self.mix1adat3_fader],
self.mix1adat5_fader: ['/Mixer/fader', 0, 16, self.mix1adat6_fader],
self.mix1adat6_fader: ['/Mixer/fader', 0, 17, self.mix1adat5_fader],
self.mix1adat7_fader: ['/Mixer/fader', 0, 18, self.mix1adat8_fader],
self.mix1adat8_fader: ['/Mixer/fader', 0, 19, self.mix1adat7_fader],
self.mix2ana1_fader: ['/Mixer/fader', 1, 0, self.mix2ana2_fader],
self.mix2ana2_fader: ['/Mixer/fader', 1, 1, self.mix2ana1_fader],
self.mix2ana3_fader: ['/Mixer/fader', 1, 2, self.mix2ana4_fader],
self.mix2ana4_fader: ['/Mixer/fader', 1, 3, self.mix2ana3_fader],
self.mix2ana5_fader: ['/Mixer/fader', 1, 4, self.mix2ana6_fader],
self.mix2ana6_fader: ['/Mixer/fader', 1, 5, self.mix2ana5_fader],
self.mix2ana7_fader: ['/Mixer/fader', 1, 6, self.mix2ana8_fader],
self.mix2ana8_fader: ['/Mixer/fader', 1, 7, self.mix2ana7_fader],
self.mix2aes1_fader: ['/Mixer/fader', 1, 8, self.mix2aes2_fader],
self.mix2aes2_fader: ['/Mixer/fader', 1, 9, self.mix2aes1_fader],
self.mix2spdif1_fader: ['/Mixer/fader', 1, 10, self.mix2spdif2_fader],
self.mix2spdif2_fader: ['/Mixer/fader', 1, 11, self.mix2spdif1_fader],
self.mix2adat1_fader: ['/Mixer/fader', 1, 12, self.mix2adat2_fader],
self.mix2adat2_fader: ['/Mixer/fader', 1, 13, self.mix2adat1_fader],
self.mix2adat3_fader: ['/Mixer/fader', 1, 14, self.mix2adat4_fader],
self.mix2adat4_fader: ['/Mixer/fader', 1, 15, self.mix2adat3_fader],
self.mix2adat5_fader: ['/Mixer/fader', 1, 16, self.mix2adat6_fader],
self.mix2adat6_fader: ['/Mixer/fader', 1, 17, self.mix2adat5_fader],
self.mix2adat7_fader: ['/Mixer/fader', 1, 18, self.mix2adat8_fader],
self.mix2adat8_fader: ['/Mixer/fader', 1, 19, self.mix2adat7_fader],
self.mix3ana1_fader: ['/Mixer/fader', 2, 0, self.mix3ana2_fader],
self.mix3ana2_fader: ['/Mixer/fader', 2, 1, self.mix3ana1_fader],
self.mix3ana3_fader: ['/Mixer/fader', 2, 2, self.mix3ana4_fader],
self.mix3ana4_fader: ['/Mixer/fader', 2, 3, self.mix3ana3_fader],
self.mix3ana5_fader: ['/Mixer/fader', 2, 4, self.mix3ana6_fader],
self.mix3ana6_fader: ['/Mixer/fader', 2, 5, self.mix3ana5_fader],
self.mix3ana7_fader: ['/Mixer/fader', 2, 6, self.mix3ana8_fader],
self.mix3ana8_fader: ['/Mixer/fader', 2, 7, self.mix3ana7_fader],
self.mix3aes1_fader: ['/Mixer/fader', 2, 8, self.mix3aes2_fader],
self.mix3aes2_fader: ['/Mixer/fader', 2, 9, self.mix3aes1_fader],
self.mix3spdif1_fader: ['/Mixer/fader', 2, 10, self.mix3spdif2_fader],
self.mix3spdif2_fader: ['/Mixer/fader', 2, 11, self.mix3spdif1_fader],
self.mix3adat1_fader: ['/Mixer/fader', 2, 12, self.mix3adat2_fader],
self.mix3adat2_fader: ['/Mixer/fader', 2, 13, self.mix3adat1_fader],
self.mix3adat3_fader: ['/Mixer/fader', 2, 14, self.mix3adat4_fader],
self.mix3adat4_fader: ['/Mixer/fader', 2, 15, self.mix3adat3_fader],
self.mix3adat5_fader: ['/Mixer/fader', 2, 16, self.mix3adat6_fader],
self.mix3adat6_fader: ['/Mixer/fader', 2, 17, self.mix3adat5_fader],
self.mix3adat7_fader: ['/Mixer/fader', 2, 18, self.mix3adat8_fader],
self.mix3adat8_fader: ['/Mixer/fader', 2, 19, self.mix3adat7_fader],
self.mix4ana1_fader: ['/Mixer/fader', 3, 0, self.mix4ana2_fader],
self.mix4ana2_fader: ['/Mixer/fader', 3, 1, self.mix4ana1_fader],
self.mix4ana3_fader: ['/Mixer/fader', 3, 2, self.mix4ana4_fader],
self.mix4ana4_fader: ['/Mixer/fader', 3, 3, self.mix4ana3_fader],
self.mix4ana5_fader: ['/Mixer/fader', 3, 4, self.mix4ana6_fader],
self.mix4ana6_fader: ['/Mixer/fader', 3, 5, self.mix4ana5_fader],
self.mix4ana7_fader: ['/Mixer/fader', 3, 6, self.mix4ana8_fader],
self.mix4ana8_fader: ['/Mixer/fader', 3, 7, self.mix4ana7_fader],
self.mix4aes1_fader: ['/Mixer/fader', 3, 8, self.mix4aes2_fader],
self.mix4aes2_fader: ['/Mixer/fader', 3, 9, self.mix4aes1_fader],
self.mix4spdif1_fader: ['/Mixer/fader', 3, 10, self.mix4spdif2_fader],
self.mix4spdif2_fader: ['/Mixer/fader', 3, 11, self.mix4spdif1_fader],
self.mix4adat1_fader: ['/Mixer/fader', 3, 12, self.mix4adat2_fader],
self.mix4adat2_fader: ['/Mixer/fader', 3, 13, self.mix4adat1_fader],
self.mix4adat3_fader: ['/Mixer/fader', 3, 14, self.mix4adat4_fader],
self.mix4adat4_fader: ['/Mixer/fader', 3, 15, self.mix4adat3_fader],
self.mix4adat5_fader: ['/Mixer/fader', 3, 16, self.mix4adat6_fader],
self.mix4adat6_fader: ['/Mixer/fader', 3, 17, self.mix4adat5_fader],
self.mix4adat7_fader: ['/Mixer/fader', 3, 18, self.mix4adat8_fader],
self.mix4adat8_fader: ['/Mixer/fader', 3, 19, self.mix4adat7_fader],
}
self.Faders={
self.mix1_fader: ['/Mixer/Mix1/Mix_fader'],
self.mix2_fader: ['/Mixer/Mix2/Mix_fader'],
self.mix3_fader: ['/Mixer/Mix3/Mix_fader'],
self.mix4_fader: ['/Mixer/Mix4/Mix_fader'],
self.mainout_fader: ['/Mixer/Mainout_fader'],
self.phones_fader: ['/Mixer/Phones_fader'],
}
self.ChannelControls={
self.mix1ana1_pan: ['/Mixer/pan', 0, 0],
self.mix1ana2_pan: ['/Mixer/pan', 0, 1],
self.mix1ana3_pan: ['/Mixer/pan', 0, 2],
self.mix1ana4_pan: ['/Mixer/pan', 0, 3],
self.mix1ana5_pan: ['/Mixer/pan', 0, 4],
self.mix1ana6_pan: ['/Mixer/pan', 0, 5],
self.mix1ana7_pan: ['/Mixer/pan', 0, 6],
self.mix1ana8_pan: ['/Mixer/pan', 0, 7],
self.mix1aes1_pan: ['/Mixer/pan', 0, 8],
self.mix1aes2_pan: ['/Mixer/pan', 0, 9],
self.mix1spdif1_pan: ['/Mixer/pan', 0, 10],
self.mix1spdif2_pan: ['/Mixer/pan', 0, 11],
self.mix1adat1_pan: ['/Mixer/pan', 0, 12],
self.mix1adat2_pan: ['/Mixer/pan', 0, 13],
self.mix1adat3_pan: ['/Mixer/pan', 0, 14],
self.mix1adat4_pan: ['/Mixer/pan', 0, 15],
self.mix1adat5_pan: ['/Mixer/pan', 0, 16],
self.mix1adat6_pan: ['/Mixer/pan', 0, 17],
self.mix1adat7_pan: ['/Mixer/pan', 0, 18],
self.mix1adat8_pan: ['/Mixer/pan', 0, 19],
self.mix2ana1_pan: ['/Mixer/pan', 1, 0],
self.mix2ana2_pan: ['/Mixer/pan', 1, 1],
self.mix2ana3_pan: ['/Mixer/pan', 1, 2],
self.mix2ana4_pan: ['/Mixer/pan', 1, 3],
self.mix2ana5_pan: ['/Mixer/pan', 1, 4],
self.mix2ana6_pan: ['/Mixer/pan', 1, 5],
self.mix2ana7_pan: ['/Mixer/pan', 1, 6],
self.mix2ana8_pan: ['/Mixer/pan', 1, 7],
self.mix2aes1_pan: ['/Mixer/pan', 1, 8],
self.mix2aes2_pan: ['/Mixer/pan', 1, 9],
self.mix2spdif1_pan: ['/Mixer/pan', 1, 10],
self.mix2spdif2_pan: ['/Mixer/pan', 1, 11],
self.mix2adat1_pan: ['/Mixer/pan', 1, 12],
self.mix2adat2_pan: ['/Mixer/pan', 1, 13],
self.mix2adat3_pan: ['/Mixer/pan', 1, 14],
self.mix2adat4_pan: ['/Mixer/pan', 1, 15],
self.mix2adat5_pan: ['/Mixer/pan', 1, 16],
self.mix2adat6_pan: ['/Mixer/pan', 1, 17],
self.mix2adat7_pan: ['/Mixer/pan', 1, 18],
self.mix2adat8_pan: ['/Mixer/pan', 1, 19],
self.mix3ana1_pan: ['/Mixer/pan', 2, 0],
self.mix3ana2_pan: ['/Mixer/pan', 2, 1],
self.mix3ana3_pan: ['/Mixer/pan', 2, 2],
self.mix3ana4_pan: ['/Mixer/pan', 2, 3],
self.mix3ana5_pan: ['/Mixer/pan', 2, 4],
self.mix3ana6_pan: ['/Mixer/pan', 2, 5],
self.mix3ana7_pan: ['/Mixer/pan', 2, 6],
self.mix3ana8_pan: ['/Mixer/pan', 2, 7],
self.mix3aes1_pan: ['/Mixer/pan', 2, 8],
self.mix3aes2_pan: ['/Mixer/pan', 2, 9],
self.mix3spdif1_pan: ['/Mixer/pan', 2, 10],
self.mix3spdif2_pan: ['/Mixer/pan', 2, 11],
self.mix3adat1_pan: ['/Mixer/pan', 2, 12],
self.mix3adat2_pan: ['/Mixer/pan', 2, 13],
self.mix3adat3_pan: ['/Mixer/pan', 2, 14],
self.mix3adat4_pan: ['/Mixer/pan', 2, 15],
self.mix3adat5_pan: ['/Mixer/pan', 2, 16],
self.mix3adat6_pan: ['/Mixer/pan', 2, 17],
self.mix3adat7_pan: ['/Mixer/pan', 2, 18],
self.mix3adat8_pan: ['/Mixer/pan', 2, 19],
self.mix4ana1_pan: ['/Mixer/pan', 3, 0],
self.mix4ana2_pan: ['/Mixer/pan', 3, 1],
self.mix4ana3_pan: ['/Mixer/pan', 3, 2],
self.mix4ana4_pan: ['/Mixer/pan', 3, 3],
self.mix4ana5_pan: ['/Mixer/pan', 3, 4],
self.mix4ana6_pan: ['/Mixer/pan', 3, 5],
self.mix4ana7_pan: ['/Mixer/pan', 3, 6],
self.mix4ana8_pan: ['/Mixer/pan', 3, 7],
self.mix4aes1_pan: ['/Mixer/pan', 3, 8],
self.mix4aes2_pan: ['/Mixer/pan', 3, 9],
self.mix4spdif1_pan: ['/Mixer/pan', 3, 10],
self.mix4spdif2_pan: ['/Mixer/pan', 3, 11],
self.mix4adat1_pan: ['/Mixer/pan', 3, 12],
self.mix4adat2_pan: ['/Mixer/pan', 3, 13],
self.mix4adat3_pan: ['/Mixer/pan', 3, 14],
self.mix4adat4_pan: ['/Mixer/pan', 3, 15],
self.mix4adat5_pan: ['/Mixer/pan', 3, 16],
self.mix4adat6_pan: ['/Mixer/pan', 3, 17],
self.mix4adat7_pan: ['/Mixer/pan', 3, 18],
self.mix4adat8_pan: ['/Mixer/pan', 3, 19],
}
self.Controls={
self.ana1_trimgain: ['/Mixer/Control/Ana1_trimgain'],
self.ana2_trimgain: ['/Mixer/Control/Ana2_trimgain'],
self.ana3_trimgain: ['/Mixer/Control/Ana3_trimgain'],
self.ana4_trimgain: ['/Mixer/Control/Ana4_trimgain'],
self.ana5_trimgain: ['/Mixer/Control/Ana5_trimgain'],
self.ana6_trimgain: ['/Mixer/Control/Ana6_trimgain'],
self.ana7_trimgain: ['/Mixer/Control/Ana7_trimgain'],
self.ana8_trimgain: ['/Mixer/Control/Ana8_trimgain'],
self.spdif1_trimgain: ['/Mixer/Control/Spdif1_trimgain'],
self.spdif2_trimgain: ['/Mixer/Control/Spdif2_trimgain'],
}
self.ChannelBinarySwitches={
self.mix1ana1_mute: ['/Mixer/mute', 0, 0],
self.mix1ana2_mute: ['/Mixer/mute', 0, 1],
self.mix1ana3_mute: ['/Mixer/mute', 0, 2],
self.mix1ana4_mute: ['/Mixer/mute', 0, 3],
self.mix1ana5_mute: ['/Mixer/mute', 0, 4],
self.mix1ana6_mute: ['/Mixer/mute', 0, 5],
self.mix1ana7_mute: ['/Mixer/mute', 0, 6],
self.mix1ana8_mute: ['/Mixer/mute', 0, 7],
self.mix1aes1_mute: ['/Mixer/mute', 0, 8],
self.mix1aes2_mute: ['/Mixer/mute', 0, 9],
self.mix1spdif1_mute: ['/Mixer/mute', 0, 10],
self.mix1spdif2_mute: ['/Mixer/mute', 0, 11],
self.mix1adat1_mute: ['/Mixer/mute', 0, 12],
self.mix1adat2_mute: ['/Mixer/mute', 0, 13],
self.mix1adat3_mute: ['/Mixer/mute', 0, 14],
self.mix1adat4_mute: ['/Mixer/mute', 0, 15],
self.mix1adat5_mute: ['/Mixer/mute', 0, 16],
self.mix1adat6_mute: ['/Mixer/mute', 0, 17],
self.mix1adat7_mute: ['/Mixer/mute', 0, 18],
self.mix1adat8_mute: ['/Mixer/mute', 0, 19],
self.mix1ana1_solo: ['/Mixer/solo', 0, 0],
self.mix1ana2_solo: ['/Mixer/solo', 0, 1],
self.mix1ana3_solo: ['/Mixer/solo', 0, 2],
self.mix1ana4_solo: ['/Mixer/solo', 0, 3],
self.mix1ana5_solo: ['/Mixer/solo', 0, 4],
self.mix1ana6_solo: ['/Mixer/solo', 0, 5],
self.mix1ana7_solo: ['/Mixer/solo', 0, 6],
self.mix1ana8_solo: ['/Mixer/solo', 0, 7],
self.mix1aes1_solo: ['/Mixer/solo', 0, 8],
self.mix1aes2_solo: ['/Mixer/solo', 0, 9],
self.mix1spdif1_solo: ['/Mixer/solo', 0, 10],
self.mix1spdif2_solo: ['/Mixer/solo', 0, 11],
self.mix1adat1_solo: ['/Mixer/solo', 0, 12],
self.mix1adat2_solo: ['/Mixer/solo', 0, 13],
self.mix1adat3_solo: ['/Mixer/solo', 0, 14],
self.mix1adat4_solo: ['/Mixer/solo', 0, 15],
self.mix1adat5_solo: ['/Mixer/solo', 0, 16],
self.mix1adat6_solo: ['/Mixer/solo', 0, 17],
self.mix1adat7_solo: ['/Mixer/solo', 0, 18],
self.mix1adat8_solo: ['/Mixer/solo', 0, 19],
self.mix2ana1_mute: ['/Mixer/mute', 1, 0],
self.mix2ana2_mute: ['/Mixer/mute', 1, 1],
self.mix2ana3_mute: ['/Mixer/mute', 1, 2],
self.mix2ana4_mute: ['/Mixer/mute', 1, 3],
self.mix2ana5_mute: ['/Mixer/mute', 1, 4],
self.mix2ana6_mute: ['/Mixer/mute', 1, 5],
self.mix2ana7_mute: ['/Mixer/mute', 1, 6],
self.mix2ana8_mute: ['/Mixer/mute', 1, 7],
self.mix2aes1_mute: ['/Mixer/mute', 1, 8],
self.mix2aes2_mute: ['/Mixer/mute', 1, 9],
self.mix2spdif1_mute: ['/Mixer/mute', 1, 10],
self.mix2spdif2_mute: ['/Mixer/mute', 1, 11],
self.mix2adat1_mute: ['/Mixer/mute', 1, 12],
self.mix2adat2_mute: ['/Mixer/mute', 1, 13],
self.mix2adat3_mute: ['/Mixer/mute', 1, 14],
self.mix2adat4_mute: ['/Mixer/mute', 1, 15],
self.mix2adat5_mute: ['/Mixer/mute', 1, 16],
self.mix2adat6_mute: ['/Mixer/mute', 1, 17],
self.mix2adat7_mute: ['/Mixer/mute', 1, 18],
self.mix2adat8_mute: ['/Mixer/mute', 1, 19],
self.mix2ana1_solo: ['/Mixer/solo', 1, 0],
self.mix2ana2_solo: ['/Mixer/solo', 1, 1],
self.mix2ana3_solo: ['/Mixer/solo', 1, 2],
self.mix2ana4_solo: ['/Mixer/solo', 1, 3],
self.mix2ana5_solo: ['/Mixer/solo', 1, 4],
self.mix2ana6_solo: ['/Mixer/solo', 1, 5],
self.mix2ana7_solo: ['/Mixer/solo', 1, 6],
self.mix2ana8_solo: ['/Mixer/solo', 1, 7],
self.mix2aes1_solo: ['/Mixer/solo', 1, 8],
self.mix2aes2_solo: ['/Mixer/solo', 1, 9],
self.mix2spdif1_solo: ['/Mixer/solo', 1, 10],
self.mix2spdif2_solo: ['/Mixer/solo', 1, 11],
self.mix2adat1_solo: ['/Mixer/solo', 1, 12],
self.mix2adat2_solo: ['/Mixer/solo', 1, 13],
self.mix2adat3_solo: ['/Mixer/solo', 1, 14],
self.mix2adat4_solo: ['/Mixer/solo', 1, 15],
self.mix2adat5_solo: ['/Mixer/solo', 1, 16],
self.mix2adat6_solo: ['/Mixer/solo', 1, 17],
self.mix2adat7_solo: ['/Mixer/solo', 1, 18],
self.mix2adat8_solo: ['/Mixer/solo', 1, 19],
self.mix3ana1_mute: ['/Mixer/mute', 2, 0],
self.mix3ana2_mute: ['/Mixer/mute', 2, 1],
self.mix3ana3_mute: ['/Mixer/mute', 2, 2],
self.mix3ana4_mute: ['/Mixer/mute', 2, 3],
self.mix3ana5_mute: ['/Mixer/mute', 2, 4],
self.mix3ana6_mute: ['/Mixer/mute', 2, 5],
self.mix3ana7_mute: ['/Mixer/mute', 2, 6],
self.mix3ana8_mute: ['/Mixer/mute', 2, 7],
self.mix3aes1_mute: ['/Mixer/mute', 2, 8],
self.mix3aes2_mute: ['/Mixer/mute', 2, 9],
self.mix3spdif1_mute: ['/Mixer/mute', 2, 10],
self.mix3spdif2_mute: ['/Mixer/mute', 2, 11],
self.mix3adat1_mute: ['/Mixer/mute', 2, 12],
self.mix3adat2_mute: ['/Mixer/mute', 2, 13],
self.mix3adat3_mute: ['/Mixer/mute', 2, 14],
self.mix3adat4_mute: ['/Mixer/mute', 2, 15],
self.mix3adat5_mute: ['/Mixer/mute', 2, 16],
self.mix3adat6_mute: ['/Mixer/mute', 2, 17],
self.mix3adat7_mute: ['/Mixer/mute', 2, 18],
self.mix3adat8_mute: ['/Mixer/mute', 2, 19],
self.mix3ana1_solo: ['/Mixer/solo', 2, 0],
self.mix3ana2_solo: ['/Mixer/solo', 2, 1],
self.mix3ana3_solo: ['/Mixer/solo', 2, 2],
self.mix3ana4_solo: ['/Mixer/solo', 2, 3],
self.mix3ana5_solo: ['/Mixer/solo', 2, 4],
self.mix3ana6_solo: ['/Mixer/solo', 2, 5],
self.mix3ana7_solo: ['/Mixer/solo', 2, 6],
self.mix3ana8_solo: ['/Mixer/solo', 2, 7],
self.mix3aes1_solo: ['/Mixer/solo', 2, 8],
self.mix3aes2_solo: ['/Mixer/solo', 2, 9],
self.mix3spdif1_solo: ['/Mixer/solo', 2, 10],
self.mix3spdif2_solo: ['/Mixer/solo', 2, 11],
self.mix3adat1_solo: ['/Mixer/solo', 2, 12],
self.mix3adat2_solo: ['/Mixer/solo', 2, 13],
self.mix3adat3_solo: ['/Mixer/solo', 2, 14],
self.mix3adat4_solo: ['/Mixer/solo', 2, 15],
self.mix3adat5_solo: ['/Mixer/solo', 2, 16],
self.mix3adat6_solo: ['/Mixer/solo', 2, 17],
self.mix3adat7_solo: ['/Mixer/solo', 2, 18],
self.mix3adat8_solo: ['/Mixer/solo', 2, 19],
self.mix4ana1_mute: ['/Mixer/mute', 3, 0],
self.mix4ana2_mute: ['/Mixer/mute', 3, 1],
self.mix4ana3_mute: ['/Mixer/mute', 3, 2],
self.mix4ana4_mute: ['/Mixer/mute', 3, 3],
self.mix4ana5_mute: ['/Mixer/mute', 3, 4],
self.mix4ana6_mute: ['/Mixer/mute', 3, 5],
self.mix4ana7_mute: ['/Mixer/mute', 3, 6],
self.mix4ana8_mute: ['/Mixer/mute', 3, 7],
self.mix4aes1_mute: ['/Mixer/mute', 3, 8],
self.mix4aes2_mute: ['/Mixer/mute', 3, 9],
self.mix4spdif1_mute: ['/Mixer/mute', 3, 10],
self.mix4spdif2_mute: ['/Mixer/mute', 3, 11],
self.mix4adat1_mute: ['/Mixer/mute', 3, 12],
self.mix4adat2_mute: ['/Mixer/mute', 3, 13],
self.mix4adat3_mute: ['/Mixer/mute', 3, 14],
self.mix4adat4_mute: ['/Mixer/mute', 3, 15],
self.mix4adat5_mute: ['/Mixer/mute', 3, 16],
self.mix4adat6_mute: ['/Mixer/mute', 3, 17],
self.mix4adat7_mute: ['/Mixer/mute', 3, 18],
self.mix4adat8_mute: ['/Mixer/mute', 3, 19],
self.mix4ana1_solo: ['/Mixer/solo', 3, 0],
self.mix4ana2_solo: ['/Mixer/solo', 3, 1],
self.mix4ana3_solo: ['/Mixer/solo', 3, 2],
self.mix4ana4_solo: ['/Mixer/solo', 3, 3],
self.mix4ana5_solo: ['/Mixer/solo', 3, 4],
self.mix4ana6_solo: ['/Mixer/solo', 3, 5],
self.mix4ana7_solo: ['/Mixer/solo', 3, 6],
self.mix4ana8_solo: ['/Mixer/solo', 3, 7],
self.mix4aes1_solo: ['/Mixer/solo', 3, 8],
self.mix4aes2_solo: ['/Mixer/solo', 3, 9],
self.mix4spdif1_solo: ['/Mixer/solo', 3, 10],
self.mix4spdif2_solo: ['/Mixer/solo', 3, 11],
self.mix4adat1_solo: ['/Mixer/solo', 3, 12],
self.mix4adat2_solo: ['/Mixer/solo', 3, 13],
self.mix4adat3_solo: ['/Mixer/solo', 3, 14],
self.mix4adat4_solo: ['/Mixer/solo', 3, 15],
self.mix4adat5_solo: ['/Mixer/solo', 3, 16],
self.mix4adat6_solo: ['/Mixer/solo', 3, 17],
self.mix4adat7_solo: ['/Mixer/solo', 3, 18],
self.mix4adat8_solo: ['/Mixer/solo', 3, 19],
}
self.BinarySwitches={
self.mix1_mute: ['/Mixer/Mix1/Mix_mute'],
self.mix2_mute: ['/Mixer/Mix2/Mix_mute'],
self.mix3_mute: ['/Mixer/Mix3/Mix_mute'],
self.mix4_mute: ['/Mixer/Mix4/Mix_mute'],
self.ana1_pad: ['/Mixer/Control/Ana1_pad'],
self.ana2_pad: ['/Mixer/Control/Ana2_pad'],
self.ana3_pad: ['/Mixer/Control/Ana3_pad'],
self.ana4_pad: ['/Mixer/Control/Ana4_pad'],
self.ana5_pad: ['/Mixer/Control/Ana5_pad'],
self.ana6_pad: ['/Mixer/Control/Ana6_pad'],
self.ana7_pad: ['/Mixer/Control/Ana7_pad'],
self.ana8_pad: ['/Mixer/Control/Ana8_pad'],
self.ana1_invert: ['/Mixer/Control/Ana1_invert'],
self.ana2_invert: ['/Mixer/Control/Ana2_invert'],
self.ana3_invert: ['/Mixer/Control/Ana3_invert'],
self.ana4_invert: ['/Mixer/Control/Ana4_invert'],
self.ana5_invert: ['/Mixer/Control/Ana5_invert'],
self.ana6_invert: ['/Mixer/Control/Ana6_invert'],
self.ana7_invert: ['/Mixer/Control/Ana7_invert'],
self.ana8_invert: ['/Mixer/Control/Ana8_invert'],
self.spdif1_invert: ['/Mixer/Control/Spdif1_invert'],
self.spdif2_invert: ['/Mixer/Control/Spdif2_invert'],
self.ana1_level: ['/Mixer/Control/Ana1_level'],
self.ana2_level: ['/Mixer/Control/Ana2_level'],
self.ana3_level: ['/Mixer/Control/Ana3_level'],
self.ana4_level: ['/Mixer/Control/Ana4_level'],
self.ana5_level: ['/Mixer/Control/Ana5_level'],
self.ana6_level: ['/Mixer/Control/Ana6_level'],
self.ana7_level: ['/Mixer/Control/Ana7_level'],
self.ana8_level: ['/Mixer/Control/Ana8_level'],
self.ana1_boost: ['/Mixer/Control/Ana1_boost'],
self.ana2_boost: ['/Mixer/Control/Ana2_boost'],
self.ana3_boost: ['/Mixer/Control/Ana3_boost'],
self.ana4_boost: ['/Mixer/Control/Ana4_boost'],
self.ana5_boost: ['/Mixer/Control/Ana5_boost'],
self.ana6_boost: ['/Mixer/Control/Ana6_boost'],
self.ana7_boost: ['/Mixer/Control/Ana7_boost'],
self.ana8_boost: ['/Mixer/Control/Ana8_boost'],
}
self.Selectors={
self.mix1_dest: ['/Mixer/Mix1/Mix_dest'],
self.mix2_dest: ['/Mixer/Mix2/Mix_dest'],
self.mix3_dest: ['/Mixer/Mix3/Mix_dest'],
self.mix4_dest: ['/Mixer/Mix4/Mix_dest'],
self.phones_src: ['/Mixer/Control/Phones_src'],
self.optical_in_mode: ['/Mixer/Control/OpticalIn_mode'],
self.optical_out_mode: ['/Mixer/Control/OpticalOut_mode'],
self.meter_src_ctrl: ['/Mixer/Control/Meter_src'],
self.aesebu_meter_ctrl: ['/Mixer/Control/Meter_aesebu_src'],
self.peakhold_time_ctrl:['/Mixer/Control/Meter_peakhold_time'],
self.cliphold_time_ctrl:['/Mixer/Control/Meter_cliphold_time'],
}
# Other mixer variables
self.is_streaming = 0
self.sample_rate = 0
self.model = MOTU_MODEL_NONE
# public slot: channel faders within a matrix mixer
def updateChannelFader(self, a0):
sender = self.sender()
vol = a0
log.debug("setting %s for mix %d channel %d to %d" % (self.ChannelFaders[sender][0],
self.ChannelFaders[sender][1], self.ChannelFaders[sender][2], vol))
self.hw.setMatrixMixerValue(self.ChannelFaders[sender][0],
self.ChannelFaders[sender][1], self.ChannelFaders[sender][2], vol)
# Using the ctrl modifier key makes stereo pairs move in unison
if (QApplication.keyboardModifiers() == Qt.ControlModifier):
pair = self.ChannelFaders[sender][3]
pair.setValue(vol)
# public slot: a multivalue control within a matrix mixer
def updateChannelControl(self, a0):
sender = self.sender()
val = a0
log.debug("setting %s for mix %d channel %d to %d" % (self.ChannelControls[sender][0],
self.ChannelControls[sender][1], self.ChannelControls[sender][2], val))
self.hw.setMatrixMixerValue(self.ChannelControls[sender][0],
self.ChannelControls[sender][1], self.ChannelControls[sender][2], val)
# public slot: a generic single multivalue control
def updateControl(self, a0):
sender = self.sender()
val = a0
log.debug("setting %s control to %d" % (self.Controls[sender][0], val))
self.hw.setDiscrete(self.Controls[sender][0], val)
# public slot: a binary switch within a matrix mixer
def updateChannelBinarySwitch(self, a0):
sender = self.sender()
val=a0
log.debug("setting %s for mix %d channel %d switch to %d" % (self.ChannelBinarySwitches[sender][0],
self.ChannelBinarySwitches[sender][1], self.ChannelBinarySwitches[sender][2], val))
self.hw.setMatrixMixerValue(self.ChannelBinarySwitches[sender][0],
self.ChannelBinarySwitches[sender][1], self.ChannelBinarySwitches[sender][2], val)
# public slot: generic single binary switch
def updateBinarySwitch(self, a0):
sender = self.sender()
val=a0
log.debug("setting %s switch to %d" % (self.BinarySwitches[sender][0], val))
self.hw.setDiscrete(self.BinarySwitches[sender][0], val)
# public slot: a faders (not in a matrix mixer)
def updateFader(self, a0):
sender = self.sender()
vol = a0
log.debug("setting %s mix fader to %d" % (self.Faders[sender][0], vol))
self.hw.setDiscrete(self.Faders[sender][0], vol)
# public slot: selectors (eg: mix destination controls)
def updateSelector(self, a0):
sender = self.sender()
dest=a0
log.debug("setting %s selector to %d" % (self.Selectors[sender][0], dest))
self.hw.setDiscrete(self.Selectors[sender][0], dest)
# public slots: mix output controls
def set_mix1_dest(self,a0):
self.setMixDest('mix1', a0)
def setSelector(self,a0,a1):
name=a0
state = a1
log.debug("setting %s state to %d" % (name, state))
self.hw.setDiscrete(self.SelectorControls[name][0], state)
# Hide and disable a control
def disable_hide(self,widget):
widget.hide()
widget.setEnabled(False)
# Set destination lists for the 8pre. MainOut is index 2 and for the
# moment we assume the ADAT options follow that.
def set_8pre_dest_list(self, list):
list.setItemText(2, "MainOut")
list.setItemText(3, "ADAT 1-2")
list.setItemText(4, "ADAT 3-4")
list.setItemText(5, "ADAT 5-6")
list.setItemText(6, "ADAT 7-8")
list.setMaxCount(7)
def initValues_g1(self):
# Set up widgets for generation-1 devices (only the 828mk1 for now).
# For now disable all mix faders and analog controls since we don't
# know how to control them (and it's not clear that they are even
# present in the hardware).
self.disable_hide(self.mixtab)
self.disable_hide(self.masterbox)
self.disable_hide(self.analog_settings_box)
# The 828mk1 didn't have meter controls
self.disable_hide(self.meter_src)
self.disable_hide(self.aesebu_meter)
self.disable_hide(self.peakhold_time)
self.disable_hide(self.cliphold_time)
# For the moment hide this control too since it's not clear how
# it might be used to interact with the 828mk1. Ultimately we
# may be able to reset its items and use it for the monitor source
# selector.
self.disable_hide(self.phones_src)
self.disable_hide(self.phones_src_frame)
def initValues_g2(self):
# Set up widgets for generation-2 devices
# The 828Mk2 has separate Mic inputs but no AES/EBU, so use the
# AES/EBU mixer controls as "Mic" controls. If a device comes along
# with both mic and AES inputs this approach will have to be
# re-thought.
# Doing this means that on the 828Mk2, the mixer matrix elements
# used for AES/EBU on other models are used for the Mic channels.
# So long as the MixerChannels_828Mk2 definition in
# motu_avdevice.cpp defines the mic channels immediately after the 8
# analog channels we'll be right. Note that we don't need to change
# the matrix lookup tables (self.ChannelFaders etc) because the QT
# controls are still named *aesebu*.
if (self.model == MOTU_MODEL_828mkII):
self.mix1_tab.setTabText(1, "Mic inputs");
self.mix2_tab.setTabText(1, "Mic inputs");
self.mix3_tab.setTabText(1, "Mic inputs");
self.mix4_tab.setTabText(1, "Mic inputs");
else:
# Only the Traveler and 896HD have AES/EBU inputs, so disable the AES/EBU
# tab for all other models.
if (self.model!=MOTU_MODEL_TRAVELER and self.model!=MOTU_MODEL_896HD):
self.mix1_tab.setTabEnabled(1, False)
self.mix2_tab.setTabEnabled(1, False)
self.mix3_tab.setTabEnabled(1, False)
self.mix4_tab.setTabEnabled(1, False)
# All models except the 896HD and 8pre have SPDIF inputs.
if (self.model==MOTU_MODEL_8PRE or self.model==MOTU_MODEL_896HD):
self.mix1_tab.setTabEnabled(2, False);
self.mix2_tab.setTabEnabled(2, False);
self.mix3_tab.setTabEnabled(2, False);
self.mix4_tab.setTabEnabled(2, False);
# Devices without AES/EBU inputs/outputs (currently all except the
# Traveler and 896HD) have dedicated "MainOut" outputs instead.
# AES/EBU is normally ID 6 in the destination lists and "MainOut"
# displaces it on non-AES/EBU models. The 896HD has both AES/EBU
# and MainOut which complicates this; it uses ID 6 for MainOut and
# ID 7 (nominally SPDIF) for AES/EBU. Therefore change ID 6 to
# "MainOut" for everything but the Traveler, and set ID 7 (nominally
# SPDIF) to AES/EBU for the 896HD.
if (self.model != MOTU_MODEL_TRAVELER):
self.mix1_dest.setItemText(6, "MainOut")
self.mix2_dest.setItemText(6, "MainOut")
self.mix3_dest.setItemText(6, "MainOut")
self.mix4_dest.setItemText(6, "MainOut")
self.phones_src.setItemText(6, "MainOut")
if (self.model == MOTU_MODEL_896HD):
self.mix1_dest.setItemText(7, "AES/EBU")
self.mix2_dest.setItemText(7, "AES/EBU")
self.mix3_dest.setItemText(7, "AES/EBU")
self.mix4_dest.setItemText(7, "AES/EBU")
self.phones_src.setItemText(7, "AES/EBU")
# The Ultralite doesn't have ADAT channels (or any optical ports at
# all)
if (self.model == MOTU_MODEL_ULTRALITE):
self.mix1_tab.setTabEnabled(3, False) # ADAT page
self.mix2_tab.setTabEnabled(3, False) # ADAT page
self.mix3_tab.setTabEnabled(3, False) # ADAT page
self.mix4_tab.setTabEnabled(3, False) # ADAT page
self.optical_in_mode.setEnabled(False)
self.optical_out_mode.setEnabled(False)
# The 896HD and 8pre don't have optical SPDIF (aka Toslink) capability
if (self.model==MOTU_MODEL_896HD or self.model==MOTU_MODEL_8PRE):
self.optical_in_mode.removeItem(2)
self.optical_out_mode.removeItem(2)
# The 8pre doesn't have software phones/main fader controls
if (self.model==MOTU_MODEL_8PRE):
self.disable_hide(self.mainout_fader)
self.disable_hide(self.phones_fader)
self.disable_hide(self.masterbox)
# The 8pre's destination list is rather different to all other
# models.
if (self.model==MOTU_MODEL_8PRE):
self.set_8pre_dest_list(self.mix1_dest)
self.set_8pre_dest_list(self.mix2_dest)
self.set_8pre_dest_list(self.mix3_dest)
self.set_8pre_dest_list(self.mix4_dest)
self.set_8pre_dest_list(self.phones_src)
# Only the 896HD has meter controls
if (self.model != MOTU_MODEL_896HD):
self.disable_hide(self.meter_src)
self.disable_hide(self.aesebu_meter)
self.disable_hide(self.peakhold_time)
self.disable_hide(self.cliphold_time)
# Some controls must be disabled if the device is streaming
if (self.is_streaming):
log.debug("Disabling controls which require inactive streaming")
self.optical_in_mode.setEnabled(False)
self.optical_out_mode.setEnabled(False)
# Some channels aren't available at higher sampling rates
if (self.sample_rate > 96000):
log.debug("Disabling controls not present above 96 kHz")
self.mix1_tab.setTabEnabled(3, False) # ADAT
self.mix1_tab.setTabEnabled(2, False) # SPDIF
self.mix1_tab.setTabEnabled(1, False) # AES/EBU
self.mix2_tab.setTabEnabled(3, False) # ADAT
self.mix2_tab.setTabEnabled(2, False) # SPDIF
self.mix2_tab.setTabEnabled(1, False) # AES/EBU
self.mix3_tab.setTabEnabled(3, False) # ADAT
self.mix3_tab.setTabEnabled(2, False) # SPDIF
self.mix3_tab.setTabEnabled(1, False) # AES/EBU
self.mix4_tab.setTabEnabled(3, False) # ADAT
self.mix4_tab.setTabEnabled(2, False) # SPDIF
self.mix4_tab.setTabEnabled(1, False) # AES/EBU
if (self.sample_rate > 48000):
log.debug("Disabling controls not present above 48 kHz")
self.mix1adat5.setEnabled(False)
self.mix1adat6.setEnabled(False)
self.mix1adat7.setEnabled(False)
self.mix1adat8.setEnabled(False)
self.mix2adat5.setEnabled(False)
self.mix2adat6.setEnabled(False)
self.mix2adat7.setEnabled(False)
self.mix2adat8.setEnabled(False)
self.mix3adat5.setEnabled(False)
self.mix3adat6.setEnabled(False)
self.mix3adat7.setEnabled(False)
self.mix3adat8.setEnabled(False)
self.mix4adat5.setEnabled(False)
self.mix4adat6.setEnabled(False)
self.mix4adat7.setEnabled(False)
self.mix4adat8.setEnabled(False)
# Ensure the correct input controls are active for a given interface.
# Only the Ultralite has phase inversion switches.
if (not(self.model == MOTU_MODEL_ULTRALITE)):
self.disable_hide(self.ana1_invert)
self.disable_hide(self.ana2_invert)
self.disable_hide(self.ana3_invert)
self.disable_hide(self.ana4_invert)
self.disable_hide(self.ana5_invert)
self.disable_hide(self.ana6_invert)
self.disable_hide(self.ana7_invert)
self.disable_hide(self.ana8_invert)
self.disable_hide(self.spdif1_invert)
self.disable_hide(self.spdif2_invert)
# The Traveler has pad switches for analog 1-4 only; other interfaces
# don't have pad switches at all.
if (not(self.model == MOTU_MODEL_TRAVELER)):
self.disable_hide(self.ana1_pad)
self.disable_hide(self.ana2_pad)
self.disable_hide(self.ana3_pad)
self.disable_hide(self.ana4_pad)
self.disable_hide(self.ana5_pad)
self.disable_hide(self.ana6_pad)
self.disable_hide(self.ana7_pad)
self.disable_hide(self.ana8_pad)
# The Traveler has level and boost switches for analog 5-8. The
# 8pre, Ultralite and the 896HD don't implement them. All other
# interfaces have them over analog 1-8.
if (self.model==MOTU_MODEL_TRAVELER or self.model==MOTU_MODEL_ULTRALITE or self.model==MOTU_MODEL_896HD or self.model==MOTU_MODEL_8PRE):
self.disable_hide(self.ana1_level)
self.disable_hide(self.ana2_level)
self.disable_hide(self.ana3_level)
self.disable_hide(self.ana4_level)
self.disable_hide(self.ana1_boost)
self.disable_hide(self.ana2_boost)
self.disable_hide(self.ana3_boost)
self.disable_hide(self.ana4_boost)
if (self.model==MOTU_MODEL_ULTRALITE or self.model==MOTU_MODEL_896HD or self.model==MOTU_MODEL_8PRE):
self.disable_hide(self.ana5_level)
self.disable_hide(self.ana6_level)
self.disable_hide(self.ana7_level)
self.disable_hide(self.ana8_level)
self.disable_hide(self.ana5_boost)
self.disable_hide(self.ana6_boost)
self.disable_hide(self.ana7_boost)
self.disable_hide(self.ana8_boost)
# The Traveler has trimgain for analog 1-4. The Ultralite has trimgain for
# analog 1-8 and SPDIF 1-2. All other interfaces don't have trimgain.
if (not(self.model==MOTU_MODEL_TRAVELER or self.model==MOTU_MODEL_ULTRALITE)):
self.disable_hide(self.ana1_trimgain)
self.disable_hide(self.ana1_trimgain_label)
self.disable_hide(self.ana2_trimgain)
self.disable_hide(self.ana2_trimgain_label)
self.disable_hide(self.ana3_trimgain)
self.disable_hide(self.ana3_trimgain_label)
self.disable_hide(self.ana4_trimgain)
self.disable_hide(self.ana4_trimgain_label)
if (not(self.model == MOTU_MODEL_ULTRALITE)):
self.disable_hide(self.ana5_trimgain)
self.disable_hide(self.ana5_trimgain_label)
self.disable_hide(self.ana6_trimgain)
self.disable_hide(self.ana6_trimgain_label)
self.disable_hide(self.ana7_trimgain)
self.disable_hide(self.ana7_trimgain_label)
self.disable_hide(self.ana8_trimgain)
self.disable_hide(self.ana8_trimgain_label)
self.disable_hide(self.spdif1_trimgain)
self.disable_hide(self.spdif1_trimgain_label)
self.disable_hide(self.spdif1ctrl)
self.disable_hide(self.spdif2_trimgain)
self.disable_hide(self.spdif2_trimgain_label)
self.disable_hide(self.spdif2ctrl)
# The 8pre has no digital controls for the analog inputs, so there's
# no point in showing the frame which would normally contain them.
if (self.model == MOTU_MODEL_8PRE):
self.disable_hide(self.analog_settings_box)
def initValues(self):
# Is the device streaming?
self.is_streaming = self.hw.getDiscrete('/Mixer/Info/IsStreaming')
log.debug("device streaming flag: %d" % (self.is_streaming))
# Retrieve other device settings as needed and customise the UI
# based on these options.
self.model = self.hw.getDiscrete('/Mixer/Info/Model')
log.debug("device model identifier: %d" % (self.model))
self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate')
log.debug("device sample rate: %d" % (self.sample_rate))
# MOTU Mark 3 devices should be configured to use the "Motu_Mark3"
# mixer.
if (self.model==MOTU_MODEL_828mk3 or self.model==MOTU_MODEL_ULTRALITEmk3 or self.model==MOTU_MODEL_ULTRALITEmk3_HYB or self.model==MOTU_MODEL_TRAVELERmk3 or self.model==MOTU_MODEL_896HDmk3):
log.debug("Generation-3 MOTU devices should be configured to use the Motu_Mark3 mixer")
return
elif (self.model==MOTU_MODEL_828MkI):
self.initValues_g1()
else:
self.initValues_g2()
# Now fetch the current values into the respective controls. Don't
# bother fetching controls which are disabled.
for ctrl, info in self.ChannelFaders.items():
if (not(ctrl.isEnabled())):
continue
vol = self.hw.getMatrixMixerValue(info[0], info[1], info[2])
log.debug("%s for mix %d channel %d is %d" % (info[0], info[1], info[2], vol))
ctrl.setValue(vol)
ctrl.valueChanged.connect(self.updateChannelFader)
for ctrl, info in self.Faders.items():
if (not(ctrl.isEnabled())):
continue
vol = self.hw.getDiscrete(info[0])
log.debug("%s mix fader is %d" % (info[0] , vol))
ctrl.setValue(vol)
ctrl.valueChanged.connect(self.updateFader)
for ctrl, info in self.ChannelControls.items():
if (not(ctrl.isEnabled())):
continue
pan = self.hw.getMatrixMixerValue(info[0], info[1], info[2])
log.debug("%s for mix %d channel %d is %d" % (info[0], info[1], info[2], pan))
ctrl.setValue(pan)
ctrl.valueChanged.connect(self.updateChannelControl)
for ctrl, info in self.Controls.items():
if (not(ctrl.isEnabled())):
continue
pan = self.hw.getDiscrete(info[0])
log.debug("%s control is %d" % (info[0] , pan))
ctrl.setValue(pan)
ctrl.valueChanged.connect(self.updateControl)
for ctrl, info in self.ChannelBinarySwitches.items():
if (not(ctrl.isEnabled())):
continue
val = self.hw.getMatrixMixerValue(info[0], info[1], info[2])
log.debug("%s for mix %d channel %d is %d" % (info[0] , info[1], info[2], val))
if val:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
ctrl.toggled.connect(self.updateChannelBinarySwitch)
for ctrl, info in self.BinarySwitches.items():
if (not(ctrl.isEnabled())):
continue
val = self.hw.getDiscrete(info[0])
log.debug("%s switch is %d" % (info[0] , val))
if val:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
ctrl.toggled.connect(self.updateBinarySwitch)
for ctrl, info in self.Selectors.items():
if (not(ctrl.isEnabled())):
continue
dest = self.hw.getDiscrete(info[0])
log.debug("%s selector is %d" % (info[0] , dest))
ctrl.setCurrentIndex(dest)
ctrl.activated.connect(self.updateSelector)
# We could enable/disable ADAT controls here depending on whether
# the optical port is set to ADAT or something else. A disable
# can't be done earlier since we have to read the ADAT mixer
# settings (which won't happen if they're disabled). However, on
# the other hand it may be more convenient to leave all controls
# active at all times. We'll see.
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/generic_dice_eap.py 0000644 0001750 0000144 00000012650 13114471135 024231 0 ustar jwoithe users #
# Copyright (C) 2009-2010 by Arnold Krille
# 2013 by Philippe Carriere
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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 .
#
# from PyQt4 import QtGui, QtCore, Qt
# from PyQt4.QtGui import QWidget, QGridLayout, QTabWidget, QScrollArea
from ffado.import_pyqt import *
import dbus
from ffado.widgets.matrixmixer import MatrixMixer
from ffado.widgets.crossbarrouter import *
from ffado.config import *
class Generic_Dice_EAP(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.layout = QGridLayout(self)
self.setLayout(self.layout)
self.tabs = QTabWidget(self)
self.tabs.setTabPosition(QTabWidget.West)
self.layout.addWidget(self.tabs)
def buildMixer(self):
#print( self.hw )
#print( self.hw.getText("/Generic/Nickname") )
self.mixer = MatrixMixer(self.hw.servername, self.hw.basepath+"/EAP/MatrixMixer", self, "Columns_are_outputs", -1, None, None, False, QTabWidget.North, QTabWidget.Rounded)
self.tabs.addTab(self.mixer, "Mixer")
self.router_scrollarea = self.buildRouter(self.hw.servername, self.hw.basepath+"/EAP/Router")
self.tabs.addTab(self.router_scrollarea, "Crossbar Router")
def buildRouter(self, servername, path):
self.router = CrossbarRouter(servername, path, self)
self.router.MixerRoutingChanged.connect(self.mixer.updateRouting)
scrollarea = QScrollArea(self.tabs)
scrollarea.setWidgetResizable(True)
scrollarea.setWidget(self.router)
return scrollarea
def onSamplerateChange(self):
# Router configuration is samplerate dependent for DICE EAP devices
# Destroy and redraw the crossbar router view when called
n = self.tabs.indexOf(self.router_scrollarea)
self.tabs.removeTab(n)
self.router.destroy()
self.router_scrollarea.destroy()
self.router_scrollarea = self.buildRouter(self.hw.servername, self.hw.basepath+"/EAP/Router")
self.tabs.insertTab(n, self.router_scrollarea, "Crossbar Router")
self.tabs.setCurrentWidget(self.router_scrollarea)
self.mixer.updateRouting()
def saveSettings(self, indent):
saveString = []
idt = indent + " "
saveString.append('%s\n' % indent)
saveString.extend(self.mixer.saveSettings(idt))
# Do not forget to mention the adopted rule for matrix columns mixer
# This might be useful for future import function
saveString.append("%s \n" % indent)
saveString.append("%s Columns_are_outputs\n" % indent)
saveString.append("%s \n" % indent)
saveString.append('%s\n' % indent)
saveString.append('%s\n' % indent)
saveString.extend(self.router.saveSettings(idt))
saveString.append('%s\n' % indent)
return saveString
def readSettings(self, readString):
try:
idxb = readString.index('')
idxe = readString.index('')
except Exception:
log.debug("No mixer settings found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb + 1:
stringMixer = []
for s in readString[idxb+1:idxe]:
stringMixer.append(s)
# When trying to import from a different device, the rule for column interpretation is
# not necessarily the same
try:
idx = stringMixer.index('')
except Exception:
log.debug('Do not know how to handle column versus input/output')
idx = -1
transpose_coeff = False
if idx >=0:
if stringMixer[idx+1].find("Columns_are_outputs") == -1:
log.debug('Transposing the matrix coefficient; you are importing, are not you ?')
transpose_coeff = True
if self.mixer.readSettings(stringMixer, transpose_coeff):
log.debug("Mixer settings modified")
del stringMixer
try:
idxb = readString.index('')
idxe = readString.index('')
except Exception:
log.debug("No router settings found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb + 1:
stringRouter = []
for s in readString[idxb+1:idxe]:
stringRouter.append(s)
if self.router.readSettings(stringRouter):
log.debug("Router settings modified")
del stringRouter
#def getDisplayTitle(self):
# return "Saffire PRO40/PRO24 Mixer"
#
# vim: et ts=4 sw=4
libffado-2.4.2/support/mixer-qt4/ffado/mixer/yamahago.py 0000644 0001750 0000144 00000015720 13114471135 022573 0 ustar jwoithe users #
# Copyright (c) 2013 by Takashi Sakamoto
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
import logging
log = logging.getLogger('YamahaGo')
class YamahaGo(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
def getDisplayTitle(self):
if self.configrom.getModelId() == 0x0010000B:
return "GO44"
else:
return "GO46"
# startup
def initValues(self):
uicLoad("ffado/mixer/yamahago", self)
self.modelId = self.configrom.getModelId()
# GO44
if self.modelId == 0x0010000B:
self.setWindowTitle("Yamaha GO44 Control")
self.box_ana_out.hide()
self.is46 = False
# GO46
elif self.modelId == 0x0010000C:
self.setWindowTitle("Yamaha GO46 Control")
self.box_ana_in_12_level.hide()
self.is46 = True
# common
self.VolumeControls = {
self.sld_mixer_strm_in_1:
('/Mixer/Feature_Volume_3', 1,
self.sld_mixer_strm_in_2, 2, self.link_mixer_strm_in_12),
self.sld_mixer_strm_in_2:
('/Mixer/Feature_Volume_3', 2,
self.sld_mixer_strm_in_1, 1, self.link_mixer_strm_in_12),
self.sld_mixer_strm_in_3:
('/Mixer/Feature_Volume_4', 1,
self.sld_mixer_strm_in_4, 2, self.link_mixer_strm_in_34),
self.sld_mixer_strm_in_4:
('/Mixer/Feature_Volume_4', 2,
self.sld_mixer_strm_in_3, 1, self.link_mixer_strm_in_34),
self.sld_mixer_strm_in_5:
('/Mixer/Feature_Volume_5', 1,
self.sld_mixer_strm_in_6, 2, self.link_mixer_strm_in_56),
self.sld_mixer_strm_in_6:
('/Mixer/Feature_Volume_5', 2,
self.sld_mixer_strm_in_5, 1, self.link_mixer_strm_in_56),
self.sld_mixer_ana_in_1:
('/Mixer/Feature_Volume_6', 1,
self.sld_mixer_ana_in_2, 2, self.link_mixer_ana_in_12),
self.sld_mixer_ana_in_2:
('/Mixer/Feature_Volume_6', 2,
self.sld_mixer_ana_in_1, 1, self.link_mixer_ana_in_12),
self.sld_mixer_dig_in_1:
('/Mixer/Feature_Volume_7', 1,
self.sld_mixer_dig_in_2, 2, self.link_mixer_dig_in_12),
self.sld_mixer_dig_in_2:
('/Mixer/Feature_Volume_7', 2,
self.sld_mixer_dig_in_1, 1, self.link_mixer_dig_in_12)
}
self.JackSourceSelectors = {
self.cmb_ana_out_12_route: '/Mixer/Selector_1',
self.cmb_ana_out_34_route: '/Mixer/Selector_2',
self.cmb_dig_out_12_route: '/Mixer/Selector_3'
}
if not self.is46:
# volume for mixer output
self.VolumeControls[self.sld_mixer_out_1] = (
'/Mixer/Feature_Volume_1', 1,
self.sld_mixer_out_2, 2, self.link_mixer_out_12
)
self.VolumeControls[self.sld_mixer_out_2] = (
'/Mixer/Feature_Volume_1', 2,
self.sld_mixer_out_1, 1, self.link_mixer_out_12
)
# analog out 3/4 is headphone out 1/2
self.label_ana_out_34_route.setText("Headphone out 1/2")
else:
# volume for mixer output
self.VolumeControls[self.sld_mixer_out_1] = (
'/Mixer/Feature_Volume_2', 1,
self.sld_mixer_out_2, 2, self.link_mixer_out_12
)
self.VolumeControls[self.sld_mixer_out_2] = (
'/Mixer/Feature_Volume_2', 2,
self.sld_mixer_out_1, 1, self.link_mixer_out_12
)
# volume for analog output
self.VolumeControls[self.sld_ana_out_1] = (
'/Mixer/Feature_Volume_1', 1,
self.sld_ana_out_2, 2, self.link_ana_out_12
)
self.VolumeControls[self.sld_ana_out_2] = (
'/Mixer/Feature_Volume_1', 2,
self.sld_ana_out_1, 1, self.link_ana_out_12
)
self.VolumeControls[self.sld_ana_out_3] = (
'/Mixer/Feature_Volume_1', 3,
self.sld_ana_out_4, 4, self.link_ana_out_34
)
self.VolumeControls[self.sld_ana_out_4] = (
'/Mixer/Feature_Volume_1', 4,
self.sld_ana_out_3, 3, self.link_ana_out_34
)
# gain control
for ctl, params in list(self.VolumeControls.items()):
path = params[0]
idx = params[1]
db = self.hw.getContignuous(path, idx)
vol = self.db2vol(db)
ctl.setValue(vol)
link = params[4]
pvol = self.db2vol(db)
if pvol == vol:
link.setChecked(True)
ctl.valueChanged.connect(self.updateVolume)
# source selector for jack output
for ctl, param in list(self.JackSourceSelectors.items()):
state = self.hw.getDiscrete(param)
ctl.setCurrentIndex(state)
ctl.activated.connect(self.updateSelector)
if not self.is46:
self.cmb_ana_in_12_level.activated.connect(self.updateMicLevel)
# helper functions
def vol2db(self, vol):
return (log10(vol + 1) - 2) * 16384
def db2vol(self, db):
return pow(10, db / 16384 + 2) - 1
def updateMicLevel(self, state):
if state == 0:
level = 0
elif state == 1:
level = -1535
else:
level = -3583
self.hw.setContignuous('/Mixer/Feature_Volume_2', level)
def updateVolume(self, vol):
sender = self.sender()
path = self.VolumeControls[sender][0]
idx = self.VolumeControls[sender][1]
pair = self.VolumeControls[sender][2]
link = self.VolumeControls[sender][4]
db = self.vol2db(vol)
self.hw.setContignuous(path, db, idx)
if link.isChecked():
pair.setValue(vol)
def updateSelector(self, state):
sender = self.sender()
path = self.JackSourceSelectors[sender]
self.hw.setDiscrete(path, state)
libffado-2.4.2/support/mixer-qt4/ffado/mixer/presonus_inspire1394.py 0000644 0001750 0000144 00000025161 13114471135 024735 0 ustar jwoithe users #
# presonus_inspire1394.py - Qt4/FFADO application for Presonus Inspire1394
# Copyright (C) 2014 Takashi Sakamoto
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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
# 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 .
#
# from PyQt4 import QtGui, QtCore
# from PyQt4.QtCore import QObject, Qt
# from PyQt4.QtGui import QWidget, QHBoxLayout, QVBoxLayout, QGridLayout
# from PyQt4.QtGui import QGroupBox, QLabel, QSizePolicy, QSlider, QDial, QComboBox, QToolButton
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
class Presonus_Inspire1394(QWidget):
# feature_id/name
inputs = [[1, "Analog in 1/2"],
[2, "Analog in 3/4"]]
# feature_id/name
mixer_src = [[3, "Analog in 1/2"],
[4, "Analog in 3/4"],
[5, "Stream in 1/2"]]
# feature id/name
outputs = [[6, "Analog out 1/2"],
[7, "HP out 1/2"]]
# selector_id/sources
out_src = [1, ["Mixer out 1/2", "Stream in 1/2"]]
def __init__(self, parent=None):
QWidget.__init__(self, parent)
def getDisplayTitle(self):
return 'Inspire1394'
def buildMixer(self):
self.Selectors = {}
self.Volumes = {}
self.Preamps = {}
self.Pannings = {}
self.Mutes = {}
plain_layout = QHBoxLayout(self)
left = QGroupBox(self)
plain_layout.addWidget(left)
self.addAnalogInputs(left)
center = QGroupBox(self)
plain_layout.addWidget(center)
self.addInternalMixer(center)
right = QGroupBox(self)
plain_layout.addWidget(right)
self.addAnalogOutputs(right)
def addAnalogInputs(self, box):
box_layout = QVBoxLayout()
box.setLayout(box_layout)
box.setTitle("Analog Inputs")
grid_layout = QGridLayout()
box_layout.addLayout(grid_layout)
self.addVolumes(self.inputs, 0, box, grid_layout)
def addAnalogOutputs(self, box):
box_layout = QVBoxLayout()
box.setLayout(box_layout)
box.setTitle("Analog Outputs")
grid_layout = QGridLayout()
box_layout.addLayout(grid_layout)
self.addVolumes(self.outputs, 2, box, grid_layout)
def addInternalMixer(self, box):
box_layout = QGridLayout()
box.setLayout(box_layout)
box.setTitle("Hardware Mixer")
self.addVolumes(self.mixer_src, 1, box, box_layout)
def addVolumes(self, elms, kind, parent, layout):
def addPreampParam(label, ch, path, layout):
button = self.getThinButton(parent, label)
layout.addWidget(button)
self.Preamps[button] = ["/Preamp/%s" % path, ch]
return
for col in range(len(elms)):
label = QLabel(parent)
label.setText(elms[col][1])
layout.addWidget(label, 0, col * 2, 1, 2, Qt.AlignHCenter | Qt.AlignTop)
if kind == 0:
if col == 0:
for ch in range(2):
box_layout = QVBoxLayout()
layout.addLayout(box_layout, 1, col * 2 + ch, Qt.AlignHCenter | Qt.AlignBottom)
if col == 0:
addPreampParam("+48V", ch + 1, "PhantomPower", box_layout)
addPreampParam("Boost", ch + 1, "MicBoost", box_layout)
addPreampParam("Limit", ch + 1, "MicLimit", box_layout)
else:
box_layout = QVBoxLayout()
addPreampParam("Phono", 0, "PhonoSwitch", box_layout)
layout.addLayout(box_layout, 1, col * 2, 1, 2, Qt.AlignHCenter | Qt.AlignBottom)
elif kind == 1:
l_dial = self.getDial(parent)
r_dial = self.getDial(parent)
layout.addWidget(l_dial, 1, col * 2, Qt.AlignHCenter | Qt.AlignBottom)
layout.addWidget(r_dial, 1, col * 2 + 1, Qt.AlignHCenter | Qt.AlignBottom)
path = "/Mixer/Feature_LRBalance_%d" % elms[col][0]
self.Pannings[l_dial] = [path, 1]
self.Pannings[r_dial] = [path, 2]
if col == 2:
l_dial.setDisabled(True)
r_dial.setDisabled(True)
elif col == 0:
cmb = QComboBox(parent)
layout.addWidget(cmb, 1, col * 2, 1, 4, Qt.AlignHCenter | Qt.AlignBottom)
for i in range(len(self.out_src[1])):
cmb.addItem(self.out_src[1][i], i)
self.Selectors[cmb] = ["/Mixer/Selector_%d" % self.out_src[0]]
l_sld = self.getSlider(parent)
r_sld = self.getSlider(parent)
layout.addWidget(l_sld, 2, col * 2, Qt.AlignHCenter)
layout.addWidget(r_sld, 2, col * 2 + 1, Qt.AlignHCenter)
l_mute = self.getThinButton(parent, "Mute")
r_mute = self.getThinButton(parent, "Mute")
layout.addWidget(l_mute, 3, col * 2, Qt.AlignHCenter)
layout.addWidget(r_mute, 3, col * 2 + 1, Qt.AlignHCenter)
link = self.getWideButton(parent, "Link")
layout.addWidget(link, 4, col * 2, 1, 2, Qt.AlignHCenter)
path = "/Mixer/Feature_Volume_%d" % elms[col][0]
self.Volumes[l_sld] = [path, 1, r_sld, l_mute, link]
self.Volumes[r_sld] = [path, 2, l_sld, r_mute, link]
self.Mutes[l_mute] = [r_mute, l_sld]
self.Mutes[r_mute] = [l_mute, r_sld]
# widget helper functions
def getSlider(self, parent):
sld = QSlider(parent)
sld.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
sld.setMinimum(0)
sld.setMaximum(99)
sld.setPageStep(10)
sld.setPageStep(10)
sld.setMinimumHeight(50)
sld.setTickInterval(25)
sld.setTickPosition(QSlider.TicksBothSides)
return sld
def getDial(self, parent):
dial = QDial(parent)
dial.setNotchesVisible(True)
dial.setNotchTarget(25.0)
dial.setMaximumHeight(40)
return dial;
def getThinButton(self, parent, text):
button = QToolButton(parent)
button.setText(text)
button.setCheckable(True)
button.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return button
def getWideButton(self, parent, label):
button = QToolButton(parent)
button.setText(label)
button.setCheckable(True)
button.setMinimumWidth(100)
button.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return button
def initValues(self):
for ctl, params in self.Selectors.items():
path = params[0]
state = self.hw.getDiscrete(path)
ctl.setCurrentIndex(state)
ctl.activated.connect(self.updateSelector)
for ctl, params in self.Volumes.items():
path = params[0]
idx = params[1]
pair = params[2]
mute = params[3]
link = params[4]
db = self.hw.getContignuous(path, idx)
vol = self.db2vol(db)
ctl.setValue(vol)
ctl.valueChanged.connect(self.updateVolume)
if vol == 0:
mute.setChecked(True)
if idx == 2:
pair_db = self.hw.getContignuous(path, 1)
if pair_db == db:
link.setChecked(True)
for ctl, params in self.Preamps.items():
path = params[0]
idx = params[1]
vol = self.hw.getDiscrete(path, idx)
if vol > 0:
ctl.setChecked(True)
ctl.clicked.connect(self.updatePreamps)
# Right - Center - Left
# 0x8000 - 0x0000 - 0x0001 - 0x7FFE
# ..., -1, 0, +1, ...
for ctl, params in self.Pannings.items():
path = params[0]
idx = params[1]
val = self.hw.getContignuous(path, idx)
state = -(val / 0x7FFE) * 50 + 50
ctl.setValue(state)
ctl.valueChanged.connect(self.updatePanning)
for ctl, params in self.Mutes.items():
ctl.clicked.connect(self.updateMute)
# helper functions
def vol2db(self, vol):
return (log10(vol + 1) - 2) * 16384
def db2vol(self, db):
return pow(10, db / 16384 + 2) - 1
def updateSelector(self, state):
sender = self.sender()
path = self.Selectors[sender][0]
self.hw.setDiscrete(path, state)
def updatePreamps(self, state):
sender = self.sender()
path = self.Preamps[sender][0]
idx = self.Preamps[sender][1]
self.hw.setDiscrete(path, idx, state)
def updateVolume(self, vol):
sender = self.sender()
path = self.Volumes[sender][0]
idx = self.Volumes[sender][1]
pair = self.Volumes[sender][2]
mute = self.Volumes[sender][3]
link = self.Volumes[sender][4]
if mute.isChecked():
return
db = self.vol2db(vol)
self.hw.setContignuous(path, db, idx)
if link.isChecked():
pair.setValue(vol)
def updatePanning(self, state):
sender = self.sender()
path = self.Pannings[sender][0]
idx = self.Pannings[sender][1]
val = (state - 50) * 0x7FFE / -50
self.hw.setContignuous(path, idx, val)
def updateMute(self, state):
sender = self.sender()
pair = self.Mutes[sender][0]
sld = self.Mutes[sender][1]
path = self.Volumes[sld][0]
idx = self.Volumes[sld][1]
pair_sld = self.Volumes[sld][2]
link = self.Volumes[sld][4]
if state:
db = 0x8000
vol = 0
else:
db = 0x0000
vol = 99
self.hw.setContignuous(path, db, idx)
sld.setValue(vol)
sld.setDisabled(state)
if link.isChecked():
if idx == 1:
idx = 2
else:
idx = 1
self.hw.setContignuous(path, db, idx)
pair.setChecked(state)
pair_sld.setValue(vol)
pair_sld.setDisabled(state)
libffado-2.4.2/support/mixer-qt4/ffado/mixer/nodevice.py 0000644 0001750 0000144 00000002141 13114471135 022572 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
# 2007-2008 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from mixer_nodeviceui import Ui_NoDeviceMixerUI
class NoDevice(QWidget, Ui_NoDeviceMixerUI):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
self.setupUi(self)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/presonus_firebox.py 0000644 0001750 0000144 00000027633 13114471135 024407 0 ustar jwoithe users #
# presonus_firebox.py - Qt4/FFADO application for Presonus FIREBOX
# Copyright (C) 2013 Takashi Sakamoto
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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
# 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 .
#
# from PyQt4 import QtGui, QtCore
# from PyQt4.QtCore import Qt
# from PyQt4.QtGui import QHBoxLayout, QVBoxLayout, QGridLayout
# from PyQt4.QtGui import QWidget, QTabWidget, QGroupBox, QLabel, QSizePolicy, QToolButton, QSlider, QComboBox, QSpacerItem, QDial
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
class Presonus_Firebox(QWidget):
#name/feature_id/+12dB_id
inputs = [["Analog in 1/2", 5, 10],
["Analog in 3/4", 6, 11],
["Digital in 1/2", 7, 0],
["Stream in", 8, 0]]
# name/id for mixer sorce selector
streams = [["Stream in 1/2", 0],
["Stream in 3/4", 1],
["Stream in 5/6", 2],
["Stream in 7/8", 3]]
# name/feature id
outputs = [["Analog out 1/2", 1],
["Analog out 3/4", 2],
["Analog out 5/6", 3],
["Digital out 1/2", 0],
["Headphone out 1/2", 4]]
# selector_id/sources
out_src = [[1, ["Stream in 1/2", "Mixer out 1/2"]],
[2, ["Stream in 3/4", "Mixer out 1/2"]],
[3, ["Stream in 5/6", "Mixer out 1/2"]],
[5, ["Stream in 7/8", "Mixer out 1/2"]],
[4, ["Stream in 1/2", "Stream in 3/4",
"Stream in 5/6", "Stream in 7/8", "Mixer out 1/2"]]]
def __init__(self, parent=None):
QWidget.__init__(self, parent)
def getDisplayTitle(self):
return 'Firebox'
def buildMixer(self):
self.Selectors = {}
self.MicBoosts = {}
self.Volumes = {}
self.Mutes = {}
self.Balances = {}
tabs = QTabWidget(self)
tabs_layout = QHBoxLayout(self)
tabs_layout.addWidget(tabs)
self.addMixer(tabs)
self.addOutput(tabs)
def addMixer(self, tabs):
tab_mixer = QWidget(tabs)
tabs.addTab(tab_mixer, "Mixer")
tab_mixer_layout = QGridLayout()
tab_mixer.setLayout(tab_mixer_layout)
for i in range(len(self.inputs)):
col = 2 * i;
label = QLabel(tab_mixer)
tab_mixer_layout.addWidget(label, 0, col, 1, 2, Qt.AlignHCenter)
label.setText(self.inputs[i][0])
label.setAlignment(Qt.AlignCenter)
label.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
link = self.getLink(tab_mixer)
tab_mixer_layout.addWidget(link, 3, col, 1, 2, Qt.AlignHCenter)
if self.inputs[i][2] > 0:
for j in range(1, 3):
button = QToolButton(tab_mixer)
tab_mixer_layout.addWidget(button, 1, col + j - 1, Qt.AlignHCenter)
button.setText('+12dB')
button.setCheckable(True)
button.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
path = "/Mixer/Feature_Volume_%d" % self.inputs[i][2]
self.MicBoosts[button] = [path, j]
elif self.inputs[i][0].find('Stream') >= 0:
cmb = QComboBox(tab_mixer)
tab_mixer_layout.addWidget(cmb, 1, col, 1, 2, Qt.AlignHCenter)
for i in range(len(self.streams)):
cmb.addItem(self.streams[i][0], self.streams[i][1])
self.Selectors[cmb] = ["/Mixer/Selector_6"]
l_sld = self.getSlider(tab_mixer)
r_sld = self.getSlider(tab_mixer)
tab_mixer_layout.addWidget(l_sld, 2, col, Qt.AlignHCenter)
tab_mixer_layout.addWidget(r_sld, 2, col + 1, Qt.AlignHCenter)
mute = self.getMute(tab_mixer)
tab_mixer_layout.addWidget(mute, 4, col, 1, 2, Qt.AlignHCenter)
path = "/Mixer/Feature_Volume_%d" % self.inputs[i][1]
self.Volumes[l_sld] = [path, 1, r_sld, link, mute]
self.Volumes[r_sld] = [path, 2, l_sld, link, mute]
self.Mutes[mute] = [path, l_sld, r_sld]
for j in range(0, 2):
dial = self.getDial(tab_mixer)
tab_mixer_layout.addWidget(dial, 5, col + j, Qt.AlignHCenter)
if self.inputs[i][2] > 0:
path = "/Mixer/Feature_LRBalance_%d" % self.inputs[i][1]
self.Balances[dial] = [path, j + 1]
# to keep width
else:
dial.setDisabled(True)
def addOutput(self, tabs):
tab_out = QWidget(self)
tabs.addTab(tab_out, "Output")
tab_out_layout = QGridLayout()
tab_out.setLayout(tab_out_layout)
for i in range(len(self.outputs)):
col = 2 * i
label = QLabel(tab_out)
tab_out_layout.addWidget(label, 0, col, 1, 2, Qt.AlignCenter)
label.setText(self.outputs[i][0])
cmb = QComboBox(tab_out)
tab_out_layout.addWidget(cmb, 1, col, 1, 2, Qt.AlignHCenter)
for j in range(len(self.out_src[i][1])):
cmb.addItem(self.out_src[i][1][j])
self.Selectors[cmb] = ["/Mixer/Selector_%d" % self.out_src[i][0]]
if self.outputs[i][1] == 0:
continue
l_sld = self.getSlider(tab_out)
r_sld = self.getSlider(tab_out)
tab_out_layout.addWidget(l_sld, 2, col, Qt.AlignHCenter)
tab_out_layout.addWidget(r_sld, 2, col + 1, Qt.AlignHCenter)
link = self.getLink(tab_out)
tab_out_layout.addWidget(link, 3, col, 1, 2, Qt.AlignHCenter)
mute = self.getMute(tab_out)
tab_out_layout.addWidget(mute, 4, col, 1, 2, Qt.AlignHCenter)
path = "/Mixer/Feature_Volume_%d" % self.outputs[i][1]
self.Volumes[l_sld] = [path, 1, r_sld, link, mute]
self.Volumes[r_sld] = [path, 2, l_sld, link, mute]
self.Mutes[mute] = [path, l_sld, r_sld]
def getSlider(self, parent):
sld = QSlider(parent)
sld.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
sld.setMinimum(0)
sld.setMaximum(99)
sld.setPageStep(10)
sld.setPageStep(10)
sld.setMinimumHeight(50)
sld.setTickInterval(25)
sld.setTickPosition(QSlider.TicksBothSides)
return sld
def getDial(self, parent):
dial = QDial(parent)
dial.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
dial.setMinimumSize(50, 50)
dial.setMaximumHeight(50)
dial.setNotchTarget(25)
dial.setNotchesVisible(True)
dial.setMinimum(0)
dial.setMaximum(99)
dial.setPageStep(10)
dial.setPageStep(10)
return dial
def getLink(self, parent):
link = QToolButton(parent)
link.setText("link")
link.setCheckable(True)
link.setMinimumWidth(100)
link.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return link
def getMute(self, parent):
mute = QToolButton(parent)
mute.setText("mute")
mute.setCheckable(True)
mute.setMinimumWidth(100)
mute.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return mute
def initValues(self):
for elm, params in self.Selectors.items():
path = params[0]
state = self.hw.getDiscrete(path)
elm.setCurrentIndex(state)
elm.activated.connect(self.updateSelector)
for elm, params in self.MicBoosts.items():
path = params[0]
idx = params[1]
value = self.hw.getContignuous(path, idx)
elm.setChecked(not value == 0)
elm.clicked.connect(self.updateMicBoost)
for elm, params in self.Volumes.items():
path = params[0]
idx = params[1]
db = self.hw.getContignuous(path, idx)
vol = self.db2vol(db)
elm.setValue(vol)
elm.valueChanged.connect(self.updateVolume)
if idx == 0:
continue
p_idx = 0
pair = params[2]
link = params[3]
mute = params[4]
p_db = self.hw.getContignuous(path, p_idx)
if db == p_db:
link.setChecked(True)
for elm, params in self.Mutes.items():
path = params[0]
l_elm = params[1]
r_elm = params[2]
l_db = self.hw.getContignuous(path, 1)
r_db = self.hw.getContignuous(path, 2)
l_vol = self.db2vol(l_db)
r_vol = self.db2vol(r_db)
if l_vol == r_vol and l_vol == 0:
elm.setChecked(True)
l_elm.setDisabled(True)
r_elm.setDisabled(True)
elm.clicked.connect(self.updateMute)
for elm, params in self.Balances.items():
path = params[0]
idx = params[1]
pan = self.hw.getContignuous(path, idx)
val = self.pan2val(pan)
elm.setValue(val)
elm.valueChanged.connect(self.updateBalance)
# helper functions
def vol2db(self, vol):
return (log10(vol + 1) - 2) * 16384
def db2vol(self, db):
return pow(10, db / 16384 + 2) - 1
# Right - Center - Left
# 0x8000 - 0x0000 - 0x0001 - 0x7FFE
# ..., -1, 0, +1, ...
def val2pan(self, val):
return (val - 50) * 0x7ffe / -50
def pan2val(self, pan):
return -(pan/ 0x7ffe) * 50 + 50
def updateSelector(self, state):
sender = self.sender()
path = self.Selectors[sender][0]
self.hw.setDiscrete(path, state)
def updateVolume(self, vol):
sender = self.sender()
path = self.Volumes[sender][0]
idx = self.Volumes[sender][1]
pair = self.Volumes[sender][2]
link = self.Volumes[sender][3]
mute = self.Volumes[sender][4]
db = self.vol2db(vol)
self.hw.setContignuous(path, db, idx)
if idx == 1:
p_idx = 2
else:
p_idx = 1
if link.isChecked():
self.hw.setContignuous(path, db, p_idx)
pair.setValue(vol)
def updateMicBoost(self, state):
sender = self.sender()
path = self.MicBoosts[sender][0]
idx = self.MicBoosts[sender][1]
if state:
value = 0x7ffe
else:
value = 0x0000
self.hw.setContignuous(path, value, idx)
def updateBalance(self, val):
sender = self.sender()
path = self.Balances[sender][0]
idx = self.Balances[sender][1]
pan = self.val2pan(val)
self.hw.setContignuous(path, pan, idx)
def updateMute(self, state):
sender = self.sender()
path = self.Mutes[sender][0]
l_elm = self.Mutes[sender][1]
r_elm = self.Mutes[sender][2]
if state:
# mute emulation
db = self.vol2db(10)
l_elm.setValue(0)
l_elm.setDisabled(True)
r_elm.setValue(0)
r_elm.setDisabled(True)
else:
db = self.vol2db(99)
l_elm.setDisabled(False)
l_elm.setValue(99)
r_elm.setDisabled(False)
r_elm.setValue(99)
self.hw.setContignuous(path, db, 1)
self.hw.setContignuous(path, db, 2)
libffado-2.4.2/support/mixer-qt4/ffado/mixer/presonus_fp10.py 0000644 0001750 0000144 00000015534 13114471135 023514 0 ustar jwoithe users #
# presonus_firebox.py - Qt4/FFADO application for Presonus FIREBOX
# Copyright (C) 2013 Takashi Sakamoto
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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
# 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 .
#
# from PyQt4 import QtGui, QtCore
# from PyQt4.QtCore import Qt
# from PyQt4.QtGui import QGridLayout
# from PyQt4.QtGui import QWidget, QLabel, QSizePolicy, QToolButton, QSlider, QDial
from ffado.import_pyqt import *
from math import log10
from ffado.config import *
class Presonus_FP10(QWidget):
outputs = [["Analog Out 1/2", 1],
["Analog Out 3/4", 2],
["Analog Out 5/6", 3],
["Analog Out 7/8", 4]]
def __init__(self, parent=None):
QWidget.__init__(self, parent)
def getDisplayTitle(self):
return 'FP10'
def buildMixer(self):
self.Volumes = {}
self.Mutes = {}
self.Pannings = {}
layout = QGridLayout(self)
for i in range(len(self.outputs)):
self.addVolume(self.outputs[i][0], self.outputs[i][1], i, layout)
def addVolume(self, name, bid, col, layout):
label = QLabel(self)
label.setText(name)
l_dial = self.getDial()
r_dial = self.getDial()
l_sld = self.getSlider()
r_sld = self.getSlider()
l_mute = self.getMute()
r_mute = self.getMute()
link = self.getLink()
layout.addWidget(label, 1, col * 2, 1, 2, Qt.AlignHCenter)
layout.addWidget(l_dial, 2, col * 2, Qt.AlignHCenter)
layout.addWidget(r_dial, 2, col * 2 + 1, Qt.AlignHCenter)
layout.addWidget(l_sld, 3, col * 2, Qt.AlignHCenter)
layout.addWidget(r_sld, 3, col * 2 + 1, Qt.AlignHCenter)
layout.addWidget(l_mute, 4, col * 2, Qt.AlignHCenter)
layout.addWidget(r_mute, 4, col * 2 + 1, Qt.AlignHCenter)
layout.addWidget(link, 5, col * 2, 1, 2, Qt.AlignHCenter)
path = "/Mixer/Feature_Volume_%d" % bid
self.Volumes[l_sld] = [path, 1, r_sld, l_mute, link]
self.Volumes[r_sld] = [path, 2, l_sld, r_mute, link]
self.Mutes[l_mute] = [r_mute, l_sld]
self.Mutes[r_mute] = [l_mute, r_sld]
path = "/Mixer/Feature_LRBalance_%d" % bid
self.Pannings[l_dial] = [path, 1]
self.Pannings[r_dial] = [path, 2]
# widget helper functions
def getSlider(self):
sld = QSlider(self)
sld.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
sld.setMinimum(0)
sld.setMaximum(99)
sld.setPageStep(10)
sld.setPageStep(10)
sld.setMinimumHeight(50)
sld.setTickInterval(25)
sld.setTickPosition(QSlider.TicksBothSides)
return sld
def getDial(self):
dial = QDial(self)
dial.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
dial.setMinimumSize(50, 50)
dial.setMaximumHeight(50)
dial.setNotchTarget(25)
dial.setNotchesVisible(True)
dial.setMinimum(0)
dial.setMaximum(99)
dial.setPageStep(10)
dial.setPageStep(10)
return dial
def getLink(self):
link = QToolButton(self)
link.setText("link")
link.setCheckable(True)
link.setMinimumWidth(100)
link.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return link
def getMute(self):
mute = QToolButton(self)
mute.setText("mute")
mute.setCheckable(True)
mute.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
return mute
def initValues(self):
for ctl, params in self.Volumes.items():
path = params[0]
idx = params[1]
pair = params[2]
mute = params[3]
link = params[4]
db = self.hw.getContignuous(path, idx)
vol = self.db2vol(db)
ctl.setValue(vol)
ctl.valueChanged.connect(self.updateVolume)
if vol == 0:
mute.setChecked(True)
if idx == 2:
pair_db = self.hw.getContignuous(path, 1)
if pair_db == db:
link.setChecked(True)
# Right - Center - Left
# 0x8000 - 0x0000 - 0x0001 - 0x7FFE
# ..., -1, 0, +1, ...
for ctl, params in self.Pannings.items():
path = params[0]
idx = params[1]
val = self.hw.getContignuous(path, idx)
state = -(val / 0x7FFE) * 50 + 50
ctl.setValue(state)
ctl.valueChanged.connect(self.updatePanning)
for ctl, params in self.Mutes.items():
ctl.clicked.connect(self.updateMute)
return
# helper functions
def vol2db(self, vol):
return (log10(vol + 1) - 2) * 16384
def db2vol(self, db):
return pow(10, db / 16384 + 2) - 1
def updateVolume(self, vol):
sender = self.sender()
path = self.Volumes[sender][0]
idx = self.Volumes[sender][1]
pair = self.Volumes[sender][2]
mute = self.Volumes[sender][3]
link = self.Volumes[sender][4]
if mute.isChecked():
return
db = self.vol2db(vol)
self.hw.setContignuous(path, db, idx)
if link.isChecked():
pair.setValue(vol)
def updatePanning(self, state):
sender = self.sender()
path = self.Pannings[sender][0]
idx = self.Pannings[sender][1]
val = (state - 50) * 0x7FFE / -50
self.hw.setContignuous(path, idx, val)
def updateMute(self, state):
sender = self.sender()
pair = self.Mutes[sender][0]
sld = self.Mutes[sender][1]
path = self.Volumes[sld][0]
idx = self.Volumes[sld][1]
pair_sld = self.Volumes[sld][2]
link = self.Volumes[sld][4]
if state:
db = 0x8000
vol = 0
else:
db = 0x0000
vol = 99
self.hw.setContignuous(path, db, idx)
sld.setValue(vol)
sld.setDisabled(state)
if link.isChecked():
if idx == 1:
idx = 2
else:
idx = 1
self.hw.setContignuous(path, db, idx)
pair.setChecked(state)
pair_sld.setValue(vol)
pair_sld.setDisabled(state)
libffado-2.4.2/support/mixer-qt4/ffado/mixer/globalmixer.py 0000644 0001750 0000144 00000024534 13114471135 023315 0 ustar jwoithe users #
# Copyright (C) 2008 by Arnold Krille
# 2013 by Philippe Carriere
#
# 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 .
#
# from PyQt4.QtCore import QObject, pyqtSlot
# from PyQt4.QtGui import QWidget, QMessageBox
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('global')
class GlobalMixer(QWidget):
def __init__(self, parent, name=None):
QWidget.__init__(self, parent)
uicLoad("ffado/mixer/globalmixer", self)
self.setName(name)
def setName(self,name):
if name is not None:
self.lblName.setText(name)
self.lblName.show()
else:
self.lblName.hide()
@pyqtSlot(int)
def on_clocksource_activated( self, clock ):
#log.debug("updateClockSource( " + str(clock) + " )")
if self.clockselect.canChangeValue():
self.clockselect.select( clock )
else:
msg = QMessageBox()
msg.question( msg, "Error", \
"Clock source change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.clocksource.setEnabled(False)
return
selected = self.clockselect.selected()
if selected != clock:
clockname = self.clockselect.getEnumLabel( clock )
msg = QMessageBox()
msg.question( msg, "Failed to select clock source", \
"Could not select %s as clock source." % clockname, \
QMessageBox.Ok )
self.clocksource.setCurrentIndex( selected )
@pyqtSlot(int)
def on_samplerate_activated( self, sr ):
log.debug("on_samplerate_activated( " + str(sr) + " )")
# If there's no clock, don't bother trying to set the sample rate
if (self.no_clock == 1):
return
if self.samplerateselect.canChangeValue():
self.samplerateselect.select( sr )
if 'onSamplerateChange' in dir(self):
self.onSamplerateChange()
log.debug("Mixer configuration updated")
else:
msg = QMessageBox()
msg.question( msg, "Error", \
"Sample rate change not permitted. Is streaming active?", \
QMessageBox.Ok )
self.samplerate.setEnabled(False)
return
selected = self.samplerateselect.selected()
if selected != sr:
srname = self.samplerateselect.getEnumLabel( sr )
msg = QMessageBox()
msg.question( msg, "Failed to select sample rate", \
"Could not select %s as samplerate." % srname, \
QMessageBox.Ok )
self.samplerate.setCurrentIndex( selected )
@pyqtSlot()
def on_txtNickname_returnPressed( self ):
if self.nickname.canChangeValue():
asciiData = self.txtNickname.text().toAscii()
self.nickname.setText( asciiData.data() )
else:
self.txtNickname.setText( self.nickname.text() )
def refreshSampleRates( self ):
no_clock_status = 0
n_rates = self.samplerateselect.count()
if (n_rates<1 or self.samplerateselect.getEnumLabel(0)=="0"):
no_clock_status = 1;
# Except for changes to the "no clock" status (where the number of
# "frequencies" can remain at 1), the following test won't account
# for cases where the frequency list changes but the total number of
# frequencies remains the same. If a device comes along for which
# this is a problem, an alternative approach will be needed.
if (no_clock_status!=self.no_clock or n_rates!=self.num_rates):
self.no_clock = 0;
self.num_rates = n_rates
self.samplerate.clear()
for i in range( self.num_rates ):
label = self.samplerateselect.getEnumLabel( i )
if (label == "0"):
label = "No clock found";
self.no_clock = 1;
self.samplerate.insertItem( self.num_rates, label )
if (self.no_clock != 1):
self.samplerate.setCurrentIndex( self.samplerateselect.selected() )
else:
self.samplerate.setCurrentIndex(0);
def initValues( self ):
#print( "GlobalMixer::initValues()" )
nb_clocks = self.clockselect.count()
for i in range( nb_clocks ):
self.clocksource.insertItem( nb_clocks, self.clockselect.getEnumLabel( i ) )
self.clocksource.setCurrentIndex( self.clockselect.selected() )
self.no_clock = 0;
self.num_rates = -1;
self.refreshSampleRates();
self.txtNickname.setText( self.nickname.text() )
self.samplerate.setEnabled(self.samplerateselect.canChangeValue())
self.clocksource.setEnabled(self.clockselect.canChangeValue())
if self.nickname.canChangeValue():
self.txtNickname.setEnabled(True)
else:
self.txtNickname.setEnabled(False)
self.streaming_status = self.streamingstatus.selected()
def polledUpdate(self):
self.samplerate.setEnabled(self.samplerateselect.canChangeValue())
self.clocksource.setEnabled(self.clockselect.canChangeValue())
self.txtNickname.setEnabled(self.nickname.canChangeValue())
ss = self.streamingstatus.selected()
ss_txt = self.streamingstatus.getEnumLabel(ss)
if ss_txt == 'Idle':
self.chkStreamIn.setChecked(False)
self.chkStreamOut.setChecked(False)
elif ss_txt == 'Sending':
self.chkStreamIn.setChecked(False)
self.chkStreamOut.setChecked(True)
elif ss_txt == 'Receiving':
self.chkStreamIn.setChecked(True)
self.chkStreamOut.setChecked(False)
elif ss_txt == 'Both':
self.chkStreamIn.setChecked(True)
self.chkStreamOut.setChecked(True)
if (ss!=self.streaming_status and ss_txt!='Idle'):
sr = self.samplerate.currentIndex()
self.samplerate.setCurrentIndex( self.samplerateselect.selected() )
# Check (and update) if device configuration needs to be updated
if ( self.samplerateselect.devConfigChanged(sr) ):
log.debug("Samplerate modified by external client")
if 'onSamplerateChange' in dir(self):
self.onSamplerateChange()
log.debug("Mixer configuration updated ")
else:
log.debug("Mixer configuration need to be updated but no means is provided")
self.streaming_status = ss
# Allow for devices whose sample rates can change dynamically (for
# example, in response to changes in external clock frequency)
self.refreshSampleRates();
def saveSettings(self, indent):
saveString = []
saveString.append('%s\n' % indent)
saveString.append('%s ' % indent + str(self.txtNickname.text()) + '\n')
saveString.append('%s\n' % indent)
saveString.append('%s\n' % indent)
saveString.append('%s ' % indent + str(self.clockselect.getEnumLabel(self.clockselect.selected())) + '\n')
saveString.append('%s\n' % indent)
saveString.append('%s\n' % indent)
saveString.append('%s ' % indent + str(self.samplerateselect.getEnumLabel(self.samplerateselect.selected())) + ' \n')
saveString.append('%s\n' % indent)
return saveString
def readSettings(self, readString):
# Nickname
try:
idx = readString.index('')
except Exception:
print( "No nickname found" )
idx = -1
if idx >= 0:
nickname = readString[idx+1]
if self.nickname.canChangeValue():
self.txtNickname.setText(nickname)
self.on_txtNickname_returnPressed()
log.debug("Nickname changed for %s" % nickname)
# Clock
try:
idx = readString.index('')
except Exception:
print( "No clock found" )
idx = -1
if idx >= 0:
clock = readString[idx+1]
nb_clocks = self.clockselect.count()
clockLabel = []
for i in range( nb_clocks ):
clockLabel.append(self.clockselect.getEnumLabel(i))
try:
idxclock = clockLabel.index(clock)
except Exception:
print( "No %s clock found" % clock )
idxclock = -1
if idxclock >= 0:
self.on_clocksource_activated(idxclock)
self.clocksource.setCurrentIndex(self.clockselect.selected())
log.debug("Clock set to index %d (%s)" % (idxclock, clock))
del clockLabel
# Samplerate
try:
idx = readString.index('')
except Exception:
print( "Samplerate not found" )
idx = -1
if idx >= 0:
samplerate = readString[idx+1]
nb_srate = self.samplerateselect.count()
srateLabel = []
for i in range( nb_srate ):
srateLabel.append(self.samplerateselect.getEnumLabel(i))
try:
idxsrate = srateLabel.index(samplerate)
except Exception:
print( "No %s samplerate found" % samplerate )
idxsrate = -1
if idxsrate >= 0:
self.on_samplerate_activated(idxsrate)
self.samplerate.setCurrentIndex(self.samplerateselect.selected())
log.debug("Samplerate set to index %d (%s)" % (idxsrate, samplerate))
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/edirolfa101control.py 0000644 0001750 0000144 00000012424 13114471135 024413 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Daniel Wagner
#
# 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 .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('edirolfa101')
class EdirolFa101Control(QWidget):
def __init__(self, parent = None):
QWidget.__init__(self, parent)
uicLoad("ffado/mixer/edirolfa101", self)
def setVolumeIn1(self, vol):
self.setValue('vol1', vol)
def setVolumeIn2(self, vol):
self.setValue('vol2', vol)
def setVolumeIn3(self, vol):
self.setValue('vol3', vol)
def setVolumeIn4(self, vol):
self.setValue('vol4', vol)
def setVolumeIn5(self, vol):
self.setValue('vol5', vol)
def setVolumeIn6(self, vol):
self.setValue('vol6', vol)
def setVolumeIn7(self, vol):
self.setValue('vol7', vol)
def setVolumeIn8(self, vol):
self.setValue('vol8', vol)
def setVolumeIn9(self, vol):
self.setValue('vol9', vol)
def setVolumeIn10(self,vol):
self.setValue('vol10', vol)
def setBalanceIn1(self, bal):
self.setValue('bal1', bal)
def setBalanceIn2(self, bal):
self.setValue('bal2', bal)
def setBalanceIn3(self, bal):
self.setValue('bal3', bal)
def setBalanceIn4(self, bal):
self.setValue('bal4', bal)
def setBalanceIn5(self, bal):
self.setValue('bal5', bal)
def setBalanceIn6(self, bal):
self.setValue('bal6', bal)
def setBalanceIn7(self, bal):
self.setValue('bal7', bal)
def setBalanceIn8(self, bal):
self.setValue('bal8', bal)
def setBalanceIn9(self, bal):
self.setValue('bal9', bal)
def setBalanceIn10(self,bal):
self.setValue('bal10', bal)
def getIndexByName(self, name):
index = int(name.lstrip('volba')) - 1
streamingMap = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
nonStreamingMap = [ 9, 10, 1, 2, 3, 4, 5, 6, 7, 8 ]
if self.is_streaming:
index = streamingMap[index]
else:
index = nonStreamingMap[index]
return index
def getWidgetByName(self, name):
index = self.getIndexByName(name)
widgetName = ''
if name[0:3] == 'vol':
widgetName = 'sldInput%d' % (index)
else:
widgetName = 'sldBal%d' % (index)
return getattr(self, widgetName)
def getFeatureByName(self, name):
index = self.getIndexByName(name)
featureName = ''
if name[0:3] == 'vol':
featureName = '/Mixer/Feature_Volume_%d' % ((index + 1) / 2)
else:
featureName = '/Mixer/Feature_LRBalance_%d' % ((index + 1) / 2)
return featureName
def getChannelIndexByName(self, name):
index = self.getIndexByName(name)
return ((index - 1) % 2) + 1
def setValue(self, name, val):
log.debug("setting %s to %d" % (name, val))
self.updateStreamingState()
feature = self.getFeatureByName(name)
widget = self.getWidgetByName(name)
channel = self.getChannelIndexByName(name)
self.hw.setContignuous(feature, val, idx = channel)
def updateStreamingState(self):
ss = self.streamingstatus.selected()
ss_txt = self.streamingstatus.getEnumLabel(ss)
if ss_txt != 'Idle':
self.is_streaming = True
else:
self.is_streaming = False
def initValues(self):
self.updateStreamingState()
for i in range(1, 11):
name = 'vol%d' % i
feature = self.getFeatureByName(name)
widget = self.getWidgetByName(name)
channel = self.getChannelIndexByName(name)
val = self.hw.getContignuous(feature, idx = channel)
log.debug("%s value is %d" % (name , val))
widget.setValue(val)
for i in range(1, 11):
name = 'bal%d' % i
feature = self.getFeatureByName(name)
widget = self.getWidgetByName(name)
channel = self.getChannelIndexByName(name)
val = self.hw.getContignuous(feature, idx = channel)
# Workaround: The current value is not properly initialized
# on the device and returns after bootup always 0.
# Though we happen to know what the correct value should
# be therefore we overwrite the 0
if channel == 1:
val = 32512
else:
val = -32768
log.debug("%s value is %d" % (name , val))
widget.setValue(val)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/quatafire.py 0000644 0001750 0000144 00000007776 13114471135 023002 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QWidget
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('quatafire')
class QuataFire(QWidget):
def __init__(self,parent = None):
QWidget.__init__(self,parent)
uicLoad("ffado/mixer/quatafire", self)
self.VolumeControls={
self.sldCh1: ['/Mixer/Feature_Volume_1', 1],
self.sldCh2: ['/Mixer/Feature_Volume_1', 2],
self.sldCh34: ['/Mixer/Feature_Volume_2', 0],
self.sldCh56: ['/Mixer/Feature_Volume_3', 0],
self.sldDawAll: ['/Mixer/Feature_Volume_4', 0],
self.sldDawCH1: ['/Mixer/Feature_Volume_4', 1],
self.sldDawCH2: ['/Mixer/Feature_Volume_4', 2],
self.sldDawCH3: ['/Mixer/Feature_Volume_4', 3],
self.sldDawCH4: ['/Mixer/Feature_Volume_4', 4],
self.sldDawCH5: ['/Mixer/Feature_Volume_4', 5],
self.sldDawCH6: ['/Mixer/Feature_Volume_4', 6],
self.sldDawCH7: ['/Mixer/Feature_Volume_4', 7],
self.sldDawCH8: ['/Mixer/Feature_Volume_4', 8],
}
self.PanControls={
#self.dialCh1: ['/Mixer/Feature_Volume_1'],
#self.dialCh2: ['/Mixer/Feature_Volume_1'],
self.dialCh34: ['/Mixer/Feature_Volume_2'],
self.dialCh56: ['/Mixer/Feature_Volume_3'],
}
def updateVolume(self,a0):
sender = self.sender()
vol = -a0
log.debug("setting %s volume to %d" % (self.VolumeControls[sender][0], vol))
self.hw.setContignuous(self.VolumeControls[sender][0], vol, self.VolumeControls[sender][1])
def updatePan(self,a0):
sender = self.sender()
pan_left = a0
if pan_left < 0:
pan_left = 0
pan_right = -a0
if pan_right < 0:
pan_right = 0
log.debug("setting %s pan left to %d" % (self.PanControls[sender][0], -pan_left))
self.hw.setContignuous(self.PanControls[sender][0], -pan_left, 1)
log.debug("setting %s pan right to %d" % (self.PanControls[sender][0], -pan_right))
self.hw.setContignuous(self.PanControls[sender][0], -pan_right, 2)
def initValues(self):
for ctrl, info in self.VolumeControls.items():
vol = self.hw.getContignuous(self.VolumeControls[ctrl][0], self.VolumeControls[ctrl][1])
val = -vol
log.debug("%s volume is %d, set to %d" % (ctrl.objectName(), vol, val))
ctrl.setValue(val)
# connect the UI element
ctrl.valueChanged.connect(self.updateVolume)
for ctrl, info in self.PanControls.items():
pan_left = self.hw.getContignuous(self.PanControls[ctrl][0], 1)
pan_right = self.hw.getContignuous(self.PanControls[ctrl][0], 2)
log.debug("%s pan left is %d" % (ctrl.objectName() , pan_left))
log.debug("%s pan right is %d" % (ctrl.objectName() , pan_right))
if pan_left == 0:
val = pan_right
else:
val = -pan_left
ctrl.setValue(val)
# connect the UI element
ctrl.valueChanged.connect(self.updatePan)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire_base.py 0000644 0001750 0000144 00000013350 13034670550 023416 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
import logging
log = logging.getLogger('saffirebase')
# the class that holds all actual control code
class SaffireMixerBase:
def __init__(self):
pass
def updateMatrixVolume(self,a0):
sender = self.sender()
vol = a0
log.debug("set %s %d %d to %d" % (
self.VolumeControls[sender][0],
self.VolumeControls[sender][1],
self.VolumeControls[sender][2],
vol))
self.hw.setMatrixMixerValue(self.VolumeControls[sender][0],
self.VolumeControls[sender][1],
self.VolumeControls[sender][2],
vol)
def updateLowResVolume(self,a0):
sender = self.sender()
vol = 127 - a0
log.debug("set %s to %d" % (
self.VolumeControlsLowRes[sender][0],
vol))
self.hw.setDiscrete(self.VolumeControlsLowRes[sender][0], vol)
def updateSelector(self,a0):
sender = self.sender()
if a0:
state = 1
else:
state = 0
log.debug("set %s to %d" % (
self.SelectorControls[sender][0],
state))
self.hw.setDiscrete(self.SelectorControls[sender][0], state)
# if there are linked selector controls, update them
if len(self.SelectorControls[sender]) >= 2:
linked = self.SelectorControls[sender][1]
for ctl in linked:
if ctl.isChecked():
state = 1
else:
state = 0
self.hw.setDiscrete(self.SelectorControls[ctl][0], state)
def triggerButton(self):
sender = self.sender()
log.debug("trigger %s" % (
self.TriggerButtonControls[sender][0]))
self.hw.setDiscrete(self.TriggerButtonControls[sender][0], 1)
def saveText(self):
sender = self.sender()
textbox = self.saveTextControls[sender][0]
log.debug("save %s" % (
textbox.text().ascii()))
self.hw.setText(self.TextControls[textbox][0], textbox.text().ascii())
def initCombo(self, combo):
path = self.ComboControls[combo][0]
combo.clear()
nb_items = self.hw.enumCount(path)
for i in range( nb_items ):
combo.insertItem( nb_items, self.hw.enumGetLabel(path, i) )
combo.setCurrentIndex( self.hw.enumSelected(path) )
def selectCombo(self, mode):
sender = self.sender()
path = self.ComboControls[sender][0]
self.hw.enumSelect(path, mode)
sender.setCurrentIndex( self.hw.enumSelected(path) )
def updateValues(self):
for ctrl, info in self.VolumeControls.items():
vol = self.hw.getMatrixMixerValue(self.VolumeControls[ctrl][0],
self.VolumeControls[ctrl][1],
self.VolumeControls[ctrl][2])
log.debug("%s volume is %d" % (ctrl.objectName() , vol))
ctrl.setValue(vol)
for ctrl, info in self.VolumeControlsLowRes.items():
vol = self.hw.getDiscrete(self.VolumeControlsLowRes[ctrl][0])
log.debug("%s volume is %d" % (ctrl.objectName() , 127-vol))
ctrl.setValue(127 - vol)
for ctrl, info in self.SelectorControls.items():
state = self.hw.getDiscrete(self.SelectorControls[ctrl][0])
log.debug("%s state is %d" % (ctrl.objectName() , state))
if state:
ctrl.setChecked(True)
else:
ctrl.setChecked(False)
for ctrl, info in self.TriggerButtonControls.items():
pass
for ctrl, info in self.TextControls.items():
text = self.hw.getText(self.TextControls[ctrl][0])
log.debug("%s text is %s" % (ctrl.objectName() , text))
ctrl.setText(text)
for ctrl, info in self.ComboControls.items():
self.initCombo(ctrl)
def polledUpdateVolumeLowRes(self, srcpath, ctrl, divider=1):
vol = self.hw.getDiscrete(srcpath) / divider
#log.debug("polledUpdateVolumeLowRes: vol = %s" % vol)
ctrl.setValue(vol)
def initValues(self):
self.updateValues()
for ctrl, info in self.VolumeControls.items():
ctrl.valueChanged.connect(self.updateMatrixVolume)
for ctrl, info in self.VolumeControlsLowRes.items():
ctrl.valueChanged.connect(self.updateLowResVolume)
for ctrl, info in self.SelectorControls.items():
ctrl.stateChanged.connect(self.updateSelector)
for ctrl, info in self.TriggerButtonControls.items():
ctrl.clicked.connect(self.triggerButton)
for ctrl, info in self.saveTextControls.items():
ctrl.clicked.connect(self.saveText)
for ctrl, info in self.ComboControls.items():
ctrl.activated.connect(self.selectCombo)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/mixer/phase88.ui 0000644 0001750 0000144 00000276351 13010331634 022255 0 ustar jwoithe users
Copyright (C) 2014 by András Murányi
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Phase88ControlUI
0
0
977
758
Terratec Phase 88 Control
QToolButton:checked {
background-color: red;
color: white;
border-radius: 4px;
}
-
Hardware Mixer
2
2
-
3
-
0
0
QFrame::StyledPanel
QFrame::Plain
4
-
0
0
S/PDIF in
Qt::AlignCenter
false
-
0
0
Line in 3/4
Qt::AlignCenter
false
-
0
0
Line in 1/2
Qt::AlignCenter
false
-
0
0
WavePlay
Qt::AlignCenter
false
-
0
0
-
Line/Back
-
Mic/Front
-
0
0
Line in 5/6
Qt::AlignCenter
false
-
0
0
Line in 7/8
Qt::AlignCenter
false
-
0
0
-
S/PDIF
-
CH 1/2
-
CH 3/4
-
CH5/6
-
CH7/8
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
1
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
QFrame::StyledPanel
QFrame::Plain
11
-
1
-
3
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
55
0
-0dB
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksBelow
3276
-
Qt::Horizontal
40
20
-
0
0
-25600
0
1000
10000
Qt::Vertical
QSlider::TicksAbove
3276
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
Mute
true
-
Qt::Horizontal
40
20
-
0
-
Qt::Horizontal
40
20
-
Stereo Link
true
-
Qt::Horizontal
40
20
-
0
0
-
S/PDIF Out
-
Line Out 1/2
-
Line Out 3/4
-
Line Out 5/6
-
Line Out 7/8
-
None
-
0
0
Master
Qt::AlignCenter
false
-
Sync Source
false
-
-
Internal
-
External
-
External Sync Source
false
-
-
S/PDIF
-
WordClock
qPixmapFromMimeSource
muteButton1
toggled(bool)
sldInput1
setDisabled(bool)
46
622
61
581
muteButton2
toggled(bool)
sldInput2
setDisabled(bool)
95
619
104
559
muteButton3
toggled(bool)
sldInput3
setDisabled(bool)
170
621
178
534
muteButton4
toggled(bool)
sldInput4
setDisabled(bool)
242
613
235
549
muteButton5
toggled(bool)
sldInput5
setDisabled(bool)
285
617
297
540
muteButton6
toggled(bool)
sldInput6
setDisabled(bool)
361
619
356
545
muteButton7
toggled(bool)
sldInput7
setDisabled(bool)
408
614
415
550
muteButton8
toggled(bool)
sldInput8
setDisabled(bool)
480
618
477
553
muteButtonSPDIFL
toggled(bool)
sldInputSPDIFL
setDisabled(bool)
522
617
532
555
muteButtonSPDIFR
toggled(bool)
sldInputSPDIFR
setDisabled(bool)
600
616
596
532
muteButtonWavePlayL
toggled(bool)
sldInputWavePlayL
setDisabled(bool)
674
619
667
554
muteButtonWavePlayR
toggled(bool)
sldInputWavePlayR
setDisabled(bool)
717
621
715
552
muteButtonMasterL
toggled(bool)
sldInputMasterL
setDisabled(bool)
826
621
814
532
muteButtonMasterR
toggled(bool)
sldInputMasterR
setDisabled(bool)
882
621
890
545
libffado-2.4.2/support/mixer-qt4/ffado/mixer/rme.ui 0000644 0001750 0000144 00000163110 13003126231 021541 0 ustar jwoithe users
RmeMixerUI
0
0
635
933
0
0
RmeMixer
QLayout::SetDefaultConstraint
-
true
0
0
0
Control
-
0
0
QFrame::NoFrame
QFrame::Raised
-
0
0
Input gains
-
0
0
Mic 1
-
65
1
Qt::Horizontal
-
0
0
Mic 2
-
65
Qt::Horizontal
-
0
0
Input 3
-
0
36
Qt::Horizontal
-
0
0
Input 4
-
0
36
Qt::Horizontal
-
0
0
Channel 3/4 options
-
Chan 3
-
Instr
-
Pad
-
Chan 4
-
Pad
-
Instr
-
Qt::Vertical
20
0
-
QFrame::NoFrame
QFrame::Raised
-
Phantom
-
Mic 1
-
Mic 3
-
Mic 2
-
Mic 4
-
Qt::Vertical
20
0
-
Level in
-
Lo gain
-
+4 dBu
-
-10 dBV
-
Qt::Vertical
20
0
-
Inputs
-
1
-
7
-
-
Front
-
Rear
-
Front+Rear
-
8
-
-
Front
-
Rear
-
Front+Rear
-
-
Front
-
Rear
-
Front+Rear
-
Qt::Vertical
20
0
-
Instrument options
-
Drive
-
Limiter
-
Speaker emulation
-
Qt::Vertical
20
0
-
0
0
QFrame::NoFrame
QFrame::Raised
-
SPDIF in
-
ADAT2 Optical
-
Coax
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
SPDIF out
-
ADAT2 Optical
-
Emphasis
-
Professional
-
Non-audio
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
Level out
-
Hi gain
-
+4 dBu
-
-10 dBV
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
Phones level
-
Hi gain
-
+4 dBU
-
-10 dBV
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
QFrame::NoFrame
QFrame::Raised
-
Clock mode
-
Autosync
-
Master
-
Qt::Vertical
20
40
-
Pref sync ref
-
Word clock
-
ADAT1 in
-
ADAT2 in
-
SPDIF in
-
TCO
-
Qt::Vertical
20
0
-
Sync check
-
Word
-
No lock
-
ADAT1
-
No lock
-
ADAT2
-
No lock
-
SPDIF
-
No lock
-
TCO
-
No lock
-
Qt::Vertical
20
0
-
Autosync ref
-
Input
-
[unset]
-
Frequency
-
[unset]
-
Qt::Vertical
20
40
-
0
0
QFrame::NoFrame
QFrame::Raised
-
0
0
SPDIF frequency
-
48 kHz
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
0
0
Word clock
-
Single speed
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
0
0
System clock
-
Mode
-
Slave
-
Frequency
-
44100 kHz
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
0
0
Limit bandwidth
-
-
All channels
-
Analog + SPDIF
-
Analog 1-8
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
frame_4
frame
frame_2
frame_3
igains_chan34_opts_frame
true
TCO
-
-
LTC In
-
-
00
-
:
-
00
-
:
-
00
-
:
-
00
-
Qt::Horizontal
40
20
-
Input State
-
LTC
-
valid
-
25.00 fps
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
full frame
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
Video
-
no video
-
WordClk
-
none
-
Frame Rate
-
Frame Type
-
Sync Source
-
LTC
-
Video
-
Word Clock
-
-
Status
-
Locked
-
Video Input
-
75 Ohm Term.
-
Word Clock Conversion
-
1:1
-
44.1 kHz -> 48 kHz
-
48 kHz -> 44.1 kHz
-
Qt::Vertical
20
40
-
-
Frame Rate
-
24 fps
-
25 fps
-
29.97 fps
-
29.97 dfps
-
30 fps
-
30 dfps
-
Sample Rate
false
-
44.1 kHz
-
48 kHz
-
true
0
-
0
-
+ 0.1 %
-
- 0.1 %
-
+ 4 %
-
- 4 %
-
Frequency
-
48000 Hz
-
Qt::Vertical
20
40
-
Qt::Horizontal
40
20
Input mixer
Playback mixer
Output levels
-
0
0
Device operations
QLayout::SetDefaultConstraint
-
0
0
Flash
-
Load control
-
Save control
-
Load mixer
-
Save mixer
-
0
0
Mixer presets
-
FFADO default
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
0
libffado-2.4.2/support/mixer-qt4/ffado/mixer/Saffire_Pro40_monitoring.ui 0000644 0001750 0000144 00000124130 12736443006 025603 0 ustar jwoithe users
SaffirePro40Monitoring
0
0
1188
658
Saffire Pro 40 Monitoring
false
-
-
Global Settings
-
H/W
true
-
Dim level
Qt::AlignCenter
-
-
-87
0
Qt::Vertical
false
QSlider::TicksBothSides
10
-
true
Activate Dim
true
-
Mute
true
-
-
Line/Out Settings
-
-
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
-
-
-
75
true
1
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
2
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
3
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
4
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
5
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
6
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
7
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
8
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
9
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
false
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
10
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
true
-
ADAT as SPDIF
-
Qt::Vertical
20
40
libffado-2.4.2/support/mixer-qt4/ffado/mixer/Saffire_Pro26_monitoring.ui 0000644 0001750 0000144 00000052314 12736441507 025617 0 ustar jwoithe users
SaffirePro26Monitoring
0
0
789
666
Saffire Pro 26 Monitoring
false
-
-
Global Settings
-
H/W
true
-
Dim level
Qt::AlignCenter
-
-
-87
0
Qt::Vertical
false
QSlider::TicksBothSides
10
-
true
Activate Dim
true
-
Mute
true
-
-
Line/Out Settings
-
-
-
75
true
1
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
2
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
3
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
4
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
5
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
6
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
libffado-2.4.2/support/mixer-qt4/ffado/mixer/Saffire_Pro14_monitoring.ui 0000644 0001750 0000144 00000060137 12736440755 025622 0 ustar jwoithe users
SaffirePro14Monitoring
0
0
806
724
Saffire Pro 40 Monitoring
false
-
-
Global Settings
-
H/W
true
-
Dim level
Qt::AlignCenter
-
-
-87
0
Qt::Vertical
false
QSlider::TicksBothSides
10
-
true
Activate Dim
true
-
Mute
true
-
-
Line/Out Settings
-
-
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
-
-
-
75
true
1
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
2
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
3
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
4
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
Qt::Vertical
20
40
-
true
Line/In switches
-
1
-
Line
buttonGroup
-
Inst
buttonGroup
-
2
-
Line
buttonGroup_2
-
Inst
buttonGroup_2
-
3
-
Lo
buttonGroup_3
-
Hi
buttonGroup_3
-
4
-
Lo
buttonGroup_4
-
Hi
buttonGroup_4
libffado-2.4.2/support/mixer-qt4/ffado/mixer/Saffire_Pro24_monitoring.ui 0000644 0001750 0000144 00000100064 12736440374 025612 0 ustar jwoithe users
SaffirePro24Monitoring
0
0
969
768
Saffire Pro 40 Monitoring
false
-
-
Global Settings
-
H/W
true
-
Dim level
Qt::AlignCenter
-
-
-87
0
Qt::Vertical
false
QSlider::TicksBothSides
10
-
true
Activate Dim
true
-
Mute
true
GlobalDim
GlobalMute
HWSwitch
GlobalSetLabel
-
-
Line/Out Settings
-
-
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
40
20
-
Qt::Horizontal
40
20
-
Mono
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
-
-
75
true
1
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
0
0
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
2
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
3
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
4
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
5
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
75
true
6
-
-
-40
0
Qt::Vertical
QSlider::TicksBothSides
5
-
UA
true
-
Mu
true
-
GD
true
-
GM
true
-
-
-
true
Line/In switches
QLayout::SetDefaultConstraint
-
1
-
Line
buttonGroup
-
Inst
buttonGroup
-
2
-
Line
buttonGroup_2
-
Inst
buttonGroup_2
-
3
-
Lo
buttonGroup_3
-
Hi
buttonGroup_3
-
4
-
Lo
buttonGroup_4
-
Hi
buttonGroup_4
-
Qt::Vertical
20
40
libffado-2.4.2/support/mixer-qt4/ffado/mixer/audiofire_settings.ui 0000644 0001750 0000144 00000013747 12233362225 024670 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
AfSettingsWidget
0
0
534
207
-
-
Save Settings to Device
-
S/PDIF Mode
-
Consumer
-
Professional
-
Phantom Power
true
-
Identify Device
-
Digital Interface
-
-
SPDIF Coaxial
-
SPDIF Optical
-
ADAT Optical
-
Playback Routing
-
Analog Out 1/2
-
-
Stream Playback 1/2
-
Stream Playback 3/4
-
Stream Playback 5/6
-
Headphone Out 1/2
-
-
Stream Playback 1/2
-
Stream Playback 3/4
-
Stream Playback 5/6
-
Digital Out 1/2
-
-
Stream Playback 1/2
-
Stream Playback 3/4
-
Stream Playback 5/6
qPixmapFromMimeSource
radioConsumer
radioProfessional
cmbDigIface
cmbRoute1
cmbRoute2
cmbRoute3
btnPhantom
btnSaveSettings
btnIdentify
libffado-2.4.2/support/mixer-qt4/ffado/mixer/maudio_bebob_output.ui 0000644 0001750 0000144 00000006277 12233355731 025034 0 ustar jwoithe users
MAudio_BeBoB_Output_Widget
0
0
94
250
Form
0
0
-
name
Qt::AlignCenter
-
0
0
0
100
Qt::Vertical
QSlider::NoTicks
50
-
0
0
0
100
Qt::Vertical
QSlider::NoTicks
50
-
-
0
0
Mute
true
-
0
0
Link
true
libffado-2.4.2/support/mixer-qt4/ffado/mixer/maudio_bebob_input.ui 0000644 0001750 0000144 00000010452 12233355731 024621 0 ustar jwoithe users
MAudio_BeBoB_Input_Widget
0
0
100
253
Dialog
0
0
-
0
0
0
40
10
Qt::Vertical
QSlider::NoTicks
50
-
10
name
Qt::AlignCenter
-
0
0
0
100
Qt::Vertical
QSlider::NoTicks
50
-
0
0
16777215
40
25.000000000000000
true
-
0
0
16777215
40
25.000000000000000
true
-
0
0
Link
true
-
0
0
Mute
true
libffado-2.4.2/support/mixer-qt4/ffado/mixer/yamahago.ui 0000644 0001750 0000144 00000052543 12233354302 022561 0 ustar jwoithe users
YamahaGoUI
0
0
794
355
0
0
Yamaha GO series Control
-
-
0
0
Output Routing
-
Analog out 1/2
false
-
-
Stream in 1/2
-
Stream in 3/4
-
Analog in 1/2
-
Digital in 1/2
-
Mixer out 1/2
-
Stream in 5/6
-
Analog out 3/4
false
-
-
Stream in 1/2
-
Stream in 3/4
-
Analog in 1/2
-
Digital in 1/2
-
Mixer out 1/2
-
Stream in 5/6
-
Digital out 1/2
false
-
-
Stream in 1/2
-
Stream in 3/4
-
Analog in 1/2
-
Digital in 1/2
-
Mixer out 1/2
-
Stream in 5/6
-
Microphone Level
-
Analog in 1/2
false
-
-
High
-
Middle
-
Low
-
Qt::Horizontal
40
20
-
-
Hardware Mixer
-
-
0
99
10
10
Qt::Vertical
0
-
10
Qt::Vertical
-
-
0
99
10
10
Qt::Vertical
0
-
10
Qt::Vertical
-
Digital in 1/2
Qt::AlignCenter
-
-
0
99
10
10
Qt::Vertical
0
-
10
Qt::Vertical
-
Mixer Out 1/2
Qt::AlignCenter
false
-
Analog in 1/2
Qt::AlignCenter
-
-
0
0
0
100
Qt::LeftToRight
0
99
10
10
Qt::Vertical
0
-
10
Qt::Vertical
-
link
true
-
link
true
-
link
true
-
link
true
-
link
true
-
Stream in 1/2
Qt::AlignCenter
false
-
link
true
-
Stream in 3/4
Qt::AlignCenter
false
-
-
0
99
10
10
Qt::Vertical
0
-
10
Qt::Vertical
-
Stream in 5/6
Qt::AlignCenter
false
-
-
10
Qt::Vertical
-
0
80
0
99
10
10
Qt::Vertical
0
-
Analog Out
-
1/2
Qt::AlignCenter
-
3/4
Qt::AlignCenter
-
-
0
100
10
Qt::Vertical
-
10
Qt::Vertical
-
-
10
Qt::Vertical
-
10
Qt::Vertical
-
link
true
-
link
true
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/profire2626_settings.ui 0000644 0001750 0000144 00000016341 12230421702 024671 0 ustar jwoithe users
Profire2626Settings
0
0
763
542
Form
-
false
not implemented
Peak meters
-
-
Pre fader
-
Post fader
-
Mode
-
Peak hold
-
-
Off
-
1 second
-
3 seconds
-
Infinite
-
false
not implemented
Standalone mode
-
-
Internal
-
SPDIF
-
Optical A
-
Word Clock (BNC)
-
Optical port B mode
-
false
Sample rate
-
false
Sync source
-
Converter mode
-
-
44.1 kHz
-
48 kHz
-
88.2 kHz
-
96 kHz
-
176.4 kHz
-
192 kHz
-
-
ADAT
-
SPDIF
-
-
A/D
-
A/D - D/A
-
Master volume knob
-
Analog out 1/2
-
Analog out 3/4
-
Analog out 5/6
-
Analog out 7/8
-
<html><head/><body><p><span style=" font-weight:600;">Warning:</span> Unchecking a port will make it play at full volume and may damage your speakers and/or hearing!</p></body></html>
true
libffado-2.4.2/support/mixer-qt4/ffado/mixer/motu_mark3.ui 0000644 0001750 0000144 00000000615 12222540720 023044 0 ustar jwoithe users
MotuMark3MixerUI
0
0
765
511
Form
libffado-2.4.2/support/mixer-qt4/ffado/mixer/motu.ui 0000644 0001750 0000144 00002352625 12171745245 022000 0 ustar jwoithe users
Copyright (C) 2008 by Jonathan Woithe
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
MotuMixerUI
0
0
1156
803
0
0
Form1
-
Device settings
-
Optical input mode
-
9
-
Disabled
-
ADAT
-
Toslink
-
QFrame::HLine
QFrame::Sunken
-
Optical output mode
-
9
-
Disabled
-
ADAT
-
Toslink
-
Phones assign
-
9
-
Disabled
-
Phones
-
Analog 1-2
-
Analog 3-4
-
Analog 5-6
-
Analog 7-8
-
AES/EBU
-
SPDIF
-
ADAT 1-2
-
ADAT 3-4
-
ADAT 5-6
-
ADAT 7-8
-
QFrame::HLine
QFrame::Sunken
-
Meter source
-
9
-
Analog out
-
ADAT in
-
ADAT out
-
AES/EBU Meter
-
9
-
AES/EBU out
-
AES/EBU in
-
Peakhold time
-
9
-
Off
-
2 sec
-
4 sec
-
10 sec
-
1 min
-
5 min
-
8 min
-
infinite
-
Cliphold time
-
9
-
Off
-
2 sec
-
4 sec
-
10 sec
-
1 min
-
5 min
-
8 min
-
infinite
-
Qt::Vertical
QSizePolicy::Expanding
20
220
-
QFrame::NoFrame
QFrame::Plain
-
Analog input settings
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
false
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
9
Pad
true
-
Invert
true
-
true
9
Boost
true
-
9
+4dBu
true
-
75
true
8
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
Invert
true
-
Qt::Vertical
QSizePolicy::Minimum
20
40
-
75
true
SPDIF 1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
53
-
9
Gain
Qt::AlignCenter
false
-
Invert
true
-
Qt::Vertical
QSizePolicy::Minimum
20
40
-
75
true
SPDIF 2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
101
20
-
QFrame::NoFrame
QFrame::Plain
0
0
-
0
Mix 1
-
0
Analog
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
AES/EBU
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
450
20
SPDIF
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
470
20
ADAT
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
31
20
-
Mix 1 output
-
9
Destination
Qt::AlignCenter
false
-
9
-
Disabled
-
Phones
-
Analog 1-2
-
Analog 3-4
-
Analog 5-6
-
Analog 7-8
-
AES/EBU
-
SPDIF
-
ADAT 1-2
-
ADAT 3-4
-
ADAT 5-6
-
ADAT 7-8
-
9
Mute
true
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
Mix 2
-
Analog
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
AES/EBU
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
450
20
SPDIF
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
470
20
ADAT
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
31
20
-
Mix 2 output
-
9
Destination
Qt::AlignCenter
false
-
9
-
Disabled
-
Phones
-
Analog 1-2
-
Analog 3-4
-
Analog 5-6
-
Analog 7-8
-
AES/EBU
-
SPDIF
-
ADAT 1-2
-
ADAT 3-4
-
ADAT 5-6
-
ADAT 7-8
-
9
Mute
true
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
Mix 3
-
Analog
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
AES/EBU
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
450
20
SPDIF
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
470
20
ADAT
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
31
20
-
Mix 3 output
-
9
Destination
Qt::AlignCenter
false
-
9
-
Disabled
-
Phones
-
Analog 1-2
-
Analog 3-4
-
Analog 5-6
-
Analog 7-8
-
AES/EBU
-
SPDIF
-
ADAT 1-2
-
ADAT 3-4
-
ADAT 5-6
-
ADAT 7-8
-
9
Mute
true
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
Mix 4
-
Analog
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
AES/EBU
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
450
20
SPDIF
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
470
20
ADAT
0
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
1
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
2
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
3
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
4
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
5
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
6
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
7
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
-
9
Solo
true
-
9
Mute
true
-
9
-64
64
-
9
Pan
Qt::AlignCenter
false
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
8
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
31
20
-
Mix 4 output
-
9
Destination
Qt::AlignCenter
false
-
9
-
Disabled
-
Phones
-
Analog 1-2
-
Analog 3-4
-
Analog 5-6
-
Analog 7-8
-
AES/EBU
-
SPDIF
-
ADAT 1-2
-
ADAT 3-4
-
ADAT 5-6
-
ADAT 7-8
-
9
Mute
true
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
Masters
Qt::AlignCenter
0
9
0
-
QFrame::NoFrame
QFrame::Plain
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
Phones
Qt::AlignCenter
false
0
-
QFrame::NoFrame
QFrame::Plain
-
QFrame::NoFrame
QFrame::Plain
0
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
12
0
128
128
Qt::Vertical
5
-
Qt::Horizontal
QSizePolicy::Expanding
1
20
-
75
true
MainOut
Qt::AlignCenter
false
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/audiofire_strip.ui 0000644 0001750 0000144 00000015560 11440772462 024173 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
AfMonitorWidget
0
0
86
230
0
0
-
Name
Qt::AlignCenter
false
-
0
0
30
30
16777215
50
255
-
0
0
30
30
16777215
50
255
-
0
10
0
50
0
16777216
1048576
262144
Qt::Vertical
1048576
-
0
10
0
16777216
1048576
262144
Qt::Vertical
1048576
-
0
0
S
true
Qt::ToolButtonTextOnly
-
0
0
M
true
Qt::ToolButtonTextOnly
-
0
0
M
true
Qt::ToolButtonTextOnly
-
0
0
S
true
Qt::ToolButtonTextOnly
qPixmapFromMimeSource
rotPan0
rotPan1
btnSolo0
btnSolo1
btnMute0
btnMute1
sldGain0
sldGain1
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire_dice_monitoring.ui 0000644 0001750 0000144 00000022230 11332123657 025637 0 ustar jwoithe users
Form
0
0
599
406
Form
-
Qt::Vertical
0
0
-
0
-
0
0
Ch 1 Instrument
-
0
0
Ch 4 High Level
-
0
0
Ch 2 Instrument
-
0
0
Ch 3 High Level
-
0
0
Use ADAT-Out as S/PDIF
-
0
0
Pad Output
-
0
4
Volume
false
false
-
0
4
-127
0
-
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
dB
-127
0
-
Dim Level:
Qt::AlignCenter
dimLevel
-
0
0
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
dB
-127
0
-
0
10
75
true
Dim
true
-
0
10
75
true
Mute
true
volumeKnob
valueChanged(int)
volumeBox
setValue(int)
492
531
488
635
volumeBox
valueChanged(int)
volumeKnob
setValue(int)
551
630
559
539
libffado-2.4.2/support/mixer-qt4/ffado/mixer/dummy.ui 0000644 0001750 0000144 00000003734 11332123467 022131 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
DummyMixerUI
0
0
309
290
Dummy Panel
-
This panel is merely a placeholder for devices that don't have a mixer panel (yet).
Qt::AlignVCenter
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/globalmixer.ui 0000644 0001750 0000144 00000011637 11246546617 023316 0 ustar jwoithe users
Copyright (C) 2008 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.
GlobalMixerUi
0
0
591
79
0
0
Global Mixer Options
-
75
true
TextLabel
-
Clock Source:
false
clocksource
-
1
0
-
Stream Status
Qt::AlignCenter
-
Qt::Horizontal
QSizePolicy::Expanding
330
10
-
Nickname:
false
txtNickname
-
100
0
-
Sample Rate:
false
samplerate
-
true
1
0
-
false
Qt::RightToLeft
Outgoing
-
false
Qt::RightToLeft
Incoming
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/__init__.py 0000644 0001750 0000144 00000000000 11246546617 022541 0 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/mixer/quatafire.ui 0000644 0001750 0000144 00000051074 11246546617 022771 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QuataFireMixerUI
0
0
702
360
0
0
ESI QuataFire610 Mixer
-
Input Mix
-
-
Qt::Vertical
20
40
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
MIC1
Qt::AlignCenter
false
-
-
Qt::Vertical
20
40
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
MIC2
Qt::AlignCenter
false
-
-
-32768
32768
1000
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
-
-32768
32768
1000
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
IN5/6
Qt::AlignCenter
false
-
Channel Volume Control
-
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
0
0
0
32767
10000
1000
Qt::Vertical
10000
-
ALL
Qt::AlignCenter
false
-
CH1
Qt::AlignCenter
false
-
CH2
Qt::AlignCenter
false
-
CH3
Qt::AlignCenter
false
-
CH4
Qt::AlignCenter
false
-
CH5
Qt::AlignCenter
false
-
CH6
Qt::AlignCenter
false
-
CH7
Qt::AlignCenter
false
-
CH8
Qt::AlignCenter
false
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffirele_small.ui 0000644 0001750 0000144 00000067520 11246546617 024143 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireLEMixerSmallUI
0
0
620
425
Focusrite Saffire LE Mixer
-
-
Record Mix
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
IN3/4
Qt::AlignCenter
false
-
SPDIF
Qt::AlignCenter
false
-
0
Out&1
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
REC
Qt::AlignCenter
false
Out&2
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
REC
Qt::AlignCenter
false
Out&3
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
REC
Qt::AlignCenter
false
Out&4
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
REC
Qt::AlignCenter
false
-
Output Level
-
0
127
1
16
Qt::Vertical
32
-
0
127
1
16
Qt::Vertical
32
-
0
127
1
16
Qt::Vertical
32
-
1/2
Qt::AlignCenter
false
-
3/4
Qt::AlignCenter
false
-
5/6
Qt::AlignCenter
false
-
Ignore slider
Qt::AlignCenter
false
-
-
-
-
-
Mute
-
CH5/&6
-
CH3/4
-
CH1/2
-
High Gain
-
Input 3
-
Input 4
-
-
S/PDIF Transp
-
&MIDI Tru
Alt+M
-
Save settings to device
Save
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffirepro_small.ui 0000644 0001750 0000144 00000213120 11246546617 024330 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireProMixerSmallUI
0
0
840
379
Focusrite Saffire Pro (10/26) Mixer
-
-
-
Output Mix
-
4
Out1/&2
-
-
Mute
-
CH2 Direct Mon
-
&Level Dim
Alt+L
-
CH1 Direct Mon
-
Front dial control
-
&Monitor Pad
Alt+M
-
-
Out1
Qt::AlignCenter
false
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixL
Qt::AlignCenter
false
-
-
IMixR
Qt::AlignCenter
false
-
Out2
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
80
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
71
31
Out3/&4
-
-
CH3 Direct Mon
-
Front dial control
-
CH4 Direct Mon
-
Mute
-
Monitor Pad
-
Level Dim
-
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out3
Qt::AlignCenter
false
-
PC3
Qt::AlignCenter
false
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC4
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixR
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC2
Qt::AlignCenter
false
-
Out4
Qt::AlignCenter
false
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
101
21
Out5/&6
-
-
CH6 Direct Mon
-
CH5 Direct Mon
-
Level Dim
-
Front dial control
-
&Monitor Pad
Alt+M
-
Mute
-
-
PC1
Qt::AlignCenter
false
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC5
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out5
Qt::AlignCenter
false
-
-
PC6
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixR
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
Out6
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
61
21
Out7/&8
-
-
CH8 Direct Mon
-
Level Dim
-
Mute
-
&Monitor Pad
Alt+M
-
CH7 Direct Mon
-
Front dial control
-
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC7
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out7
Qt::AlignCenter
false
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
IMixR
Qt::AlignCenter
false
-
Out8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC2
Qt::AlignCenter
false
-
PC8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
81
21
Out9/&10
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixL
Qt::AlignCenter
false
-
Out9
Qt::AlignCenter
false
-
PC9
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out10
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC10
Qt::AlignCenter
false
-
IMixR
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Device Control
-
-
Phantom:
false
-
IN 1-4
-
IN 5-8
-
-
Insert:
false
-
CH1
-
CH2
-
Disable ADAT I/O
-
Enable MIDI
-
-
false
AC&3 Passthrough
Alt+3
-
&MIDI Thru
Alt+M
-
Use high voltage supply
-
Qt::Vertical
QSizePolicy::Expanding
20
21
-
-
&Save Settings
Alt+S
-
Identif&y Device
Alt+Y
-
Re&boot Device
Alt+B
-
Refresh
qPixmapFromMimeSource
btnRefresh
clicked()
SaffireProMixerSmallUI
updateValues()
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire_stereo.ui 0000644 0001750 0000144 00000244655 11246546617 024021 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireMixerStereoUI
0
0
747
397
0
0
Focusrite Saffire Mixer
-
-
0
Out1/2
-
-
0
0
250
0
Channel Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
-
Mute
-
Hardware Level Control
-
Level Dim
-
Qt::Vertical
QSizePolicy::Expanding
20
31
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX
Qt::AlignCenter
false
Out3/4
-
-
0
0
250
0
Channel Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
31
91
-
-
Mute
-
Hardware Level Control
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX
Qt::AlignCenter
false
Out5/6 (Headphones 1)
-
-
0
0
250
0
Channel Control
-
-
Mute
-
Hardware Level Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
20
61
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX
Qt::AlignCenter
false
Out7/8 (Headphones 2)
-
-
250
0
Channel Control
-
-
Mute
-
Hardware Level Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
21
91
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX
Qt::AlignCenter
false
Out9/10
-
-
250
0
Channel Control
-
-
Mute
-
Qt::Vertical
QSizePolicy::Expanding
41
81
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3/4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Reverb Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
Device Control
-
-
S/PDIF input enable
-
Qt::Horizontal
QSizePolicy::Expanding
240
21
-
true
0
0
Save settings to device
Mono Mode
-
true
0
0
Save settings to device
Refresh
-
true
0
0
Save settings to device
Save Settings
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/phase24.ui 0000644 0001750 0000144 00000050146 11246546617 022255 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Phase24ControlUI
0
0
331
390
Terratec Phase 24 Control
-
3/4 Out Level
false
-
Analog In Level
false
-
Sync Source
false
-
-
Line
-
Headphone
-
-
0
-
1
-
2
-
3
-
4
-
-
Internal
-
External
-
Hardware Mixer
-
-
In
Qt::AlignCenter
false
-
-
Analog
false
-
0
25600
10000
1000
Qt::Vertical
10000
-
-
SPDIF
false
-
0
25600
10000
1000
Qt::Vertical
10000
-
-
-
SPDIF
false
-
0
25600
10000
1000
Qt::Vertical
10000
-
-
1/2
false
-
0
25600
10000
1000
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-
3/4
false
-
0
25600
10000
1000
Qt::Vertical
10000
-
Out
false
-
-
Master
false
-
0
80
0
25600
10000
1000
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
Routing
-
-
Wave Out 1/2
-
Wave Out 3/4
-
Line in
-
SPDIF in
-
Mixer
-
Wave Out SPDIF
-
-
Wave Out 1/2
-
Wave Out 3/4
-
Line in
-
SPDIF in
-
Mixer
-
Wave Out SPDIF
-
SPDIF
false
-
3/4
false
-
-
Wave Out 1/2
-
Wave Out 3/4
-
Line in
-
SPDIF in
-
Mixer
-
Wave Out SPDIF
-
1/2
false
qPixmapFromMimeSource
sldInput12
sldInput34
sldLineIn
sldSPDIFOut
sldSPDIFIn
sldMaster
cmbFrontLevel
cmbOutSource12
cmbOutSource34
cmbOutSourceSPDIF
cmbSetSyncSource
sldInput12
valueChanged(int)
Phase24ControlUI
setVolume12(int)
20
20
20
20
sldInput34
valueChanged(int)
Phase24ControlUI
setVolume34(int)
20
20
20
20
sldLineIn
valueChanged(int)
Phase24ControlUI
setVolumeLineIn(int)
20
20
20
20
sldSPDIFOut
valueChanged(int)
Phase24ControlUI
setVolumeSPDIFOut(int)
20
20
20
20
sldSPDIFIn
valueChanged(int)
Phase24ControlUI
setVolumeSPDIFIn(int)
20
20
20
20
sldMaster
valueChanged(int)
Phase24ControlUI
setVolumeMaster(int)
20
20
20
20
cmbFrontLevel
activated(int)
Phase24ControlUI
setFrontLevel(int)
20
20
20
20
cmbSetSyncSource
activated(int)
Phase24ControlUI
setSyncSource(int)
20
20
20
20
cmbOutSourceSPDIF
activated(int)
Phase24ControlUI
setOutSourceSPDIF(int)
20
20
20
20
cmbOutSource12
activated(int)
Phase24ControlUI
setOutSource12(int)
20
20
20
20
cmbOutSource34
activated(int)
Phase24ControlUI
setOutSource34(int)
20
20
20
20
cmbLineLevel
activated(int)
Phase24ControlUI
setLineLevel(int)
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffire_mono.ui 0000644 0001750 0000144 00000316615 11246546617 023464 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireMixerMonoUI
0
0
973
397
0
0
Focusrite Saffire Mixer
-
-
0
Out1/2
-
-
0
0
250
0
Channel Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
-
Mute
-
Hardware Level Control
-
Level Dim
-
Qt::Vertical
QSizePolicy::Expanding
20
31
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX2
Qt::AlignCenter
false
Out3/4
-
-
0
0
250
0
Channel Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
31
91
-
-
Mute
-
Hardware Level Control
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX2
Qt::AlignCenter
false
Out5/6 (Headphones 1)
-
-
0
0
250
0
Channel Control
-
-
Mute
-
Hardware Level Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
20
61
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX2
Qt::AlignCenter
false
Out7/8 (Headphones 2)
-
-
250
0
Channel Control
-
-
Mute
-
Hardware Level Control
-
-
0
127
1
16
Qt::Vertical
32
-
Level
Qt::AlignCenter
false
-
Qt::Vertical
QSizePolicy::Expanding
21
91
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Return
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX2
Qt::AlignCenter
false
Out9/10
-
-
250
0
Channel Control
-
-
Mute
-
Qt::Vertical
QSizePolicy::Expanding
41
81
-
Input Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN3
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN4
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
5/6
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
7/8
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
9/10
Qt::AlignCenter
false
-
Reverb Mix
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX1
Qt::AlignCenter
false
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
FX2
Qt::AlignCenter
false
-
Device Control
-
-
S/PDIF input enable
-
Qt::Horizontal
QSizePolicy::Expanding
70
21
-
true
0
0
Save settings to device
Stereo Mode
-
true
0
0
Save settings to device
Refresh
-
true
0
0
Save settings to device
Save Settings
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/edirolfa101.ui 0000644 0001750 0000144 00000120321 11246546617 023007 0 ustar jwoithe users
Copyright (C) 2005-2008 by Daniel Wagner
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.
EdirolFa101ControlUI
0
0
681
193
Edirol FA-101
-
0
0
Monitor Input Mixer
-
-
1
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
0
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
16
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
2
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
3
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
4
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
5
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
80
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
6
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
7
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
80
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
8
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
9
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
80
-32767
0
10000
1000
-2
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
10
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32768
32512
Qt::Horizontal
true
qPixmapFromMimeSource
sldInput1
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn1(int)
20
20
20
20
sldInput2
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn2(int)
20
20
20
20
sldInput3
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn3(int)
20
20
20
20
sldInput4
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn4(int)
20
20
20
20
sldInput5
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn5(int)
20
20
20
20
sldInput6
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn6(int)
20
20
20
20
sldInput7
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn7(int)
20
20
20
20
sldInput8
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn8(int)
20
20
20
20
sldInput9
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn9(int)
20
20
20
20
sldInput10
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn10(int)
20
20
20
20
sldBal1
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn1(int)
20
20
20
20
sldBal2
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn2(int)
20
20
20
20
sldBal3
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn3(int)
20
20
20
20
sldBal4
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn4(int)
20
20
20
20
sldBal5
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn5(int)
20
20
20
20
sldBal6
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn6(int)
20
20
20
20
sldBal7
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn7(int)
20
20
20
20
sldBal8
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn8(int)
20
20
20
20
sldBal9
sliderMoved(int)
EdirolFa101ControlUI
setBalanceIn9(int)
20
20
20
20
sldBal10
sliderMoved(int)
EdirolFa101ControlUI
setVolumeIn10(int)
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/mixer/bcoaudio5.ui 0000644 0001750 0000144 00000032366 11246546617 022665 0 ustar jwoithe users
Copyright (C) 2005-2008 by Daniel Wagner
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.
BCoAudio5ControlUI
0
0
335
356
BridgeCo Audio 5 Control
-
Output 3/4 Source
false
-
-
Line 3/4
-
Mix
-
SPDIF
-
-
Input
-
3/4
Qt::AlignCenter
false
-
S/PDIF
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
1/2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Output
-
1/2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
3/4
Qt::AlignCenter
false
-
Cross
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
A
Qt::AlignCenter
false
-
B
Qt::AlignCenter
false
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
qPixmapFromMimeSource
sldInput12
sliderMoved(int)
BCoAudio5ControlUI
setVolumeIn12(int)
20
20
20
20
sldInput34
sliderMoved(int)
BCoAudio5ControlUI
setVolumeIn34(int)
20
20
20
20
sldInputSPDIF
sliderMoved(int)
BCoAudio5ControlUI
setVolumeInSPDIF(int)
20
20
20
20
sldOutput12
sliderMoved(int)
BCoAudio5ControlUI
setVolumeOut12(int)
20
20
20
20
sldOutput34
sliderMoved(int)
BCoAudio5ControlUI
setVolumeOut34(int)
20
20
20
20
sldCrossA
sliderMoved(int)
BCoAudio5ControlUI
setCrossA(int)
20
20
20
20
sldCrossB
sliderMoved(int)
BCoAudio5ControlUI
setCrossB(int)
20
20
20
20
comboMixSource
activated(int)
BCoAudio5ControlUI
setComboMixSource(int)
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffirele_large.ui 0000644 0001750 0000144 00000223123 11246546617 024116 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireLEMixerLargeUI
0
0
988
465
Focusrite Saffire LE Mixer
-
-
0
Out&1
-
Input Mix
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
IN1/2
Qt::AlignCenter
false
-
IN3/4
Qt::AlignCenter
false
-
SPDIF
Qt::AlignCenter
false
-
DAW Return Channel Mix
-
4
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
1
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
Out&2
-
Input Mix
-
IN1/2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
SPDIF
Qt::AlignCenter
false
-
IN3/4
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
DAW Return Channel Mix
-
4
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
1
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
Out&3
-
Input Mix
-
IN1/2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
SPDIF
Qt::AlignCenter
false
-
IN3/4
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
DAW Return Channel Mix
-
4
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
1
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
Out&4
-
Input Mix
-
IN1/2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
SPDIF
Qt::AlignCenter
false
-
IN3/4
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
DAW Return Channel Mix
-
4
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
1
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Output Level
-
0
127
1
16
Qt::Vertical
32
-
0
127
1
16
Qt::Vertical
32
-
0
127
1
16
Qt::Vertical
32
-
1/2
Qt::AlignCenter
false
-
3/4
Qt::AlignCenter
false
-
5/6
Qt::AlignCenter
false
-
Ignore slider
Qt::AlignCenter
false
-
-
-
-
-
Mute
-
CH5/&6
-
CH3/4
-
CH1/2
-
High Gain
-
Input 3
-
Input 4
-
-
S/PDIF Transp
-
&MIDI Tru
Alt+M
-
Save settings to device
Save
qPixmapFromMimeSource
libffado-2.4.2/support/mixer-qt4/ffado/mixer/saffirepro_large.ui 0000644 0001750 0000144 00000443011 11246546617 024316 0 ustar jwoithe users
Copyright (C) 2005-2008 by Pieter Palmers
This file is part of FFADO
FFADO = Free Firewire (pro-)audio drivers for linux
FFADO is based upon FreeBoB.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
SaffireProMixerLargeUI
0
0
840
637
Focusrite Saffire Pro (10/26) Mixer
-
-
Input Mix
-
A&nalog
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
3
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
6
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
4
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
10
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
5
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
9
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
&ADAT1
-
0
32767
10000
1000
Qt::Vertical
10000
-
2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
4
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
1
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
ADAT2
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
3
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
7
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
100
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
2
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
6
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
1
Qt::AlignCenter
false
-
5
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
R
Qt::AlignCenter
false
-
R
Qt::AlignCenter
false
-
4
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
8
Qt::AlignCenter
false
-
L
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
Output Mix
-
4
Out1/&2
-
-
Mute
-
CH2 Direct Mon
-
&Level Dim
Alt+L
-
CH1 Direct Mon
-
Front dial control
-
&Monitor Pad
Alt+M
-
-
Out1
Qt::AlignCenter
false
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixL
Qt::AlignCenter
false
-
-
IMixR
Qt::AlignCenter
false
-
Out2
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
80
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
71
31
Out3/&4
-
-
CH3 Direct Mon
-
Front dial control
-
CH4 Direct Mon
-
Mute
-
Monitor Pad
-
Level Dim
-
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out3
Qt::AlignCenter
false
-
PC3
Qt::AlignCenter
false
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC4
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixR
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC2
Qt::AlignCenter
false
-
Out4
Qt::AlignCenter
false
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
101
21
Out5/&6
-
-
CH6 Direct Mon
-
CH5 Direct Mon
-
Level Dim
-
Front dial control
-
&Monitor Pad
Alt+M
-
Mute
-
-
PC1
Qt::AlignCenter
false
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC5
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out5
Qt::AlignCenter
false
-
-
PC6
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixR
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
Out6
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
61
21
Out7/&8
-
-
CH8 Direct Mon
-
Level Dim
-
Mute
-
&Monitor Pad
Alt+M
-
CH7 Direct Mon
-
Front dial control
-
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC7
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out7
Qt::AlignCenter
false
-
IMixL
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
IMixR
Qt::AlignCenter
false
-
Out8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC2
Qt::AlignCenter
false
-
PC8
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Level
Qt::AlignHCenter
-
0
127
1
16
Qt::Vertical
32
-
Qt::Horizontal
QSizePolicy::Expanding
81
21
Out9/&10
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC1
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
IMixL
Qt::AlignCenter
false
-
Out9
Qt::AlignCenter
false
-
PC9
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
-
0
32767
10000
1000
Qt::Vertical
10000
-
Out10
Qt::AlignCenter
false
-
PC2
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
PC10
Qt::AlignCenter
false
-
IMixR
Qt::AlignCenter
false
-
0
32767
10000
1000
Qt::Vertical
10000
-
Device Control
-
-
Phantom:
false
-
IN 1-4
-
IN &5-8
Alt+5
-
-
Insert:
false
-
CH1
-
CH2
-
Disable ADAT I/O
-
Enable MIDI
-
-
false
AC&3 Passthrough
Alt+3
-
&MIDI Thru
Alt+M
-
&Use high voltage supply
Alt+U
-
Qt::Vertical
QSizePolicy::Expanding
20
21
-
-
&Save Settings
Alt+S
-
Identif&y Device
Alt+Y
-
Re&boot Device
Alt+B
-
Refresh
qPixmapFromMimeSource
btnRefresh
clicked()
SaffireProMixerLargeUI
updateValues()
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/mixer/nodevice.ui 0000644 0001750 0000144 00000002172 11246546617 022577 0 ustar jwoithe users
NoDeviceMixerUI
0
0
611
218
Form
-
0
0
300
200
No supported device found. Please attach a supported device.
Qt::AlignCenter
true
libffado-2.4.2/support/mixer-qt4/ffado/mixer/edirolfa66.ui 0000644 0001750 0000144 00000061050 11246546617 022744 0 ustar jwoithe users
Copyright (C) 2005-2008 by Daniel Wagner
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.
EdirolFa66ControlUI
0
0
421
193
Edirol FA-66
-
0
0
Monitor Input Mixer
-
-
1
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
0
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
16
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
2
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
3
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
4
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
5
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
0
80
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
-
Qt::Horizontal
QSizePolicy::Expanding
40
20
-
-
6
Qt::AlignCenter
false
-
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
0
10000
1000
0
Qt::Vertical
10000
-
Qt::Horizontal
QSizePolicy::Expanding
20
20
-
-32767
32512
Qt::Horizontal
true
qPixmapFromMimeSource
sldInput1
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn1(int)
20
20
20
20
sldInput2
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn2(int)
20
20
20
20
sldInput3
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn3(int)
20
20
20
20
sldInput4
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn4(int)
20
20
20
20
sldInput5
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn5(int)
20
20
20
20
sldInput6
sliderMoved(int)
EdirolFa66ControlUI
setVolumeIn6(int)
20
20
20
20
sldBal1
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn1(int)
20
20
20
20
sldBal2
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn2(int)
20
20
20
20
sldBal3
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn3(int)
20
20
20
20
sldBal4
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn4(int)
20
20
20
20
sldBal5
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn5(int)
20
20
20
20
sldBal6
sliderMoved(int)
EdirolFa66ControlUI
setBalanceIn6(int)
20
20
20
20
libffado-2.4.2/support/mixer-qt4/ffado/panelmanager.py 0000644 0001750 0000144 00000055247 13246707102 022325 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
# 2007-2008 by Arnold Krille
# 2013 by Philippe Carriere
#
# 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
from ffado.config import * #FFADO_VERSION, FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH
# from PyQt4.QtGui import QFrame, QWidget, QTabWidget, QVBoxLayout, QMainWindow, QIcon, QAction, qApp, QStyleOptionTabWidgetFrame, QFileDialog
# from PyQt4.QtCore import QTimer, pyqtSignal
from ffado.import_pyqt import *
from ffado.dbus_util import *
from ffado.registration import *
from ffado.configuration import *
from ffado.mixer.globalmixer import GlobalMixer
from ffado.mixer.dummy import Dummy
import sys
import time
import importlib
import logging
log = logging.getLogger('panelmanager')
use_generic = False
try:
from mixer_generic import *
log.info("The generic mixer is found, seems to be a developer using ffadomixer...")
except ImportError:
pass
else:
use_generic = True
# pseudo-guid
GUID_GENERIC_MIXER = 0
FILE_VERSION = '0.1'
class HLine( QFrame ):
def __init__( self, parent ):
QFrame.__init__( self, parent )
self.setFrameShape( QFrame.HLine )
self.setLineWidth( 2 )
self.setMinimumHeight( 10 )
class PanelManagerStatus(QWidget):
def __init__(self, parent):
QWidget.__init__(self,parent)
uicLoad("ffado/panelmanagerstatus", self)
class OwnTabWidget(QTabWidget):
def __init__(self,parent):
QTabWidget.__init__(self,parent)
def tabInserted(self,index):
self.checkTabBar()
def tabRemoved(self,index):
self.checkTabBar()
def checkTabBar(self):
if self.count()<2:
self.tabBar().hide()
else:
self.tabBar().show()
class PanelManager(QWidget):
connectionLost = pyqtSignal(name='connectionLost')
def __init__(self, parent, devmgr=None):
QWidget.__init__(self, parent)
self.setObjectName("PanelManager")
self.parent = parent
# maps a device GUID to a QT panel
self.panels = {}
# a layout for ourselves
self.layout = QVBoxLayout(self)
# the tabs
self.tabs = OwnTabWidget(self)
self.tabs.hide()
self.layout.addWidget(self.tabs)
# a dialog that is shown during update
self.status = PanelManagerStatus(self)
self.layout.addWidget(self.status)
self.status.show()
self.devices = DeviceList( SYSTEM_CONFIG_FILE )
self.devices.updateFromFile( USER_CONFIG_FILE )
if devmgr is not None:
self.setManager(devmgr)
def __del__(self):
print("PanelManager.__del__()")
self.polltimer.stop()
def setManager(self,devmgr):
self.devmgr = devmgr
self.devmgr.registerPreUpdateCallback(self.devlistPreUpdate)
self.devmgr.registerPostUpdateCallback(self.devlistPostUpdate)
self.devmgr.registerUpdateCallback(self.devlistUpdate)
self.devmgr.registerDestroyedCallback(self.devmgrDestroyed)
# create a timer to poll the panels
self.polltimer = QTimer()
self.polltimer.timeout.connect(self.pollPanels)
self.polltimer.start( POLL_SLEEP_TIME_MSEC )
# create a timer to initialize the panel after the main form is shown
# since initialization can take a while
QTimer.singleShot( POLL_SLEEP_TIME_MSEC, self.updatePanels )
# live check timer
self.alivetimer = QTimer()
self.alivetimer.timeout.connect(self.commCheck)
self.alivetimer.start( 2000 )
def count(self):
return self.tabs.count()
def pollPanels(self):
#log.debug("PanelManager::pollPanels()")
# only when not modifying the tabs
try:
if self.tabs.isEnabled():
for guid in self.panels.keys():
w = self.panels[guid]
for child in w.children():
#log.debug("poll child %s,%s" % (guid,child))
if 'polledUpdate' in dir(child):
child.polledUpdate()
except:
log.error("error in pollPanels")
self.commCheck()
def devlistPreUpdate(self):
log.debug("devlistPreUpdate")
self.tabs.setEnabled(False)
self.tabs.hide()
self.status.lblMessage.setText("Bus reconfiguration in progress, please wait...")
self.status.show()
#self.statusBar().showMessage("bus reconfiguration in progress...", 5000)
def devlistPostUpdate(self):
log.debug("devlistPostUpdate")
# this can fail if multiple busresets happen in fast succession
ntries = 10
while ntries > 0:
try:
self.updatePanels()
return
except:
log.debug("devlistPostUpdate failed (%d)" % ntries)
for guid in self.panels.keys():
w = self.panels[guid]
del self.panels[guid] # remove from the list
idx = self.tabs.indexOf(w)
self.tabs.removeTab(idx)
del w # GC might also take care of that
ntries = ntries - 1
time.sleep(2) # sleep a few seconds
log.debug("devlistPostUpdate failed completely")
self.tabs.setEnabled(False)
self.tabs.hide()
self.status.lblMessage.setText("Error while reconfiguring. Please restart ffadomixer.")
self.status.show()
def devlistUpdate(self):
log.debug("devlistUpdate")
def devmgrDestroyed(self):
log.debug("devmgrDestroyed")
self.alivetimer.stop()
self.tabs.setEnabled(False)
self.tabs.hide()
self.status.lblMessage.setText("DBUS server was shut down, please restart it and restart ffadomixer...")
self.status.show()
def commCheck(self):
try:
nbDevices = self.devmgr.getNbDevices()
except:
log.error("The communication with ffado-dbus-server was lost.")
self.tabs.setEnabled(False)
self.polltimer.stop()
self.alivetimer.stop()
keys = self.panels.keys()
for panel in keys:
w = self.panels[panel]
del self.panels[panel]
w.deleteLater()
self.connectionLost.emit()
def removePanel(self, guid):
print( "Removing widget for device" + guid )
w = self.panels[guid]
del self.panels[guid] # remove from the list
idx = self.tabs.indexOf(w)
self.tabs.removeTab(idx)
w.deleteLater()
self.parent.editmenu.removeAction(self.parent.devices[guid])
self.parent.devices.pop(guid, None)
def addPanel(self, idx):
path = self.devmgr.getDeviceName(idx)
log.debug("Adding device %d: %s" % (idx, path))
if ffado.config.bypassdbus:
cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, path)
else:
cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+'/DeviceManager/'+path)
vendorId = cfgrom.getVendorId()
modelId = cfgrom.getModelId()
unitVersion = cfgrom.getUnitVersion()
guid = cfgrom.getGUID()
vendorName = cfgrom.getVendorName()
modelName = cfgrom.getModelName()
log.debug(" Found (%s, %X, %X) %s %s" % (str(guid), vendorId, modelId, vendorName, modelName))
# check whether this has already been registered at ffado.org
if not ffado.config.bypassdbus:
reg = ffado_registration(FFADO_VERSION, int(guid, 16),
vendorId, modelId,
vendorName, modelName)
reg.check_for_registration()
# The MOTU devices use unitVersion to differentiate models. For
# the moment though we don't need to know precisely which model
# we're using beyond it being a pre-mark3 (modelId=0) or mark3
# (modelId=1) device.
if vendorId == 0x1f2:
# All MOTU devices with a unit version of 0x15 or greater are
# mark3 devices
if (unitVersion >= 0x15):
modelId = 0x00000001
else:
modelId = 0x00000000
# The RME devices use unitVersion to differentiate models.
# Therefore in the configuration file we use the config file's
# modelid field to store the unit version. As a result we must
# override the modelId with the unit version here so the correct
# configuration file entry (and hense mixer widget) is identified.
if vendorId == 0xa35:
modelId = unitVersion;
dev = self.devices.getDeviceById( vendorId, modelId )
w = QWidget( )
l = QVBoxLayout( w )
# create a control object
hw = ControlInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+'/DeviceManager/'+path)
clockselect = ClockSelectInterface( FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+"/DeviceManager/"+path )
samplerateselect = SamplerateSelectInterface( FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+"/DeviceManager/"+path )
streamingstatus = StreamingStatusInterface( FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+"/DeviceManager/"+path )
nickname = TextInterface( FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+"/DeviceManager/"+path+"/Generic/Nickname" )
#
# Generic elements for all mixers follow here:
#
globalmixer = GlobalMixer( w )
globalmixer.configrom = cfgrom
globalmixer.clockselect = clockselect
globalmixer.samplerateselect = samplerateselect
globalmixer.streamingstatus = streamingstatus
globalmixer.nickname = nickname
globalmixer.hw = hw
globalmixer.initValues()
l.addWidget( globalmixer, 1 )
#
# Line to separate
#
l.addWidget( HLine( w ) )
#
# Specific (or dummy) mixer widgets get loaded in the following
#
found = False
if 'mixer' in dev and dev['mixer'] != None:
mixerapp = dev['mixer']
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 )
mixerapp = modelName+" (Dummy)"
#
# The same for all mixers
#
l.addWidget( mixerwidget, 10 )
mixerwidget.configrom = cfgrom
mixerwidget.clockselect = clockselect
mixerwidget.samplerateselect = samplerateselect
mixerwidget.streamingstatus = streamingstatus
mixerwidget.nickname = nickname
mixerwidget.hw = hw
if 'buildMixer' in dir(mixerwidget):
mixerwidget.buildMixer()
if 'initValues' in dir(mixerwidget):
mixerwidget.initValues()
if 'getDisplayTitle' in dir(mixerwidget):
title = mixerwidget.getDisplayTitle()
else:
title = mixerapp
mixer_icon = UIDIR + '/ffado/mixer/' + vendorName.replace(" ", "_").lower() + '.png'
if os.path.exists(mixer_icon) :
globalmixer.lblName.setPixmap(QPixmap(mixer_icon))
globalmixer.lblName.setToolTip(title)
globalmixer.lblName.show()
else :
globalmixer.setName(title)
self.tabs.addTab( w, title )
self.panels[guid] = w
if 'onSamplerateChange' in dir(mixerwidget):
log.debug("Updating Mixer on samplerate change required")
globalmixer.onSamplerateChange = mixerwidget.onSamplerateChange
w.gmixSaveSetgs = globalmixer.saveSettings
w.gmixReadSetgs = globalmixer.readSettings
if 'saveSettings' in dir(mixerwidget):
w.smixSaveSetgs = mixerwidget.saveSettings
self.parent.saveaction.setEnabled(True)
if 'readSettings' in dir(mixerwidget):
w.smixReadSetgs = mixerwidget.readSettings
self.parent.openaction.setEnabled(True)
self.parent.devices[guid] = QAction(QIcon.fromTheme("audio-card"), str(title), self.parent)
# Ensure a standard type is passed to setDate() so a UserType is not
# adopted by the QVariant which underpins the QAction data. "guid"
# is a dbus.String object; it will be stored as a UserType if passed
# directly, which makes it difficult to extract in setTabVisible().
self.parent.devices[guid].setData(str(guid))
self.parent.editmenu.addAction(self.parent.devices[guid])
self.parent.devices[guid].triggered.connect(self.setTabVisible)
def setTabVisible(self) :
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() if ffado_pyqt_version == 4 else action.data())
self.tabs.setCurrentIndex(self.tabs.indexOf(self.panels[panel_key]))
def displayPanels(self):
# if there is no panel, add the no-device message
# else make sure it is not present
if self.count() == 0:
self.tabs.hide()
self.tabs.setEnabled(False)
self.status.lblMessage.setText("No supported device found.")
self.status.show()
#self.statusBar().showMessage("No supported device found.", 5000)
else:
# Hide the status widget before showing the panel tab to prevent
# the panel manager's vertical size including that of the status
# widget. For some reason, hiding the status after showing the
# tabs does not cause a recalculation of the panel manager's size,
# and the window ends up being larger than it needs to be.
self.status.hide()
self.tabs.show()
self.tabs.setEnabled(True)
#self.statusBar().showMessage("Configured the mixer for %i devices." % self.tabs.count())
if use_generic:
#
# Show the generic (development) mixer if it is available
#
w = GenericMixer( devmgr.bus, FFADO_DBUS_SERVER, mw )
self.tabs.addTab( w, "Generic Mixer" )
self.panels[GUID_GENERIC_MIXER] = w
def updatePanels(self):
log.debug("PanelManager::updatePanels()")
nbDevices = self.devmgr.getNbDevices()
#self.statusBar().showMessage("Reconfiguring the mixer panels...")
# list of panels present
guids_with_tabs = self.panels.keys()
# build list of guids on the bus now
guids_present = []
guid_indexes = {}
for idx in range(nbDevices):
path = self.devmgr.getDeviceName(idx)
if ffado.config.bypassdbus:
cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, path)
else:
cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+'/DeviceManager/'+path)
guid = cfgrom.getGUID()
guids_present.append(guid)
guid_indexes[guid] = idx
# figure out what to remove
# the special panel (generic)
# that has (pseudo-)GUID 0
# is also automatically removed
to_remove = []
for guid in guids_with_tabs:
if not guid in guids_present:
to_remove.append(guid)
log.debug("going to remove %s" % str(guid))
else:
log.debug("going to keep %s" % str(guid))
# figure out what to add
to_add = []
for guid in guids_present:
if not guid in guids_with_tabs:
to_add.append(guid)
log.debug("going to add %s" % str(guid))
# update the widget
for guid in to_remove:
self.removePanel(guid)
for guid in to_add:
# retrieve the device manager index
idx = guid_indexes[guid]
self.addPanel(idx)
self.displayPanels()
def refreshPanels(self):
log.debug("PanelManager::refreshPanels()")
nbDevices = self.devmgr.getNbDevices()
#self.statusBar().showMessage("Reconfiguring the mixer panels...")
# list of panels present
guids_with_tabs = self.panels.keys()
# build list of guids on the bus now
guid_indexes = {}
for idx in range(nbDevices):
path = self.devmgr.getDeviceName(idx)
cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+'/DeviceManager/'+path)
guid = cfgrom.getGUID()
guid_indexes[guid] = idx
# remove/create the widget
for guid in guids_with_tabs:
self.removePanel(guid)
idx = guid_indexes[guid]
self.addPanel(idx)
self.displayPanels()
def saveSettings(self):
saveString = []
saveString.append('\n')
saveString.append('\n')
saveString.append(' \n')
saveString.append(' ' + str(FILE_VERSION).split('.')[0] + '\n')
saveString.append(' \n')
saveString.append(' \n')
saveString.append(' ' + str(FILE_VERSION).split('.')[1] + '\n')
saveString.append(' \n')
saveString.append('\n')
saveString.append('\n')
saveString.append(' \n')
saveString.append(' ' + str(str(FFADO_VERSION).split('-')[0]).split('.')[0] + '\n')
saveString.append(' \n')
saveString.append(' \n')
saveString.append(' ' + str(str(FFADO_VERSION).split('-')[0]).split('.')[1] + '\n')
saveString.append(' \n')
saveString.append('\n')
for guid in self.panels.keys():
saveString.append('\n')
saveString.append(' \n')
saveString.append(' ' + str(guid) + '\n')
saveString.append(' \n')
w = self.panels[guid]
indent = " "
saveString.extend(w.gmixSaveSetgs(indent))
if 'smixSaveSetgs' in dir(w):
saveString.extend(w.smixSaveSetgs(indent))
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:
print( "Unable to open save file" )
return
for s in saveString:
f.write(s)
f.close()
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:
print( "Unable to open file" )
return
log.debug("Opening file %s" % readfilename)
# discard useless whitespace characters
readString = []
for line in f:
readString.append(" ".join(str(line).split()))
f.close()
# Check it is a compatible "FFADO" file
# It must start with the ')
except Exception:
print( "Data file should contain the version tag" )
return
if readString[idx+1].find("") == -1:
print( "Incompatible versioning of the file" )
if readString[idx+3].find("") == -1:
print( "Not a valid xml file" )
if readString[idx+4].find("") == -1:
print( "Incompatible versioning of the file" )
if readString[idx+6].find("") == -1:
print( "Not a valid xml file" )
version_major = readString[idx+2]
version = version_major + '.' + readString[idx+5]
log.debug("File version: %s" % version)
# File version newer than present
if int(version_major) > int(str(FILE_VERSION).split('.')[0]):
print( "File version is too recent: you should upgrade your FFADO installation" )
return
# FIXME At a time it will be necessary to detect if an older major version is detected
#
# It looks like useless to check for the FFADO version
# Add something here if you would like so
#
# Now search for devices
nd = readString.count('');
n = readString.count('');
if n != nd:
print( "Not a regular xml file: opening device tag must match closing ones" )
return
while nd > 0:
idxb = readString.index('')
idxe = readString.index('')
if idxe < idxb+1:
print( "Not a regular xml file: data must be enclosed between a and tag" )
return
stringDev = []
for s in readString[idxb:idxe]:
stringDev.append(s)
# determine the device guid
try:
idx = stringDev.index('')
except Exception:
print( "Device guid not found" )
return
guid = stringDev[idx+1]
log.debug("Device %s found" % guid)
if guid in self.panels:
w = self.panels[guid]
w.gmixReadSetgs(stringDev)
if 'smixReadSetgs' in dir(w):
w.smixReadSetgs(stringDev)
log.debug("Settings changed for device %s" % guid)
else:
log.debug("Device %s not present; settings ignored" % guid)
del stringDev[:]
del readString[idxb:idxe]
nd -= 1
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/widgets/ 0000755 0001750 0000144 00000000000 13541343162 020752 5 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/widgets/crossbarrouter.py 0000644 0001750 0000144 00000023414 13246707102 024407 0 ustar jwoithe users #
# Copyright (C) 2009 by Arnold Krille
# 2013 by Philippe Carriere
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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 .
#
# from PyQt4 import QtGui, QtCore
# from PyQt4.QtCore import pyqtSignal
# from PyQt4.QtGui import QFrame, QPainter, QGridLayout, QLabel, QComboBox
# from PyQt4.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QPushButton
from ffado.import_pyqt import *
import dbus, math
import ffado.config
import logging
log = logging.getLogger("crossbarrouter")
class VuMeter(QFrame):
def __init__(self, interface, output, input=None, parent=None):
QFrame.__init__(self, parent)
self.setLineWidth(1)
self.setFrameStyle(QFrame.Panel|QFrame.Sunken)
self.setMinimumSize(20, 20)
self.level = 0
self.interface = interface
self.output = output
def updateLevel(self, value):
self.level = value
self.update()
def paintEvent(self, event):
p = QPainter(self)
value = self.level/4096
r = self.rect()
r.setHeight(r.height() * math.sqrt(value))
r.moveBottom(self.rect().height())
p.fillRect(r, self.palette().highlight())
class OutputSwitcher(QFrame):
"""
The name is a bit misleading. This widget selectes sources for a specified
destination.
In mixer-usage this widget is at the top of the input-channel. Because the input
of the mixer is an available output from the routers point.
"""
MixerRoutingChanged = pyqtSignal()
def __init__(self, interface, outname, parent):
QFrame.__init__(self, parent)
self.interface = interface
self.outname = outname
self.lastin = ""
self.setLineWidth(1)
self.setFrameStyle(QFrame.Sunken|QFrame.Panel)
self.layout = QGridLayout(self)
self.setLayout(self.layout)
self.lbl = QLabel(self.outname, self)
self.lbl.setToolTip("The name of the destination that is to be controlled here.")
self.layout.addWidget(self.lbl, 0, 0)
self.vu = VuMeter(self.interface, outname, parent=self)
self.layout.addWidget(self.vu, 0, 1)
sources = self.interface.getSourceNames()
self.combo = QComboBox(self)
self.combo.setToolTip("Select the source for this destination.
Each destination can only receive sound from one source at a time. But one source can send sound to multiple destinations.")
self.layout.addWidget(self.combo, 1, 0, 1, 2)
self.combo.addItem("Disconnected")
self.combo.addItems(sources)
src = self.interface.getSourceForDestination(self.outname)
self.lastin = str(src)
if src != "":
self.combo.setCurrentIndex(self.combo.findText(src))
else:
self.combo.setCurrentIndex(0)
self.combo.activated[str].connect(self.comboCurrentChanged)
def peakValue(self, value):
self.vu.updateLevel(value)
pass
def comboCurrentChanged(self, inname):
#log.debug("comboCurrentChanged( %s )" % inname)
if inname == self.lastin:
return
if self.lastin != "":
self.interface.setConnectionState(self.lastin, self.outname, False)
if inname != "Disconnected":
if self.interface.setConnectionState(str(inname), self.outname, True):
if self.outname[:5] == "Mixer" or self.lastin[:5] == "Mixer" or str(inname)[:5] == "Mixer":
self.MixerRoutingChanged.emit()
self.lastin = str(inname)
else:
log.warning(" Failed to connect %s to %s" % (inname, self.outname))
else:
self.lastin = ""
class CrossbarRouter(QWidget):
MixerRoutingChanged = pyqtSignal(name='MixerRoutingChanged')
def __init__(self, servername, basepath, parent=None):
QWidget.__init__(self, parent);
if not ffado.config.bypassdbus:
self.bus = dbus.SessionBus()
self.dev = self.bus.get_object(servername, basepath)
self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.CrossbarRouter")
self.destinations = self.interface.getDestinationNames()
else:
self.destinations = []
self.settings = QtCore.QSettings(self)
self.outgroups = []
for ch in self.destinations:
tmp = str(ch).split(":")[0]
if not tmp in self.outgroups:
self.outgroups.append(tmp)
self.biglayout = QVBoxLayout(self)
self.setLayout(self.biglayout)
self.toplayout = QHBoxLayout()
self.biglayout.addLayout(self.toplayout)
self.vubtn = QPushButton("Switch peak meters", self)
self.vubtn.setCheckable(True)
self.vubtn.toggled.connect(self.runVu)
self.toplayout.addWidget(self.vubtn)
self.layout = QGridLayout()
self.biglayout.addLayout(self.layout)
self.switchers = {}
for out in self.destinations:
btn = OutputSwitcher(self.interface, out, self)
self.layout.addWidget(btn, int(out.split(":")[-1]) + 1, self.outgroups.index(out.split(":")[0]))
self.switchers[out] = btn
self.switchers[out].MixerRoutingChanged.connect(self.updateMixerRouting)
self.timer = QtCore.QTimer(self)
self.timer.setInterval(200)
self.timer.timeout.connect(self.updateLevels)
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__()" )
self.settings.setValue("crossbarrouter/runvu", self.vubtn.isChecked())
def runVu(self, run=True):
#log.debug("CrossbarRouter.runVu( %i )" % run)
if run:
self.timer.start()
else:
self.timer.stop()
for sw in self.switchers:
self.switchers[sw].peakValue(0)
def updateLevels(self):
#log.debug("CrossbarRouter.updateLevels()")
if ffado.config.bypassdbus:
return
peakvalues = self.interface.getPeakValues()
#log.debug("Got %i peaks" % len(peakvalues))
for peak in peakvalues:
#log.debug("peak = [%s,%s]" % (str(peak[0]),str(peak[1])))
if peak[1] >= 0:
self.switchers[peak[0]].peakValue(peak[1])
def updateMixerRouting(self):
self.MixerRoutingChanged.emit()
def saveSettings(self, indent):
routerSaveString = []
routerSaveString.append('%s\n' % indent)
routerSaveString.append('%s %d\n' % (indent, len(self.destinations)))
routerSaveString.append('%s\n' % indent)
routerSaveString.append('%s\n' % indent)
routerSaveString.append('%s 2\n' % indent)
routerSaveString.append('%s\n' % indent)
routerSaveString.append('%s\n' % indent)
for out in self.destinations:
routerSaveString.append('%s ' % indent + out + ' ')
routerSaveString.append(self.interface.getSourceForDestination(out) + '\n')
routerSaveString.append('%s\n' % indent)
return routerSaveString
def readSettings(self, routerReadString):
sources = str(self.interface.getSourceNames())
if routerReadString[0].find('') == -1:
log.debug("Number of router destinations must be specified\n")
return False
if routerReadString[2].find('') == -1:
log.debug("Incompatible xml file\n")
return False
n_dest = int(routerReadString[1])
if n_dest != len(self.destinations):
log.debug("Caution: numbers of destinations mismatch")
if routerReadString[3].find('') == -1:
log.debug("Number of sources per destinations must be specified\n")
return False
if routerReadString[5].find('') == -1:
log.debug("Incompatible xml file\n")
return False
n_spd = int(routerReadString[4])
if n_spd != 2:
log.debug("Unable to handle more than one source for each destination;")
try:
idxb = routerReadString.index('')
idxe = routerReadString.index('')
except Exception:
log.debug("Router connections not specified\n")
idxb = -1
idxe = -1
return False
if idxb >= 0:
if idxe > idxb + 1:
for s in routerReadString[idxb+1:idxe]:
destination = s.split()[0]
if str(self.destinations).find(destination) != -1:
source = s.split()[1]
if sources.find(source) != -1:
idx = self.switchers[destination].combo.findText(source)
self.switchers[destination].combo.setCurrentIndex(idx)
self.switchers[destination].comboCurrentChanged(source)
return True
#
# vim: sw=4 ts=4 et
libffado-2.4.2/support/mixer-qt4/ffado/widgets/matrixmixer.py 0000644 0001750 0000144 00000166647 13246707102 023721 0 ustar jwoithe users # coding=utf8
#
# Copyright (C) 2009 by Arnold Krille
# 2013 by Philippe Carriere
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# 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 .
#
# from PyQt4 import QtGui, QtCore, Qt
# from PyQt4.QtCore import pyqtSignal
# from PyQt4.QtGui import QColor, QAbstractSlider, QDoubleSpinBox, QWidgetAction
# from PyQt4.QtGui import QAction, QPainter, QWidget, QGridLayout, QLabel
# from PyQt4.QtGui import QLayout, QSlider, QLineEdit, QPalette
# from PyQt4.QtGui import QVBoxLayout, QHBoxLayout, QTabWidget, QToolBar
# from PyQt4.QtGui import QComboBox, QScrollArea, QPushButton, QSizePolicy
from ffado.import_pyqt import *
import dbus, math, decimal
import ffado.config
import logging
log = logging.getLogger("matrixmixer")
def toDBvalue(value):
n = int(value)
c2p14 = 16384.0
if n > 164:
return round(20.0*math.log10(float(n)/c2p14), 2)
else:
return -40.0
def fromDBvalue(value):
v = float(value)
c2p14 = 16384.0
if (v > -40):
return int(round(math.pow(10.0, (value/20.0))*c2p14, 0))
else:
return 0
# v, vl, vr in linear scale
# b range in [-1:1]
def getVolumeLeft(v, b):
return int(round(0.5*v*(1.0-b),0))
def getVolumeRight(v, b):
return v-int(round(0.5*v*(1.0-b),0))
def getStereoVolume(vl, vr):
return int(round(vl+vr,0))
def getStereoBalance(vl, vr):
if ((vl+vr) == 0):
return 0
else:
return round(float(vr-vl)/float(vr+vl),2)
class ColorForNumber:
def __init__(self):
self.colors = dict()
def addColor(self, n, color):
self.colors[n] = color
def getColor(self, n):
#print( "ColorForNumber.getColor( %g )" % (n) )
keys = sorted(self.colors.keys())
low = keys[-1]
high = keys[-1]
for i in range(len(keys)-1):
if keys[i] <= n and keys[i+1] > n:
low = keys[i]
high = keys[i+1]
#print( "%g is between %g and %g" % (n, low, high) )
f = 0
if high != low:
f = (n-low) / (high-low)
lc = self.colors[low]
hc = self.colors[high]
return QColor(
(1-f)*lc.red() + f*hc.red(),
(1-f)*lc.green() + f*hc.green(),
(1-f)*lc.blue() + f*hc.blue() )
class BckgrdColorForNumber(ColorForNumber):
def __init__(self):
ColorForNumber.__init__(self)
self.addColor( 0.0, QColor( 0, 0, 0))
self.addColor( 1.0, QColor( 0, 0, 128))
self.addColor( math.pow(2,6), QColor( 0, 255, 0))
self.addColor( math.pow(2,14), QColor(255, 255, 0))
self.addColor(math.pow(2,16)-1, QColor(255, 0, 0))
def getFrgdColor(self, color):
if color.valueF() < 0.6:
return QColor(255, 255, 255)
else:
return QColor(0, 0, 0)
class MixerNode(QAbstractSlider):
nodeValueChanged = pyqtSignal(tuple)
def __init__(self, input, output, value, max, muted, inverted, parent, matrix_obj):
QAbstractSlider.__init__(self, parent)
#log.debug("MixerNode.__init__( %i, %i, %i, %i, %s )" % (input, output, value, max, str(parent)) )
# Store a direct link back to the underlying matrix object so the mute
# and invert interfaces can be easily found. By the time the matrix
# has been set into the full widget hierarchy, its parent is unlikely
# to still be the top-level matrix object.
self.matrix_obj = matrix_obj;
self.pos = QtCore.QPointF(0, 0)
self.input = input
self.output = output
self.setOrientation(Qt.Vertical)
if max == -1:
max = pow(2, 16)-1
self.setRange(0, max)
self.setValue(value)
self.valueChanged.connect(self.internalValueChanged)
self.setSmall(False)
self.bgcolors = BckgrdColorForNumber()
self.setContextMenuPolicy(Qt.ActionsContextMenu)
self.mapper = QtCore.QSignalMapper(self)
self.mapper.mapped['QString'].connect(self.directValues)
self.spinbox = QDoubleSpinBox(self)
self.spinbox.setRange(-40, 12)
self.spinbox.setSuffix(" dB")
if value != 0:
self.spinbox.setValue(toDBvalue(value))
self.spinbox.valueChanged.connect(self.directValues)
action = QWidgetAction(self)
action.setDefaultWidget(self.spinbox)
self.addAction(action)
for text in ["3 dB", "0 dB", "-3 dB", "-20 dB", "-inf dB"]:
action = QAction(text, self)
action.triggered.connect(self.mapper.map)
self.mapper.setMapping(action, text)
self.addAction(action)
# Only show the mute menu item if a value has been supplied
self.mute_action = None
if (muted != None):
action = QAction(text, self)
action.setSeparator(True)
self.addAction(action)
self.mute_action = QAction("Mute", self)
self.mute_action.setCheckable(True)
self.mute_action.setChecked(muted)
self.mute_action.triggered.connect(self.mapper.map)
self.mapper.setMapping(self.mute_action, "Mute")
self.addAction(self.mute_action)
# Similarly, only show a phase inversion menu item if in use
self.inv_action = None
if (inverted != None):
if (muted == None):
action = QAction(text, self)
action.setSeparator(True)
self.addAction(action)
self.inv_action = QAction("Invert", self)
self.inv_action.setCheckable(True)
self.inv_action.setChecked(inverted)
self.inv_action.triggered.connect(self.mapper.map)
self.mapper.setMapping(self.inv_action, "Invert")
self.addAction(self.inv_action)
def directValues(self,text):
#log.debug("MixerNode.directValues( '%s' )" % text)
if text == "Mute":
#log.debug("Mute %d" % self.mute_action.isChecked())
self.update()
self.matrix_obj.mutes_interface.setValue(self.output, self.input, self.mute_action.isChecked())
elif text == "Invert":
#log.debug("Invert %d" % self.inv_action.isChecked())
self.update()
self.matrix_obj.inverts_interface.setValue(self.output, self.input, self.inv_action.isChecked())
else:
text = str(text).split(" ")[0].replace(",",".")
n = fromDBvalue(float(text))
#log.debug(" linear value: %g" % n)
self.setValue(n)
def mousePressEvent(self, ev):
if ev.buttons() & Qt.LeftButton:
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))
def mouseMoveEvent(self, ev):
if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0):
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) )
ev.accept()
def mouseReleaseEvent(self, ev):
if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0):
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) )
self.pos = QtCore.QPointF(0, 0)
del self.tmpvalue
ev.accept()
# Wheel event is mainly for scrolling inside the mixer window
# Additionnaly press Control key for wheel controling the values
def wheelEvent (self, ev):
if (ev.modifiers() & Qt.ControlModifier):
tmpvalue = self.value()
change = ev.delta()/8
self.setValue( tmpvalue + math.copysign(pow(abs(change), 2), change) )
ev.accept()
else:
ev.ignore()
def paintEvent(self, ev):
p = QPainter(self)
rect = self.rect()
v = self.value()
if (self.mute_action!=None and self.mute_action.isChecked()):
color = QColor(64, 64, 64)
else:
color = self.bgcolors.getColor(v)
p.fillRect(rect, color)
if self.small:
return
p.setPen(self.bgcolors.getFrgdColor(color))
lv=decimal.Decimal('-Infinity')
if v != 0:
lv = toDBvalue(v)
#log.debug("new value is %g dB" % lv)
text = "%.2g dB" % lv
if v == 0:
symb_inf = u"\u221E"
text = "-" + symb_inf + " dB"
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, QString.fromUtf8(text))
if (self.inv_action!=None and self.inv_action.isChecked()):
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, QString.fromUtf8(" ϕ"))
def internalValueChanged(self, value):
#log.debug("MixerNode.internalValueChanged( %i )" % value)
if value != 0:
dB = toDBvalue(value)
if self.spinbox.value() is not dB:
self.spinbox.setValue(dB)
self.nodeValueChanged.emit((self.input, self.output, value))
self.update()
def setSmall(self, small):
self.small = small
if small:
self.setMinimumSize(10, 10)
else:
fontmetrics = self.fontMetrics()
self.setMinimumSize(fontmetrics.boundingRect("-0.0 dB").size()*1.1)
self.update()
class MixerChannel(QWidget):
hide = pyqtSignal(int, bool, name='hide')
def __init__(self, number, parent=None, name="", smallFont=False):
QWidget.__init__(self, parent)
layout = QGridLayout(self)
self.number = number
self.name = name
self.lbl = QLabel(self)
self.lbl.setAlignment(Qt.AlignCenter)
if (smallFont):
font = self.lbl.font()
font.setPointSize(font.pointSize()/1.5)
self.lbl.setFont(font)
layout.addWidget(self.lbl, 0, 0, 1, 2)
self.hideChannel(False)
self.setContextMenuPolicy(Qt.ActionsContextMenu)
action = QAction("Make this channel small", self)
action.setCheckable(True)
action.triggered.connect(self.hideChannel)
self.addAction(action)
def hideChannel(self, hide):
if hide:
self.lbl.setText("%i" % (self.number+1));
else:
self.lbl.setText(self.name)
self.hide.emit(self.number, hide)
self.update()
# Matrix view widget
class MatrixControlView(QWidget):
valueChanged = pyqtSignal([tuple])
def __init__(self, servername, basepath, parent=None, sliderMaxValue=-1, mutespath=None, invertspath=None, smallFont=False, shortname=False, shortcolname="Ch", shortrowname="Ch", transpose=False):
QWidget.__init__(self, parent)
if not ffado.config.bypassdbus:
self.bus = dbus.SessionBus()
self.dev = self.bus.get_object(servername, basepath)
self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
self.transpose = transpose
if (transpose):
self.shortcolname = shortrowname
self.shortrowname = shortcolname
if ffado.config.bypassdbus:
self.cols = 2
self.rows = 2
else:
self.cols = self.interface.getRowCount()
self.rows = self.interface.getColCount()
else:
self.shortcolname = shortcolname
self.shortrowname = shortrowname
if ffado.config.bypassdbus:
self.cols = 2
self.rows = 2
else:
self.cols = self.interface.getColCount()
self.rows = self.interface.getRowCount()
log.debug("Mixer has %i rows and %i columns" % (self.rows, self.cols))
self.mutes_dev = None
self.mutes_interface = None
if not ffado.config.bypassdbus and (mutespath != None):
self.mutes_dev = self.bus.get_object(servername, mutespath)
self.mutes_interface = dbus.Interface(self.mutes_dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
self.inverts_dev = None
self.inverts_interface = None
if not ffado.config.bypassdbus and (invertspath != None):
self.inverts_dev = self.bus.get_object(servername, invertspath)
self.inverts_interface = dbus.Interface(self.inverts_dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
layout = QGridLayout(self)
layout.setSizeConstraint(QLayout.SetNoConstraint);
self.setLayout(layout)
self.rowHeaders = []
self.columnHeaders = []
self.items = []
self.shortname = shortname
# Add row/column headers, but only if there's more than one
# row/column
if (self.cols > 1):
for i in range(self.cols):
ch = MixerChannel(i, self, self.getColName(i, self.shortname), smallFont)
ch.hide.connect(self.hideColumn)
layout.addWidget(ch, 0, i+1)
self.columnHeaders.append( ch )
layout.setRowStretch(0, 0)
layout.setRowStretch(1, 10)
if (self.rows > 1):
for i in range(self.rows):
ch = MixerChannel(i, self, self.getRowName(i, self.shortname), smallFont)
ch.hide.connect(self.hideRow)
layout.addWidget(ch, i+1, 0)
self.rowHeaders.append( ch )
# Add node-widgets
for i in range(self.rows):
self.items.append([])
for j in range(self.cols):
if (transpose):
mute_value = None
if (self.mutes_interface != None):
mute_value = self.mutes_interface.getValue(j,i)
inv_value = None
if (self.inverts_interface != None):
inv_value = self.inverts_interface.getValue(j,i)
if ffado.config.bypassdbus:
val = 0
else:
val = self.interface.getValue(j,i)
node = MixerNode(i, j, val, sliderMaxValue, mute_value, inv_value, self, self)
else:
mute_value = None
if (self.mutes_interface != None):
mute_value = self.mutes_interface.getValue(i,j)
inv_value = None
if (self.inverts_interface != None):
inv_value = self.inverts_interface.getValue(i,j)
if ffado.config.bypassdbus:
val = 0
else:
val = self.interface.getValue(i,j)
node = MixerNode(j, i, val, sliderMaxValue, mute_value, inv_value, self, self)
if (smallFont):
font = node.font()
font.setPointSize(font.pointSize()/1.5)
node.setFont(font)
self.nodeConnect(node)
layout.addWidget(node, i+1, j+1)
self.items[i].append(node)
self.hiddenRows = []
self.hiddenCols = []
def nodeConnect(self, node):
node.nodeValueChanged.connect(self.valueChangedFn)
def nodeDisconnect(self, node):
node.nodeValueChanged.disconnect(self.valueChangedFn)
def checkVisibilities(self):
for x in range(len(self.items)):
for y in range(len(self.items[x])):
self.items[x][y].setSmall(
(x in self.hiddenRows)
| (y in self.hiddenCols)
)
def hideColumn(self, column, hide):
if hide:
self.hiddenCols.append(column)
else:
self.hiddenCols.remove(column)
self.checkVisibilities()
def hideRow(self, row, hide):
if hide:
self.hiddenRows.append(row)
else:
self.hiddenRows.remove(row)
self.checkVisibilities()
# Columns and rows
def getColName(self, i, shortname):
if ffado.config.bypassdbus:
return 'col ' + str(i)
if (self.transpose):
name = self.interface.getRowName(i)
else:
name = self.interface.getColName(i)
self.shortname = shortname
if (shortname or (name == '')):
number = " %d" % (i+1)
name = self.shortcolname + number
return name
def getRowName(self, j, shortname):
if ffado.config.bypassdbus:
return 'row ' + str(j)
if (self.transpose):
name = self.interface.getColName(j)
else:
name = self.interface.getRowName(j)
self.shortname = shortname
if (shortname or (name == '')):
number = " %d" % (j+1)
name = self.shortrowname + number
return name
def valueChangedFn(self, n):
#log.debug("MatrixNode.valueChangedFn( %s )" % str(n))
if not ffado.config.bypassdbus:
self.interface.setValue(n[1], n[0], n[2])
self.valueChanged.emit(n)
# Update when routing is modified
def updateRouting(self):
if (self.cols > 1):
for i in range(self.cols):
last_name = self.columnHeaders[i].lbl.text()
col_name = self.getColName(i, self.shortname)
if last_name != col_name:
#log.debug("MatrixControlView.updateRouting( %s )" % str(col_name))
self.columnHeaders[i].name = col_name
self.columnHeaders[i].lbl.setText(col_name)
if (self.rows > 1):
for j in range(self.rows):
last_name = self.rowHeaders[j].lbl.text()
row_name = self.getRowName(j, self.shortname)
if last_name != row_name:
#log.debug("MatrixControlView.updateRouting( %s )" % str(row_name))
self.rowHeaders[j].name = row_name
self.rowHeaders[j].lbl.setText(row_name)
def updateValues(self, n):
nbitems = len(n) // 3
for i in range(nbitems):
n_0 = n[3*i]
n_1 = n[3*i+1]
n_2 = n[3*i+2]
self.nodeDisconnect(self.items[n_0][n_1])
self.items[n_0][n_1].setValue(n_2)
self.nodeConnect(self.items[n_0][n_1])
def refreshValues(self):
if ffado.config.bypassdbus:
return
for x in range(len(self.items)):
for y in range(len(self.items[x])):
val = self.interface.getValue(x,y)
if (self.transpose):
self.items[y][x].setValue(val)
self.items[y][x].internalValueChanged(val)
else:
self.items[x][y].setValue(val)
self.items[x][y].internalValueChanged(val)
def saveSettings(self, indent):
matrixSaveString = []
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s %d\n' % (indent, self.rows))
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s %d\n' % (indent, self.cols))
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s \n' % indent)
for i in range(self.rows):
line = '%s ' % indent
for j in range(self.cols):
line += '%d ' % self.interface.getValue(i,j)
line += '\n'
matrixSaveString.append(line)
matrixSaveString.append('%s \n' % indent)
if (self.mutes_interface != None):
matrixSaveString.append('%s \n' % indent)
for i in range(self.rows):
line = '%s ' % indent
for j in range(self.cols):
line += '%d ' % self.mutes_interface.getValue(i,j)
line += '\n'
matrixSaveString.append(line)
matrixSaveString.append('%s \n' % indent)
if (self.inverts_interface != None):
matrixSaveString.append('%s \n' % indent)
for i in range(self.rows):
line = '%s ' % indent
for j in range(self.cols):
line += '%d ' % self.inverts_interface.getValue(i,j)
line += '\n'
matrixSaveString.append(line)
matrixSaveString.append('%s \n' % indent)
return matrixSaveString
def readSettings(self, readMatrixString, transpose_coeff):
if readMatrixString[0].find("") == -1:
log.debug("Number of matrix rows must be specified")
return False
if readMatrixString[2].find("") == -1:
log.debug("Non-conformal xml file")
return False
n_rows = int(readMatrixString[1])
if readMatrixString[3].find("") == -1:
log.debug("Number of matrix columns must be specified")
return False
if readMatrixString[5].find("") == -1:
log.debug("Non-conformal xml file")
return False
n_cols = int(readMatrixString[4])
if transpose_coeff:
if n_rows > self.cols:
n_rows = self.cols
if n_cols > self.rows:
n_cols = self.rows
else:
if n_rows > self.rows:
n_rows = self.rows
if n_cols > self.cols:
n_cols = self.cols
log.debug("Setting %d rows and %d columns coefficients" % (n_rows, n_cols))
try:
idxb = readMatrixString.index('')
idxe = readMatrixString.index('')
except Exception:
log.debug("No mixer matrix coefficients specified")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe < idxb + n_rows + 1:
log.debug("Incoherent number of rows in coefficients")
return False
i = 0
for s in readMatrixString[idxb+1:idxb + n_rows + 1]:
coeffs = s.split()
if len(coeffs) < n_cols:
log.debug("Incoherent number of columns in coefficients")
return False
j = 0
for c in coeffs[0:n_cols]:
if transpose_coeff:
self.interface.setValue(j, i, int(c))
else:
self.interface.setValue(i, j, int(c))
j += 1
i += 1
del coeffs
try:
idxb = readMatrixString.index('')
idxe = readMatrixString.index('')
except Exception:
log.debug("No mixer mute coefficients specified")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe < idxb + n_rows + 1:
log.debug("Incoherent number of rows in mute")
return false
i = 0
for s in readMatrixString[idxb+1:idxb + n_rows + 1]:
coeffs = s.split()
if len(coeffs) < n_cols:
log.debug("Incoherent number of columns in mute")
return false
j = 0
for c in coeffs[0:n_cols]:
if transpose_coeff:
self.mutes_interface.setValue(j, i, int(c))
else:
self.mutes_interface.setValue(i, j, int(c))
j += 1
i += 1
del coeffs
try:
idxb = readMatrixString.index('')
idxe = readMatrixString.index('')
except Exception:
log.debug("No mixer inverts coefficients specified")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe < idxb + n_rows + 1:
log.debug("Incoherent number of rows in inverts")
return false
i = 0
for s in readMatrixString[idxb+1:idxb + n_rows + 1]:
coeffs = s.split()
if len(coeffs) < n_cols:
log.debug("Incoherent number of columns in inverts")
return false
j = 0
for c in coeffs[0:n_cols]:
if transpose_coeff:
self.inverts_interface.setValue(j, i, int(c))
else:
self.inverts_interface.setValue(i, j, int(c))
j += 1
i += 1
del coeffs
self.refreshValues()
return True
class VolumeSlider(QSlider):
sliderChanged = pyqtSignal(tuple)
def __init__(self, In, Out, value, parent):
QSlider.__init__(self, QtCore.Qt.Vertical, parent)
self.setTickPosition(QSlider.TicksBothSides)
v_min = 10.0*toDBvalue(0)
v_max = 10.0*toDBvalue(65536)
self.setTickInterval((v_max-v_min)/10)
self.setMinimum(v_min)
self.setMaximum(v_max)
self.setSingleStep(1)
self.sliderSetValue(value)
self.In = In
self.Out = Out
self.valueChanged.connect(self.sliderValueChanged)
def sliderSetValue(self, value):
#log.debug("Volume slider value changed( %i )" % value)
v = 10.0*toDBvalue(value)
#log.debug("Volume slider value changed(dB: %g )" % (0.1*v))
self.setValue(v)
def sliderReadValue(self, value):
return fromDBvalue(0.1*value)
# Restore absolute value from DB
# Emit signal for further use, especially for matrix view
def sliderValueChanged(self, value):
value = fromDBvalue(0.1*value)
self.sliderChanged.emit((self.In, self.Out, value))
self.update()
class VolumeSliderValueInfo(QLineEdit):
def __init__(self, In, Out, value, parent):
QLineEdit.__init__(self, parent)
self.setReadOnly(True)
self.setAlignment(Qt.AlignCenter)
self.setAutoFillBackground(True)
self.setFrame(False)
self.sliderSetMinimalDim()
self.bgcolors = BckgrdColorForNumber()
self.sliderSetValue(value)
def sliderSetMinimalDim(self):
fontmetrics = self.fontMetrics()
self.setMinimumSize(fontmetrics.boundingRect("-00.0 dB").size()*1.1)
def sliderSetValue(self, value):
color = self.bgcolors.getColor(value)
palette = self.palette()
palette.setColor(QPalette.Active, QPalette.Base, color)
palette.setColor(QPalette.Active, QPalette.Text, self.bgcolors.getFrgdColor(color))
self.setPalette(palette)
v = round(toDBvalue(value),1)
if (v > -40):
text = "%.1f dB" % v
else:
symb_inf = u"\u221E"
text = "-" + symb_inf + " dB"
self.setText(text)
class BalanceSlider(QSlider):
sliderChanged = pyqtSignal(tuple)
def __init__(self, In, Out, value, parent):
QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
v_min = -50
v_max = 50
self.setTickPosition(QSlider.TicksBothSides)
self.setTickInterval((v_max-v_min)/2)
self.setMinimum(v_min)
self.setMaximum(v_max)
self.setSingleStep(1)
self.In = In
self.Out = Out
self.sliderSetValue(value)
self.valueChanged.connect(self.sliderValueChanged)
def sliderSetValue(self, value):
#log.debug("Balance fader value set( %d, %d, %f )" % (self.In, self.Out, value))
v = int(round(50.0*value, 2))
self.setValue(v)
def sliderReadValue(self):
return float(round(self.value()/50.0, 2))
def sliderValueChanged(self, value):
value = float(round(self.value()/50.0, 2))
#log.debug("Balance fader value changed( %d, %d, %f )" % (self.In, self.Out, value))
self.sliderChanged.emit((self.In, self.Out, value))
# Slider view widget
class SliderControlView(QWidget):
valueChanged = pyqtSignal(tuple)
def __init__(self, parent, servername, basepath, rule="Columns_are_inputs", shortname=False, shortinname="Ch", shortoutname="Ch", stereochannels = []):
QWidget.__init__(self, parent)
if not ffado.config.bypassdbus:
self.bus = dbus.SessionBus()
self.dev = self.bus.get_object(servername, basepath)
self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.MatrixMixer")
self.rule = rule
self.shortname = shortname
self.shortinname = shortinname
self.shortoutname = shortoutname
self.stereochannels = stereochannels
self.out = []
self.nbIn = self.getNbIn()
self.nbOut = self.getNbOut()
self.outmatrix = []
k = 0
for i in range(self.nbOut):
widget = QWidget(parent)
v_layout = QVBoxLayout(widget)
v_layout.setAlignment(Qt.AlignCenter)
widget.setLayout(v_layout)
self.out.append(widget)
self.out[i].is_stereo = False
self.out[i].out_1 = k
self.outmatrix.append(i)
self.out[i].outname = "Out %d" % (k+1)
if k in self.stereochannels:
self.out[i].is_stereo = True
self.out[i].outname += "+%d" % (k+2)
self.outmatrix.append(i)
self.out[i].lbl = []
# Mixer/Out info label
if (self.nbOut > 1):
lbl = QLabel(widget)
lbl.setText(self.getOutName(i, self.shortname))
lbl.setAlignment(Qt.AlignCenter)
v_layout.addWidget(lbl)
self.out[i].lbl.append(lbl)
h_layout_wid = QWidget(widget)
h_layout = QHBoxLayout(h_layout_wid)
h_layout.setAlignment(Qt.AlignCenter)
h_layout_wid.setLayout(h_layout)
v_layout.addWidget(h_layout_wid)
self.out[i].volume = []
self.out[i].svl = []
self.out[i].balance = []
for j in range(self.nbIn):
h_v_layout_wid = QWidget(h_layout_wid)
h_v_layout = QVBoxLayout(h_v_layout_wid)
h_v_layout.setAlignment(Qt.AlignCenter)
h_v_layout_wid.setLayout(h_v_layout)
h_layout.addWidget(h_v_layout_wid)
# Mixer/In info label
if (self.nbIn > 1):
lbl = QLabel(h_v_layout_wid)
lbl.setText(self.getInName(j, self.shortname))
lbl.setAlignment(Qt.AlignCenter)
h_v_layout.addWidget(lbl)
self.out[i].lbl.append(lbl)
h_v_h_layout_wid = QWidget(h_v_layout_wid)
h_v_h_layout = QHBoxLayout(h_v_h_layout_wid)
h_v_h_layout.setAlignment(Qt.AlignCenter)
h_v_h_layout_wid.setLayout(h_v_h_layout)
h_v_layout.addWidget(h_v_h_layout_wid)
volume = VolumeSlider(j, i, self.getVolumeValue(j,i), h_v_h_layout_wid)
h_v_h_layout.addWidget(volume)
self.out[i].volume.append(volume)
self.volumeConnect(volume)
# Volume slider info
svl = VolumeSliderValueInfo(j, i, self.getVolumeValue(j,i), h_v_layout_wid)
h_v_layout.addWidget(svl)
self.out[i].svl.append(svl)
# Balance fader
if self.out[i].is_stereo:
balance = BalanceSlider(j, i, self.getBalanceValue(j,i), h_v_layout_wid)
h_v_layout.addWidget(balance)
self.out[i].balance.append(balance)
self.balanceConnect(balance)
k += 1
if self.out[i].is_stereo:
k += 1
def volumeConnect(self, volume):
volume.sliderChanged.connect(self.valueChangedVolume)
def volumeDisconnect(self, volume):
volume.sliderChanged.disconnect(self.valueChangedVolume)
def balanceConnect(self, balance):
balance.sliderChanged.connect(self.valueChangedBalance)
def balanceDisconnect(self, balance):
balance.sliderChanged.disconnect(self.valueChangedBalance)
def getNbIn(self):
if ffado.config.bypassdbus:
return 2
if (self.rule == "Columns_are_inputs"):
return self.interface.getColCount()
else:
return self.interface.getRowCount()
def getNbOut(self):
if ffado.config.bypassdbus:
return 2
if (self.rule == "Columns_are_inputs"):
nbout = self.interface.getRowCount()
else:
nbout = self.interface.getColCount()
return nbout-len(self.stereochannels)
def getVolumeValue(self, In, i):
if ffado.config.bypassdbus:
return 1
Out = self.out[i].out_1
if (self.rule == "Columns_are_inputs"):
vl = self.interface.getValue(Out, In)
else:
vl = self.interface.getValue(In, Out)
if (self.out[i].is_stereo):
if (self.rule == "Columns_are_inputs"):
vr = self.interface.getValue(Out+1, In)
else:
vr = self.interface.getValue(In, Out+1)
return getStereoVolume(vl, vr)
else:
return vl;
def getBalanceValue(self, In, i):
if ffado.config.bypassdbus:
return 0.5
Out = self.out[i].out_1
if (self.rule == "Columns_are_inputs"):
vl = self.interface.getValue(Out, In)
vr = self.interface.getValue(Out+1, In)
else:
vl = self.interface.getValue(In, Out)
vr = self.interface.getValue(In, Out+1)
return getStereoBalance(vl, vr)
def setValue(self, In, Out, val):
if ffado.config.bypassdbus:
return
if (self.rule == "Columns_are_inputs"):
return self.interface.setValue(Out, In, val)
else:
return self.interface.setValue(In, Out, val)
def updateValues(self, n):
nbitems = len(n) // 3
for j in range(nbitems):
n_0 = n[3*j]
n_1 = n[3*j+1]
n_2 = n[3*j+2]
i = self.outmatrix[n_1]
if (self.out[i].is_stereo):
v = self.getVolumeValue(n_0, i)
self.volumeDisconnect(self.out[i].volume[n_0])
self.balanceDisconnect(self.out[i].balance[n_0])
self.out[i].volume[n_0].sliderSetValue(v)
self.out[i].svl[n_0].sliderSetValue(v)
b = self.getBalanceValue(n_0, i)
# log.debug("update Value (%d %d %d %f)" % (n_0, i, v, b))
self.out[i].balance[n_0].sliderSetValue(b)
self.volumeConnect(self.out[i].volume[n_0])
self.balanceConnect(self.out[i].balance[n_0])
else:
v = n_2
# log.debug("update Value (%d %d %d)" % (n_0, i, v))
self.volumeDisconnect(self.out[i].volume[n_0])
self.out[i].volume[n_0].sliderSetValue(v)
self.out[i].svl[n_0].sliderSetValue(v)
self.volumeConnect(self.out[i].volume[n_0])
def valueChangedVolume(self, n):
#log.debug("VolumeSlider.valueChanged( %s )" % str(n))
v = n[2]
n1 = self.out[n[1]].out_1
if (self.out[n[1]].is_stereo):
b = self.out[n[1]].balance[n[0]].value()/50.0
vl = int(getVolumeLeft(v, b))
self.setValue(n[0], n1, vl)
n2 = n1+1
vr = int(getVolumeRight(v, b))
self.setValue(n[0], n2, vr)
n_t = (n[0], n1, vl, n[0], n2, vr)
self.valueChanged.emit(n_t)
else:
self.setValue(n[0], n1, v)
n_t = (n[0], n1, v)
self.valueChanged.emit(n_t)
self.out[n[1]].svl[n[0]].sliderSetValue(v)
def valueChangedBalance(self, n):
#log.debug("BalanceSlider.valueChanged( %s )" % str(n))
n1 = self.out[n[1]].out_1
v = fromDBvalue(0.1*self.out[n[1]].volume[n[0]].value())
b = n[2]
vl = int(getVolumeLeft(v, b))
self.setValue(n[0], n1, vl)
n2 = n1+1
vr = int(getVolumeRight(v, b))
self.setValue(n[0], n2, vr)
n_t = (n[0], n1, vl, n[0], n2, vr)
self.valueChanged.emit(n_t)
def getOutName(self, i, shortname):
self.shortname = shortname
k = self.out[i].out_1
if (shortname):
if (self.out[i].is_stereo):
number = " %d+%d" % (k+1, k+2)
else:
number = " %d" % (k+1)
name = self.shortoutname + number
return name
else:
if ffado.config.bypassdbus:
return 'OutName ' + str(i)
if (self.rule == "Columns_are_inputs"):
if (self.out[i].is_stereo):
name = self.interface.getRowName(k).replace('\n','')+" + "+self.interface.getRowName(k+1).replace('\n','')
else:
name = self.interface.getRowName(k).replace('\n','')
return name
else:
if (self.out[i].is_stereo):
name = self.interface.getColName(k).replace('\n','')+" + "+self.interface.getColName(k+1).replace('\n','')
else:
name = self.interface.getColName(k).replace('\n','')
return name
def getInName(self, j, shortname):
self.shortname = shortname
if (shortname):
number = " %d" % (j+1)
name = self.shortinname + number
return name
else:
if ffado.config.bypassdbus:
return 'InName ' + str(j)
if (self.rule == "Columns_are_inputs"):
return self.interface.getColName(j)
else:
return self.interface.getRowName(j)
# Update when routing is modified
def updateRouting(self):
for i in range(self.nbOut):
if (self.nbOut > 1):
last_name = self.out[i].lbl[0].text()
out_name = self.getOutName(i, self.shortname)
if last_name != out_name:
#log.debug("SliderControlView.updateRouting( %s )" % str(out_name))
self.out[i].lbl[0].setText(out_name)
if (self.nbIn > 1):
for j in range(self.nbIn):
last_name = self.out[i].lbl[j+1].text()
in_name = self.getInName(j, self.shortname)
if last_name != in_name:
#log.debug("SliderControlView.updateRouting( %s )" % str(in_name))
self.out[i].lbl[j+1].setText(in_name)
def refreshValues(self):
for n_out in range(self.nbOut):
for n_in in range(self.nbIn):
i = self.outmatrix[n_out]
v = self.getVolumeValue(n_in, i)
if (self.out[i].is_stereo):
self.volumeDisconnect(self.out[i].volume[n_in])
self.out[i].volume[n_in].sliderSetValue(v)
self.out[i].svl[n_in].sliderSetValue(v)
b = self.getBalanceValue(n_in, i)
# log.debug("update Value (%d %d %d %f)" % (n_0, i, v, b))
self.out[i].balance[n_in].sliderSetValue(b)
self.volumeConnect(self.out[i].volume[n_in])
else:
# log.debug("update Value (%d %d %d)" % (n_0, i, v))
self.out[i].volume[n_in].sliderSetValue(v)
self.out[i].svl[n_in].sliderSetValue(v)
def saveSettings(self, indent):
if ffado.config.bypassdbus:
rows = 2
cols = 2
else:
rows = self.interface.getRowCount()
cols = self.interface.getColCount()
matrixSaveString = []
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s %d\n' % (indent, rows))
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s %d\n' % (indent, cols))
matrixSaveString.append('%s \n' % indent)
matrixSaveString.append('%s \n' % indent)
for i in range(rows):
line = '%s ' % indent
for j in range(cols):
line += '%d ' % self.interface.getValue(i,j)
line += '\n'
matrixSaveString.append(line)
matrixSaveString.append('%s \n' % indent)
return matrixSaveString
def readSettings(self, readMatrixString, transpose_coeff):
if ffado.config.bypassdbus:
rows = 2
cols = 2
else:
rows = self.interface.getRowCount()
cols = self.interface.getColCount()
if readMatrixString[0].find("") == -1:
log.debug("Number of matrix rows must be specified")
return False
if readMatrixString[2].find("") == -1:
log.debug("Non-conformal xml file")
return False
n_rows = int(readMatrixString[1])
if readMatrixString[3].find("") == -1:
log.debug("Number of matrix columns must be specified")
return False
if readMatrixString[5].find("") == -1:
log.debug("Non-conformal xml file")
return False
n_cols = int(readMatrixString[4])
if transpose_coeff:
if n_rows > cols:
n_rows = cols
if n_cols > rows:
n_cols = rows
else:
if n_rows > rows:
n_rows = rows
if n_cols > cols:
n_cols = cols
log.debug("Setting %d rows and %d columns coefficients" % (n_rows, n_cols))
try:
idxb = readMatrixString.index('')
idxe = readMatrixString.index('')
except Exception:
log.debug("No mixer matrix coefficients specified")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe < idxb + n_rows + 1:
log.debug("Incoherent number of rows in coefficients")
return False
i = 0
for s in readMatrixString[idxb+1:idxb + n_rows + 1]:
coeffs = s.split()
if len(coeffs) < n_cols:
log.debug("Incoherent number of columns in coefficients")
return False
j = 0
for c in coeffs[0:n_cols]:
if transpose_coeff:
self.interface.setValue(j, i, int(c))
else:
self.interface.setValue(i, j, int(c))
j += 1
i += 1
del coeffs
self.refreshValues()
return True
from functools import partial
class MatrixMixer(QWidget):
def __init__(self, servername, basepath, parent=None, rule="Columns_are_inputs", sliderMaxValue=-1, mutespath=None, invertspath=None, smallFont=False, taborientation=QTabWidget.West, tabshape=QTabWidget.Triangular):
QWidget.__init__(self, parent)
self.servername = servername
self.basepath = basepath
self.sliderMaxValue = sliderMaxValue
self.mutespath = mutespath
self.invertspath = invertspath
self.smallFont = smallFont
self.layout = QVBoxLayout(self)
self.setLayout(self.layout)
# Mixer view Tool bar
mxv_set = QToolBar("View settings", self)
# Here is a hack; the first action button appears to behaves strangely,
# possibly a PyQt bug (or an unsufficient fair implementation of it)
# Feel free to remove the next three lines at a time in the future
hack = QAction(" ", mxv_set)
hack.setDisabled(True)
mxv_set.addAction(hack)
transpose_matrix = QAction("Transpose", mxv_set)
self.transpose = False
transpose_matrix.setShortcut('Ctrl+T')
transpose_matrix.setToolTip("Invert rows and columns in Matrix view")
mxv_set.addAction(transpose_matrix)
transpose_matrix.triggered.connect(self.transposeMatrixView)
mxv_set.addSeparator()
self.hide_matrix = QAction("Hide matrix", mxv_set)
self.hide_matrix_bool = False
mxv_set.addAction(self.hide_matrix)
self.hide_matrix.triggered.connect(self.hideMatrixView)
mxv_set.addSeparator()
self.hide_per_output = QAction("Hide per Output", mxv_set)
self.hide_per_output_bool = False
mxv_set.addAction(self.hide_per_output)
self.hide_per_output.triggered.connect(self.hidePerOutputView)
mxv_set.addSeparator()
self.use_short_names = QAction("Short names", mxv_set)
self.short_names_bool = False
mxv_set.addAction(self.use_short_names)
self.use_short_names.setToolTip("Use short or full names for input and output channels")
self.use_short_names.triggered.connect(self.shortChannelNames)
mxv_set.addSeparator()
font_switch_lbl = QLabel(mxv_set)
font_switch_lbl.setText("Font size ")
mxv_set.addWidget(font_switch_lbl)
font_switch = QComboBox(mxv_set)
font_switch.setToolTip("Labels font size")
font = font_switch.font()
for i in range(10):
font_switch.addItem(" %d " % (font.pointSize()+4-i))
font_switch.setCurrentIndex(font_switch.findText(" %d " % font.pointSize()))
mxv_set.addWidget(font_switch)
mxv_set.addSeparator()
font_switch.activated.connect(self.changeFontSize)
self.layout.addWidget(mxv_set)
self.mxv_set = mxv_set
# First tab is for matrix view
# Next are for "per Out" view
self.tabs = QTabWidget(self)
self.tabs.setTabPosition(taborientation)
self.tabs.setTabShape(tabshape)
self.layout.addWidget(self.tabs)
# Inputs/Outputs versus rows/columns rule
self.rule = rule
# Matrix view tab
if (rule == "Columns_are_inputs"):
self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "In", "Out", self.transpose)
else:
self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "Out", "In", self.transpose)
self.matrix.valueChanged.connect(self.matrixControlChanged)
self.scrollarea_matrix = QScrollArea(self.tabs)
self.scrollarea_matrix.setWidgetResizable(True)
self.scrollarea_matrix.setWidget(self.matrix)
self.tabs.addTab(self.scrollarea_matrix, " Matrix ")
# Add stereo/mono output choice in tool bar
if (rule == "Columns_are_inputs"):
if (self.transpose):
nb_out_mono = self.matrix.cols
else:
nb_out_mono = self.matrix.rows
else:
if (self.transpose):
nb_out_mono = self.matrix.rows
else:
nb_out_mono = self.matrix.cols
stereo_switch_lbl = QLabel(mxv_set)
stereo_switch_lbl.setText("Stereo: ")
mxv_set.addWidget(stereo_switch_lbl)
self.stereo_channels = []
self.stereo_switch = []
for i in range(int(nb_out_mono/2)):
stereo_switch = QPushButton("%d+%d" % (2*i+1, 2*i+2), mxv_set)
stereo_switch.setToolTip("Set these output channels as stereo")
stereo_switch.setCheckable(True)
stereo_switch.clicked.connect(partial(self.switchStereoChannel, i))
stereo_switch.setMinimumSize(stereo_switch_lbl.fontMetrics().boundingRect("%d+%d" % (nb_out_mono, nb_out_mono)).size()*1.05)
stereo_switch.setSizePolicy(QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum))
stereo_switch.is_stereo = False
mxv_set.addWidget(stereo_switch)
self.stereo_switch.append(stereo_switch)
mxv_set.addSeparator()
# Per out view tabs
self.perOut = SliderControlView(self, servername, basepath, rule, self.short_names_bool, "In", "Out", self.stereo_channels)
self.perOut.valueChanged.connect(self.sliderControlChanged)
for i in range(self.perOut.nbOut):
self.perOut.out[i].scrollarea = QScrollArea(self.tabs)
self.perOut.out[i].scrollarea.setWidgetResizable(True)
self.perOut.out[i].scrollarea.setWidget(self.perOut.out[i])
self.tabs.addTab(self.perOut.out[i].scrollarea, " %s " % self.perOut.out[i].outname)
def transposeMatrixView(self):
self.transpose = not(self.transpose)
self.tabs.removeTab(0)
self.scrollarea_matrix.destroy()
if (self.rule == "Columns_are_inputs"):
self.matrix = MatrixControlView(self.servername, self.basepath, self, self.sliderMaxValue, self.mutespath, self.invertspath, self.smallFont, self.short_names_bool, "In", "Out", self.transpose)
else:
self.matrix = MatrixControlView(self.servername, self.basepath, self, self.sliderMaxValue, self.mutespath, self.invertspath, self.smallFont, self.short_names_bool, "Out", "In", self.transpose)
self.matrix.valueChanged.connect(self.matrixControlChanged)
self.scrollarea_matrix = QScrollArea(self.tabs)
self.scrollarea_matrix.setWidgetResizable(True)
self.scrollarea_matrix.setWidget(self.matrix)
self.tabs.insertTab(0, self.scrollarea_matrix, "Matrix")
self.tabs.setCurrentIndex(0)
def hideMatrixView(self):
self.hide_matrix_bool = not(self.hide_matrix_bool)
if (self.hide_matrix_bool):
self.tabs.removeTab(0)
self.hide_matrix.setText("Show Matrix")
else:
self.tabs.insertTab(0, self.scrollarea_matrix, "Matrix")
self.tabs.setCurrentIndex(0)
self.hide_matrix.setText("Hide Matrix")
def hidePerOutputView(self):
self.hide_per_output_bool = not(self.hide_per_output_bool)
if (self.hide_per_output_bool):
index_0 = 1
if (self.hide_matrix_bool):
index_0 = 0
for i in range(self.perOut.nbOut):
self.tabs.removeTab(index_0)
self.hide_per_output.setText("Show per Output")
else:
for i in range(self.perOut.nbOut):
self.tabs.insertTab(i+1, self.perOut.out[i].scrollarea, " %s " % self.perOut.out[i].outname)
self.hide_per_output.setText("Hide per Output")
# Font size for channel names
def changeFontSize(self, size):
font = self.mxv_set.font()
font.setPointSize(int(size))
self.mxv_set.setFont(font)
font = self.tabs.font()
font.setPointSize(int(size))
self.tabs.setFont(font)
font = self.matrix.font()
font.setPointSize(int(size))
self.matrix.setFont(font)
font = self.perOut.font()
font.setPointSize(int(size))
self.perOut.setFont(font)
for i in range(self.perOut.nbOut):
for j in range(self.perOut.nbIn):
self.perOut.out[i].svl[j].sliderSetMinimalDim()
# Allows long name for Mixer/Out and /In to be hidden
def shortChannelNames(self):
checked = not(self.short_names_bool)
if (self.matrix.cols > 1):
for i in range(self.matrix.cols):
self.matrix.columnHeaders[i].name = self.matrix.getColName(i, checked)
self.matrix.columnHeaders[i].lbl.setText(self.matrix.columnHeaders[i].name)
if (self.matrix.rows > 1):
for j in range(self.matrix.rows):
self.matrix.rowHeaders[j].name = self.matrix.getRowName(j, checked)
self.matrix.rowHeaders[j].lbl.setText(self.matrix.rowHeaders[j].name)
for i in range(self.perOut.nbOut):
if (self.perOut.nbOut > 1):
self.perOut.out[i].lbl[0].setText(self.perOut.getOutName(i, checked))
if (self.perOut.nbIn > 1):
for j in range(self.perOut.nbIn):
self.perOut.out[i].lbl[j+1].setText(self.perOut.getInName(j, checked))
# Care for hidden columns
if (self.matrix.cols > 1):
for i in self.matrix.hiddenCols:
self.matrix.columnHeaders[i].lbl.setText("%d" % (i+1))
# Care for hidden rows
if (self.matrix.rows > 1):
for j in self.matrix.hiddenRows:
self.matrix.rowHeaders[j].lbl.setText("%d" % (j+1))
self.short_names_bool = checked
if (self.short_names_bool):
self.use_short_names.setText("Long names")
else:
self.use_short_names.setText("Short names")
# Sliders value change
# Care that some recursive process is involved and only stop when exactly same values are involved
# Matrix view
def matrixControlChanged(self, n):
# Update value needed for "per Out" view
#log.debug("Update per Output( %s )" % str(n))
nbitems = len(n) // 3
if (self.rule == "Columns_are_inputs"):
n_t = n
else:
n_t = ()
for i in range(nbitems):
n_t += (n[3*i+1], n[3*i], n[3*i+2])
self.perOut.updateValues(n_t)
# "per Out" view
def sliderControlChanged(self, n):
# Update value needed for matrix view
#log.debug("Update Matrix( %s )" % str(n))
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):
n_t += (n[3*i+1], n[3*i], n[3*i+2])
else:
n_t = n
self.matrix.updateValues(n_t)
def refreshValues(self):
# Refreshing matrix coefficient should be sufficient,
# propagating the changes to perOut view
self.matrix.refreshValues()
def switchStereoChannel(self, channel, is_stereo):
#log.debug(" switching channels %d+%d to stereo/mono" % (2*channel, 2*channel+1))
self.stereo_switch[channel].is_stereo = self.stereo_switch[channel].isChecked();
if (self.stereo_switch[channel].is_stereo):
self.stereo_channels.append(2*channel)
else:
self.stereo_channels.remove(2*channel)
# tab 0 is for matrix except if it is hidden
index_0 = 1
if (self.hide_matrix_bool):
index_0 = 0
for i in range(self.perOut.nbOut):
self.tabs.removeTab(index_0)
self.perOut.destroy()
self.perOut = SliderControlView(self, self.servername, self.basepath, self.rule, self.short_names_bool, "In", "Out", self.stereo_channels)
self.perOut.valueChanged.connect(self.sliderControlChanged)
current = 0
for i in range(self.perOut.nbOut):
self.perOut.out[i].scrollarea = QScrollArea(self.tabs)
self.perOut.out[i].scrollarea.setWidgetResizable(True)
self.perOut.out[i].scrollarea.setWidget(self.perOut.out[i])
self.tabs.addTab(self.perOut.out[i].scrollarea, " %s " % self.perOut.out[i].outname)
if self.perOut.out[i].out_1 == 2*channel:
current = i
self.tabs.setCurrentWidget(self.perOut.out[current].scrollarea)
# Update when routing is modified
def updateRouting(self):
self.matrix.updateRouting()
self.perOut.updateRouting()
def saveSettings(self, indent):
mixerString = []
mixerString.append("%s\n" % indent)
mixerString.extend(self.matrix.saveSettings(indent))
mixerString.append("%s\n" % indent)
mixerString.append("%s\n" % indent)
mixerString.append("%s \n" % indent)
n = len(self.stereo_channels)
mixerString.append("%s %d\n" % (indent, n))
mixerString.append("%s \n" % indent)
if n > 0:
mixerString.append("%s \n" % indent)
for i in self.stereo_channels:
mixerString.append("%s %d %d\n" % (indent, i+1, i+2))
mixerString.append("%s \n" % indent)
mixerString.append("%s\n" % indent)
return mixerString
def readSettings(self, readMixerString, transpose_coeff):
try:
idxb = readMixerString.index('')
idxe = readMixerString.index('')
except Exception:
log.debug("No matrices found")
idxb = -1
idxe = -1
if idxb >= 0:
if idxe > idxb+1:
readString = []
for s in readMixerString[idxb+1:idxe]:
readString.append(s)
if self.matrix.readSettings(readString, transpose_coeff):
log.debug("Mixer matrices settings modified")
del readString
try:
idx = readMixerString.index('')
except Exception:
log.debug("No stereo outputs channels information found")
idx = -1
if idx >= 0:
if readMixerString[idx+1].find('') == -1:
log.debug("Number of stereo output channels must be specified")
return False
n = int(readMixerString[idx+2])
if n > self.perOut.nbOut // 2:
log.debug("Incoherent number of stereo channels")
return False
if n > 0:
if readMixerString[idx+3].find('') == -1:
log.debug("No tag found")
return False
if readMixerString[idx+4].find('') == -1:
log.debug("No tag found")
return False
for s in readMixerString[idx+5:idx+5+n]:
i = (int(s.split()[0]) - 1)/2
self.stereo_switch[i].setChecked(True);
self.switchStereoChannel(i, True)
return True
#
# vim: et ts=4 sw=4 fileencoding=utf8
libffado-2.4.2/support/mixer-qt4/ffado/widgets/__init__.py 0000644 0001750 0000144 00000000000 11246571010 023044 0 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/dbus_util.py 0000644 0001750 0000144 00000047101 13115641125 021650 0 ustar jwoithe users #
# Copyright (C) 2005-2008 by Pieter Palmers
# 2007-2008 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
import ffado.config
from ffado.configuration import *
import dbus
try:
# First try the PyQt4 module name
from dbus.mainloop.qt import DBusQtMainLoop
except ImportError:
from dbus.mainloop.pyqt5 import DBusQtMainLoop
DBusQtMainLoop(set_as_default=True)
import logging
log = logging.getLogger('dbus')
class ControlInterface:
def __init__(self, servername, basepath):
self.basepath=basepath
self.servername=servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
else:
self.bus=dbus.SessionBus()
def setContignuous(self, subpath, v, idx=None):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would set Continuous %s on server %s" % (path, self.servername))
return
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Continuous')
if idx == None:
dev_cont.setValue(v)
else:
dev_cont.setValueIdx(idx,v)
except:
log.error("Failed to set Continuous %s on server %s" % (path, self.servername))
def getContignuous(self, subpath, idx=None):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get Continuous %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Continuous')
if idx == None:
return dev_cont.getValue()
else:
return dev_cont.getValueIdx(idx)
except:
log.error("Failed to get Continuous %s on server %s" % (path, self.servername))
return 0
def setDiscrete(self, subpath, v, idx=None):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would set Discrete %s on server %s" % (path, self.servername))
return
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Discrete')
if idx == None:
dev_cont.setValue(v)
else:
dev_cont.setValueIdx(v, idx)
except:
log.error("Failed to set Discrete %s on server %s" % (path, self.servername))
def getDiscrete(self, subpath, idx=None):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get Discrete %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Discrete')
if idx == None:
return dev_cont.getValue()
else:
return dev_cont.getValueIdx(idx)
except:
log.error("Failed to get Discrete %s on server %s" % (path, self.servername))
return 0
def setText(self, subpath, v):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("DEBUG_BYPASSDBUS set, would set Text %s on server %s" % (path, self.servername))
return
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Text')
dev_cont.setValue(v)
except:
log.error("Failed to set Text %s on server %s" % (path, self.servername))
def getText(self, subpath):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get get Text %s on server %s" % (path, self.servername))
return ""
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Text')
return dev_cont.getValue()
except:
log.error("Failed to get Text %s on server %s" % (path, self.servername))
return 0
def setMatrixMixerValue(self, subpath, row, col, v):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would set MatrixMixer %s on server %s" % (path, self.servername))
return
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.MatrixMixer')
dev_cont.setValue(row, col, v)
except:
log.error("Failed to set MatrixMixer %s on server %s" % (path, self.servername))
def getMatrixMixerValue(self, subpath, row, col):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get MatrixMixer %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.MatrixMixer')
return dev_cont.getValue(row, col)
except:
log.error("Failed to get MatrixMixer %s on server %s" % (path, self.servername))
return 0
def enumSelect(self, subpath, v):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would select %s on server %s" % (path, self.servername))
return
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Enum')
dev_cont.select(v)
except:
log.error("Failed to select %s on server %s" % (path, self.servername))
def enumSelected(self, subpath):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get selected enum %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Enum')
return dev_cont.selected()
except:
log.error("Failed to get selected enum %s on server %s" % (path, self.servername))
return 0
def enumGetLabel(self, subpath, v):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get enum label %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Enum')
return dev_cont.getEnumLabel(v)
except:
log.error("Failed to get enum label %s on server %s" % (path, self.servername))
return 0
def enumCount(self, subpath):
path = self.basepath + subpath
if ffado.config.bypassdbus:
log.info("bypassdbus set, would get enum count %s on server %s" % (path, self.servername))
return 0
try:
dev = self.bus.get_object(self.servername, path)
dev_cont = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Enum')
return dev_cont.count()
except:
log.error("Failed to get enum count %s on server %s" % (path, self.servername))
return 0
class DeviceManagerInterface:
""" Implementation of the singleton """
def __init__(self, servername, basepath):
self.basepath=basepath + '/DeviceManager'
self.servername=servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
else:
self.bus=dbus.SessionBus()
self.dev = self.bus.get_object(self.servername, self.basepath)
self.iface = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.Container')
self.updateSignalHandlers = []
self.updateSignalHandlerArgs = {}
self.preUpdateSignalHandlers = []
self.preUpdateSignalHandlerArgs = {}
self.postUpdateSignalHandlers = []
self.postUpdateSignalHandlerArgs = {}
self.destroyedSignalHandlers = []
self.destroyedSignalHandlerArgs = {}
if ffado.config.bypassdbus:
return
# signal reception does not work yet since we need a mainloop for that
# and qt3 doesn't provide one for python/dbus
try:
log.debug("connecting to: Updated on %s (server: %s)" % (self.basepath, self.servername))
self.dev.connect_to_signal("Updated", self.updateSignal, \
dbus_interface="org.ffado.Control.Element.Container")
self.dev.connect_to_signal("PreUpdate", self.preUpdateSignal, \
dbus_interface="org.ffado.Control.Element.Container")
self.dev.connect_to_signal("PostUpdate", self.postUpdateSignal, \
dbus_interface="org.ffado.Control.Element.Container")
self.dev.connect_to_signal("Destroyed", self.destroyedSignal, \
dbus_interface="org.ffado.Control.Element.Container")
except dbus.DBusException:
traceback.print_exc()
def registerPreUpdateCallback(self, callback, arg=None):
if not callback in self.preUpdateSignalHandlers:
self.preUpdateSignalHandlers.append(callback)
# always update the argument
self.preUpdateSignalHandlerArgs[callback] = arg
def registerPostUpdateCallback(self, callback, arg=None):
if not callback in self.postUpdateSignalHandlers:
self.postUpdateSignalHandlers.append(callback)
# always update the argument
self.postUpdateSignalHandlerArgs[callback] = arg
def registerUpdateCallback(self, callback, arg=None):
if not callback in self.updateSignalHandlers:
self.updateSignalHandlers.append(callback)
# always update the argument
self.updateSignalHandlerArgs[callback] = arg
def registerDestroyedCallback(self, callback, arg=None):
if not callback in self.destroyedSignalHandlers:
self.destroyedSignalHandlers.append(callback)
# always update the argument
self.destroyedSignalHandlerArgs[callback] = arg
def updateSignal(self):
log.debug("Received update signal")
for handler in self.updateSignalHandlers:
arg = self.updateSignalHandlerArgs[handler]
try:
if arg:
handler(arg)
else:
handler()
except:
log.error("Failed to execute handler %s" % handler)
def preUpdateSignal(self):
log.debug("Received pre-update signal")
for handler in self.preUpdateSignalHandlers:
arg = self.preUpdateSignalHandlerArgs[handler]
try:
if arg:
handler(arg)
else:
handler()
except:
log.error("Failed to execute handler %s" % handler)
def postUpdateSignal(self):
log.debug("Received post-update signal")
for handler in self.postUpdateSignalHandlers:
arg = self.postUpdateSignalHandlerArgs[handler]
try:
if arg:
handler(arg)
else:
handler()
except:
log.error("Failed to execute handler %s" % handler)
def destroyedSignal(self):
log.debug("Received destroyed signal")
for handler in self.destroyedSignalHandlers:
arg = self.destroyedSignalHandlerArgs[handler]
try:
if arg:
handler(arg)
else:
handler()
except:
log.error("Failed to execute handler %s" % handler)
def getNbDevices(self):
if ffado.config.bypassdbus:
return len(self.devices.devices)
return self.iface.getNbElements()
def getDeviceName(self, idx):
if ffado.config.bypassdbus:
return str(idx)
return self.iface.getElementName(idx)
class ConfigRomInterface:
def __init__(self, servername, devicepath):
self.basepath=devicepath + '/ConfigRom'
self.servername=servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
self.idx = int(devicepath)
else:
self.bus=dbus.SessionBus()
self.dev = self.bus.get_object(self.servername, self.basepath)
self.iface = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.ConfigRomX')
def getGUID(self):
if ffado.config.bypassdbus:
return str(self.idx)
return self.iface.getGUID()
def getVendorName(self):
if ffado.config.bypassdbus:
return self.devices.devices[self.idx]['vendorname']
return self.iface.getVendorName()
def getModelName(self):
if ffado.config.bypassdbus:
return self.devices.devices[self.idx]['modelname']
return self.iface.getModelName()
def getVendorId(self):
if ffado.config.bypassdbus:
return int(self.devices.devices[self.idx]['vendorid'], 16)
return self.iface.getVendorId()
def getModelId(self):
if ffado.config.bypassdbus:
return int(self.devices.devices[self.idx]['modelid'], 16)
return self.iface.getModelId()
def getUnitVersion(self):
if ffado.config.bypassdbus:
return 0
return self.iface.getUnitVersion()
class ClockSelectInterface:
def __init__(self, servername, devicepath):
self.basepath=devicepath + '/Generic/ClockSelect'
self.servername=servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
self.idx = devicepath
else:
self.bus=dbus.SessionBus()
self.dev = self.bus.get_object(self.servername, self.basepath)
self.iface = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.AttributeEnum')
self.iface_element = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.Element')
def count(self):
if ffado.config.bypassdbus:
return 1
return self.iface.count()
def select(self, idx):
if ffado.config.bypassdbus:
return 1
return self.iface.select(idx)
def selected(self):
if ffado.config.bypassdbus:
return True
return self.iface.selected()
def getEnumLabel(self, idx):
if ffado.config.bypassdbus:
return 'enumlabel ' + str(idx)
return self.iface.getEnumLabel(idx)
def attributeCount(self):
if ffado.config.bypassdbus:
return 1
return self.iface.attributeCount()
def getAttributeValue(self, idx):
if ffado.config.bypassdbus:
return 1
return self.iface.getAttributeValue(idx)
def getAttributeName(self, idx):
if ffado.config.bypassdbus:
return 'attrib ' + str(idx)
return self.iface.getAttributeName(idx)
def canChangeValue(self):
if ffado.config.bypassdbus:
return 1
return self.iface_element.canChangeValue()
class EnumInterface:
def __init__(self, servername, basepath):
self.basepath = basepath
self.servername = servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
else:
self.bus = dbus.SessionBus()
self.dev = self.bus.get_object(self.servername, self.basepath)
self.iface = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.Enum')
self.iface_element = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.Element')
def count(self):
if ffado.config.bypassdbus:
return 1
return self.iface.count()
def select(self, idx):
if ffado.config.bypassdbus:
return 1
return self.iface.select(idx)
def selected(self):
if ffado.config.bypassdbus:
return True
return self.iface.selected()
def getEnumLabel(self, idx):
if ffado.config.bypassdbus:
# Can't include text here since some code uses int() to extract
# a value from the enum label
return '0'
return self.iface.getEnumLabel(idx)
def canChangeValue(self):
if ffado.config.bypassdbus:
return True
return self.iface_element.canChangeValue()
def devConfigChanged(self, idx):
if ffado.config.bypassdbus:
return True
return self.iface.devConfigChanged(idx)
class SamplerateSelectInterface(EnumInterface):
def __init__(self, servername, devicepath):
EnumInterface.__init__(self, servername, devicepath + '/Generic/SamplerateSelect')
class StreamingStatusInterface(EnumInterface):
def __init__(self, servername, devicepath):
EnumInterface.__init__(self, servername, devicepath + '/Generic/StreamingStatus')
class TextInterface:
def __init__(self, servername, basepath):
self.basepath=basepath
self.servername=servername
if ffado.config.bypassdbus:
self.devices = DeviceList(ffado.config.SYSTEM_CONFIG_FILE)
self.devices.updateFromFile(ffado.config.USER_CONFIG_FILE)
else:
self.bus=dbus.SessionBus()
self.dev = self.bus.get_object( self.servername, self.basepath )
self.iface = dbus.Interface( self.dev, dbus_interface="org.ffado.Control.Element.Text" )
self.iface_element = dbus.Interface(self.dev, dbus_interface='org.ffado.Control.Element.Element')
def text(self):
if ffado.config.bypassdbus:
return "text"
return self.iface.getValue()
def setText(self,text):
if ffado.config.bypassdbus:
return
self.iface.setValue(text)
def canChangeValue(self):
if ffado.config.bypassdbus:
return True
return self.iface_element.canChangeValue()
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/config.py.in 0000644 0001750 0000144 00000001621 13114471135 021526 0 ustar jwoithe users # -*- coding: utf-8 -*-
REGISTER_URL = '$REGISTRATION_URL'
INI_FILE_PATH = "$CONFIGDIR/registration.ini"
FFADO_CONFIG_DIR = "$CONFIGDIR"
FFADO_VERSION="$VERSION-$REVISION"
FFADO_DBUS_SERVER = 'org.ffado.Control'
FFADO_DBUS_BASEPATH = '/org/ffado/Control'
POLL_SLEEP_TIME_MSEC = 100 # 100ms
PYTHONDIR = "$PYPKGDIR"
SHAREDIR = "$SHAREDIR"
USER_CONFIG_FILE = "$USER_CONFIG_FILE"
SYSTEM_CONFIG_FILE = "$SYSTEM_CONFIG_FILE"
DEBUG = $DEBUG
# If set true it will open all mixers
bypassdbus = False
UIDIR = PYTHONDIR
import os.path
if os.path.exists('support/mixer-qt4/ffado/mixer/globalmixer.ui'):
UIDIR = "support/mixer-qt4"
if os.path.exists('ffado/mixer/globalmixer.ui'):
UIDIR = "."
import os.path
# from PyQt4 import uic
from ffado.import_pyqt import *
def uicLoad(file, object):
if not file.endswith(".ui"):
file += ".ui"
uic.loadUi(os.path.join(UIDIR,file), object)
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/registration.py 0000644 0001750 0000144 00000020206 13114471135 022366 0 ustar jwoithe users #
# Copyright (C) 2008-2009 by Pieter Palmers
# 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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
import urllib
import os
# Python3 renamed ConfigParser to configparser. Deal with this in a way
# which maintains compatibility with python2.
try:
from configparser import SafeConfigParser
except:
from ConfigParser import SafeConfigParser
# The urlopen()/urlencode() functions from urllib in python2 are in
# urllib.request and urllib.parse respectively under python2.
try:
import urllib.request, urllib.parse
url_newapi = 1
except ImportError:
import urllib
url_newapi = 0
from sys import version_info
from ffado.config import REGISTER_URL, INI_FILE_PATH, FFADO_CONFIG_DIR
# from PyQt4.QtGui import QMessageBox
# from PyQt4.QtCore import QByteArray
from ffado.import_pyqt import *
from ffado.regdialog import *
import logging
log = logging.getLogger('registration')
class ffado_registration:
def __init__(self, ffado_version,
guid,
vendor_id,
model_id,
vendor_string,
model_string):
# only use the section before the SVN mark
# we don't need to keep track of all SVN version changes
self.ffado_version = ffado_version.split('-')[0]
self.guid = guid
self.vendor_id = vendor_id
self.model_id = model_id
self.vendor_string = vendor_string
self.model_string = model_string
#check if config file path exists, if not, create it
config_path = os.path.expanduser(FFADO_CONFIG_DIR)
if not os.path.exists(config_path):
os.makedirs(config_path)
# parse the ini file
self.config_filename = os.path.expanduser(INI_FILE_PATH)
self.parser = SafeConfigParser()
self.parser.read(self.config_filename)
self.section_name = "%s:%X" % (self.ffado_version, self.guid)
self.email = "(optional)"
if self.parser.has_section("history") \
and self.parser.has_option("history", "email"):
self.email = self.parser.get("history", "email")
def register_ffado_usage(self):
post_vals = {}
post_vals['guid'] = self.guid
post_vals['vendor_id'] = self.vendor_id
post_vals['model_id'] = self.model_id
post_vals['vendor_string'] = self.vendor_string
post_vals['model_string'] = self.model_string
post_vals['ffado_version'] = self.ffado_version
post_vals['email'] = self.email
try:
if url_newapi == 1:
response = urllib.request.urlopen(REGISTER_URL,
urllib.parse.urlencode(post_vals).encode('ascii'))
else:
response = urllib.urlopen(REGISTER_URL,
urllib.urlencode(post_vals))
except:
log.error("failed, network error")
return (-1, "Network Error")
lines = response.readlines()
ok = False
errline = "Bad response from server"
for i in range(len(lines)):
if lines[i][0:10] == b"RESULT: OK":
ok = True
elif lines[i][0:12] == b"RESULT: FAIL":
ok = False
if len(lines)>i+1:
errline = lines[i+1]
if not ok:
log.info("registration failed %s" % errline)
return (-2, errline)
else:
return (0, "")
def check_for(self, what):
if not self.parser.has_section(self.section_name):
return False
if not self.parser.has_option(self.section_name, what):
return False
return self.parser.getboolean(self.section_name, what)
def check_if_already_registered(self):
return self.check_for("registered")
def check_for_ignore(self):
return self.check_for("ignore")
def mark(self, what, value):
if not self.parser.has_section(self.section_name):
self.parser.add_section(self.section_name)
self.parser.set(self.section_name, what, str(value))
def mark_version_registered(self):
self.mark("registered", True)
def mark_ignore_version(self):
self.mark("ignore", True)
def remember_email(self, email):
if not self.parser.has_section("history"):
self.parser.add_section("history")
self.parser.set("history", "email", str(email))
def check_for_registration(self):
if self.check_for_ignore():
log.debug("user requested to ignore registration")
else:
if self.check_if_already_registered():
log.debug("version/GUID combo already registered")
else:
log.debug("show dialog...")
dlg = ffadoRegDialog(self.vendor_string, "0x%X" % self.vendor_id,
self.model_string, "0x%X" % self.model_id,
"0x%016X" % self.guid, self.ffado_version,
self.email)
dlg.exec_()
if dlg.choice == "neversend":
self.mark_ignore_version()
elif dlg.choice == "send":
if version_info[0] < 3:
# Python 2.x
asciiData = dlg.getEmail().toAscii()
self.email = asciiData.data()
else:
# Python 3 and above
self.email = ascii(dlg.getEmail())
self.remember_email(self.email)
retval = self.register_ffado_usage()
msg = QMessageBox()
if retval[0] == 0:
log.debug("registration successful")
devinfomsg = "Device: %s %s
Vendor/Model Id: %X/%X
Device GUID: %016X
FFADO Version: %s
E-Mail: %s
" % \
(self.vendor_string, self.model_string, self.vendor_id, self.model_id, self.guid, self.ffado_version, self.email)
tmp = msg.question( msg, "Registration Successful",
"Thank you." +
"The registration of the following information was successful:
" +
devinfomsg +
"
For this device you won't be asked to register again until you upgrade to a new version of FFADO.",
QMessageBox.Ok )
self.mark_version_registered()
else:
log.error("error: " + retval[1])
tmp = msg.question( msg, "Registration Failed",
"The registration at ffado.org failed." +
"Error message:
" + retval[1] +
"
Try again next time?
",
QMessageBox.Yes, QMessageBox.No )
if tmp == 4:
self.mark_ignore_version()
elif dlg.choice == "nosend":
pass
# write the updated config
f = open(self.config_filename, "w+")
self.parser.write(f)
f.close()
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/regdialog.py 0000644 0001750 0000144 00000007721 13114471135 021620 0 ustar jwoithe users # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2008 by Pieter Palmers
#
# This file is part of FFADO
# FFADO = Free Firewire (pro-)audio drivers for linux
#
# FFADO is based upon FreeBoB.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# from PyQt4.QtGui import QDialog
from ffado.import_pyqt import *
from ffado.config import *
import logging
log = logging.getLogger('registration')
REGISTRATION_MESSAGE = """
\n
You are running this version of FFADO for the first time with this device.
If FFADO is useful to you, please consider a donation through http://www.ffado.org/?q=donations.
In order to collect usage statistics we would like to send some information about your system to ffado.org.
It is very important for us to have good usage statistics. This is to convince vendors that Linux users
do exist and is where you as a user can help the project.
The information collected is intended only for usage monitoring. The email address is optional, and will
be used for FFADO related announcements only. If you provide one, please provide a valid one.
Note: This registration can also be performed on-line at
http://www.ffado.org/?q=usage.
"""
class ffadoRegDialog(QDialog):
def __init__(self, vendor_name, vendor_id, model_name, model_id,
guid, version, email="(optional)",
parent = None):
QDialog.__init__(self,parent)
uicLoad("ffado/regdialog", self)
self.txtVendorName.setText(vendor_name)
self.txtVendorId.setText(vendor_id)
self.txtModelName.setText(model_name)
self.txtModelId.setText(model_id)
self.txtGUID.setText(guid)
self.txtVersion.setText(version)
self.txtEmail.setText(email)
self.txtMessage.setHtml(REGISTRATION_MESSAGE)
self.choice = "nosend"
self.btnSend.clicked.connect(self.buttonPressed)
self.btnNoSend.clicked.connect(self.buttonPressed)
self.btnNeverSend.clicked.connect(self.buttonPressed)
def buttonPressed(self):
sender = self.sender()
if sender == self.btnSend:
log.debug("user chose to send")
self.choice = "send"
elif sender == self.btnNoSend:
log.debug("user chose not to send")
self.choice = "nosend"
elif sender == self.btnNeverSend:
log.debug("user chose to never send")
self.choice = "neversend"
self.close()
def getEmail(self):
return self.txtEmail.text()
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/configuration.py 0000644 0001750 0000144 00000012410 13066445472 022534 0 ustar jwoithe users #
# Copyright (C) 2008-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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
import re, os
import shlex
import logging
log = logging.getLogger('configparser')
class DeviceList:
def __init__( self, filename="" ):
self.devices = list()
if not filename == "":
self.updateFromFile( filename )
def updateFromFile( self, filename, must_exist=False):
filename = os.path.expanduser(filename)
log.debug("DeviceList::updateFromFile(%s)" % filename)
if not os.path.exists( filename ):
if must_exist:
log.error("cannot open file")
return
f = open( filename, "r" )
lex = Parser( f )
config = {}
while lex.peaktoken() != lex.eof:
tmp = lex.parsenamedvalue()
if tmp != None:
config[ tmp[0] ] = tmp[1]
if "device_definitions" in config:
for dev in config["device_definitions"]:
self.addDevice( dev )
def getDeviceById( self, vendor, model ):
log.debug("DeviceList::getDeviceById( %s, %s )" % (vendor, model ))
for dev in self.devices:
if int("%s" % dev['vendorid'], 0) == int("%s" % vendor, 0) and \
int("%s" % dev['modelid'], 0) == int("%s" % model, 0):
return dev
tmp = dict()
self.devices.append( tmp )
return tmp
def addDevice( self, device_dict ):
log.debug("DeviceList::addDevice()")
dev = self.getDeviceById( device_dict['vendorid'], device_dict['modelid'] )
dev.update( device_dict )
class Parser:
def __init__( self, file ):
self.lex = shlex.shlex( file )
self.eof = self.lex.eof
def peaktoken( self ):
token = self.lex.get_token()
self.lex.push_token( token )
return token
def parselist( self, level="" ):
token = self.peaktoken()
if token != "(":
return
self.lex.get_token()
log.debug("%sWill parse list" % level)
ret = []
token = self.peaktoken()
while token != ")":
ret.append( self.parsenamedvalue( level+" " ) )
token = self.peaktoken()
log.debug("%slist is %s" % (level, str(ret)))
self.lex.get_token()
if self.peaktoken() == ",":
log.debug("%sFound a delimiter" % level)
self.lex.get_token()
return ret
def parsemap( self, level="" ):
token = self.lex.get_token()
if token != "{":
return
log.debug("%sWill parse map" % level)
ret = {}
token = self.peaktoken()
while token != "}":
#self.push_token( token )
tmp = self.parsenamedvalue( level+" " )
if tmp != None:
ret[ tmp[0] ] = tmp[1]
token = self.peaktoken()
token = self.lex.get_token()
log.debug("%sMap ended with '%s' and '%s'"% (level,token,self.peaktoken()))
if self.peaktoken() in (",",";"):
log.debug("%sFound a delimiter!" % level)
self.lex.get_token()
return ret
def parsevalue( self, level="" ):
token = self.lex.get_token()
log.debug("%sparsevalue() called on token '%s'" % (level, token))
self.lex.push_token( token )
if token == "(":
value = self.parselist( level+" " )
elif token == "{":
value = self.parsemap( level+" " )
else:
value = self.lex.get_token().replace( "\"", "" )
token = self.peaktoken()
if token == ";":
log.debug("%sFound a delimiter!" % level)
self.lex.get_token()
return value
def parsenamedvalue( self, level="" ):
token = self.lex.get_token()
log.debug("%sparsenamedvalue() called on token '%s'" % (level, token))
if token == "{":
self.lex.push_token( token )
return self.parsemap( level+" " )
if len(token) > 0 and token not in ("{","}","(",")",",",";"):
log.debug("%sGot name '%s'" %(level,token))
name = token
token = self.lex.get_token()
if token in ("=",":"):
#print( "%sWill parse value" % level )
value = self.parsevalue( level )
return (name,value)
log.debug("%sparsenamedvalue() will return None!" % level)
return
#
# Have kind of a test directly included...
#
if __name__ == "__main__":
import sys
file = sys.argv[1]
log.setLevel(logging.DEBUG)
devs = DeviceList( file )
print( devs.devices )
# vim: et
libffado-2.4.2/support/mixer-qt4/ffado/.gitignore 0000644 0001750 0000144 00000000012 12132617070 021262 0 ustar jwoithe users config.py
libffado-2.4.2/support/mixer-qt4/ffado/panelmanagerstatus.ui 0000644 0001750 0000144 00000002206 12130260370 023531 0 ustar jwoithe users
PanelManagerStatusUI
0
0
611
218
Form
-
0
0
300
0
Bus reconfiguration in progress, please wait...
Qt::AlignCenter
true
libffado-2.4.2/support/mixer-qt4/ffado/__init__.py 0000644 0001750 0000144 00000000000 11246546617 021415 0 ustar jwoithe users libffado-2.4.2/support/mixer-qt4/ffado/regdialog.ui 0000644 0001750 0000144 00000015731 11246546617 021621 0 ustar jwoithe users
ffadoRegDialogUI
0
0
577
497
FFADO Usage Statistics
-
true
-
Information being sent
-
-
Vendor Name:
false
txtVendorName
-
true
-
Qt::Horizontal
16
20
-
Id:
false
txtVendorId
-
0x000aac
true
-
Model Name:
false
txtModelName
-
true
-
Qt::Horizontal
16
20
-
Id:
false
txtModelId
-
0x00010065
true
-
-
GUID:
false
txtGUID
-
true
-
FFADO Version:
false
txtVersion
-
true
-
Your E-Mail:
false
txtEmail
-
(optional)
-
-
Never
-
Not now
-
0
0
Send
true
libffado-2.4.2/support/mixer-qt4/ffado-mixer.in 0000755 0001750 0000144 00000002115 13246707102 020760 0 ustar jwoithe users #!$PYTHON_INTERPRETER
#
# Copyright (C) 2005-2008 by Pieter Palmers
# 2007-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 3 of the License, or
# (at your option) any later version.
#
# 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 .
#
import sys
# Add the path of the installed ffado-modules
# for path in sys.path:
sys.path.insert(0, "$PYPKGDIR" )
from ffado.ffadowindow import *
if __name__ == "__main__":
sys.exit(ffadomain(sys.argv))
#
# vim: ts=4 sw=4 et
libffado-2.4.2/support/mixer-qt4/ffado-mixer.1 0000644 0001750 0000144 00000001700 13115517174 020511 0 ustar jwoithe users .TH FFADO-MIXER 1 09-Jan-2017 "ffado-mixer"
.SH NAME
ffado-mixer \- a graphical front-end for the FFADO mixer DBus controls
exposed by ffado-dbus-server.
.SH SYNOPSIS
.BI "ffado-mixer [options]"
.sp
Available options:
.B "[\-b]"
.sp
.SH DESCRIPTION
.B ffado-mixer
presents a graphical application allowing a FFADO device to be controlled.
The extent of the control is determined by the level of support for the
device in FFADO and in
.B ffado-dbus-server.
Typical controls offered by
.B ffado-mixer
include faders for the on-board mixer, phantom power control, mode switches
and so on.
.SH "OPTIONS"
.TP
.B "\-b"
Do not query ffado-dbus-server for an active interface. Instead, create
an instance of a mixer for every supported interface as defined in FFADO's
"configuration" file with stubs providing placeholder values in place of
settings obtained from the interface. This is primarily to assist with
debugging.
.SH "SEE ALSO"
.BR ffado-dbus-server (1)
libffado-2.4.2/support/mixer-qt4/.gitignore 0000644 0001750 0000144 00000000041 12132617070 020205 0 ustar jwoithe users ffado-mixer
ffado-mixer-profiler
libffado-2.4.2/support/mixer-qt4/ffado-mixer-profiler.in 0000755 0001750 0000144 00000002104 11743645462 022610 0 ustar jwoithe users #!/usr/bin/python
#
# Copyright (C) 2005-2009 by Pieter Palmers
# 2007-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 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 .
#
import sys
# Add the path of the installed ffado-modules
# for path in sys.path:
sys.path.insert(0, "$PYPKGDIR" )
from ffado.ffadowindow import *
import cProfile
if __name__ == "__main__":
cProfile.run('ffadomain(sys.argv)', sort='time')
#
# vim: ts=4 sw=4 et
libffado-2.4.2/support/mixer-qt4/configtest.cfg 0000644 0001750 0000144 00000001023 11116770400 021042 0 ustar jwoithe users ieee1394 :
{
min_split_timeout_usecs = 1000000;
isomanager :
{
iso_receive_mode = 0;
};
};
device_definitions = (
{
vendorid = 0xAAC;
modelid = 0x3;
vendorname = "TerraTec Electronic GmbH";
modelname = "Phase 88 FW";
driver = 1;
},
{
vendorid = 0x130E;
modelid = 0x3;
vendorname = "Focusrite";
modelname = "Saffire Pro26IO";
driver = 1;
},
{
vendorid = 0x1486;
modelid = 0xAF2;
vendorname = "Echo";
modelname = "AudioFire2";
driver = 2;
}
);
libffado-2.4.2/support/tools/ 0000755 0001750 0000144 00000000000 13541343162 015533 5 ustar jwoithe users libffado-2.4.2/support/tools/SConscript 0000644 0001750 0000144 00000003555 13246707102 017555 0 ustar jwoithe users #!/usr/bin/python
#
# Copyright (C) 2007-2008 Arnold Krille
# Copyright (C) 2007-2008 Pieter Palmers
# Copyright (C) 2012 Jonathan Woithe
#
# 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 .
#
import os
from string import Template
Import( 'env' )
e = env.Clone()
# Needed to build ffado-set-nickname
e.MergeFlags( "-I#/ -I#/src -L%ssrc -lffado" % env['build_base'] )
if not e.GetOption( "clean" ):
if not env['SERIALIZE_USE_EXPAT']:
if 'LIBXML30_FLAGS' in env :
e.MergeFlags( env['LIBXML30_FLAGS'].decode() )
if not('LIBXML30_FLAGS' in env) :
e.MergeFlags( env['LIBXML26_FLAGS'].decode() )
else:
e.PrependUnique( LIBS=["expat"] )
e.Command( "static_info.txt", "ffado-diag", "support/tools/ffado-diag --static > $TARGET" )
e.ScanReplace( "ffado-diag.in" )
e.Install( "$bindir", "ffado-diag" )
e.Install( "$libdatadir", "static_info.txt" )
if env['ENABLE_DICE']:
e.Program( target = "ffado-set-nickname", source = "ffado-set-nickname.cpp" )
e.Install( "$bindir", "ffado-set-nickname" )
# Install manpages in section 1
dest = os.path.join("$mandir", "man1", "ffado-diag.1")
env.InstallAs(source="ffado-diag.1", target=dest)
libffado-2.4.2/support/tools/ffado-diag.1 0000644 0001750 0000144 00000001624 13246707102 017601 0 ustar jwoithe users .TH FFADO\-DIAG 1 27\-Mar\-2012 "ffado\-diag"
.SH NAME
ffado\-diag \- print system diagnostic information related to FFADO.
\"
.SH SYNOPSIS
.BR ffado\-diag [\| \-\-static \||\| \-V \||\| \-\-version \||\| \-\-usage \|]
\"
.SH DESCRIPTION
.B ffado\-diag
prints out an extensive collection of diagnostic information about the
computer it is run on. Information included is the FFADO version number,
the version number of libraries which FFADO depends on, the firewire
interface card, interrupt usage, and so on. This is useful for developers
to know when giving support via the FFADO mailing lists. For anything other
than trivial issues, the output of
.B ffado\-diag
will be one of the first things asked fro when debugging a problem.
\"
.SH OPTIONS
.BR \-V ", " \-\-version
Display version information.
.B \-\-usage
Print a short usage message and exit.
.B \-\-static
Only display executable paths and libraries.
libffado-2.4.2/support/tools/ffado-diag.in 0000755 0001750 0000144 00000025131 13246707102 020051 0 ustar jwoithe users #!$PYTHON_INTERPRETER
# Dollar variables are preprocessed by SConscript at build time.
version_info = "FFADO diagnostic utility $VERSION$REVISIONSTRING"
copyright_info = """
(C) 2008 Pieter Palmers
2009-2010 Arnold Krille
2018 Nicolas Boulenguez, Jonathan Woithe
"""
static_info = "$LIBDATADIR/static_info.txt"
# 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, 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 .
# Test for common FFADO problems
import glob
import os.path
import re
import subprocess
import sys
# Prefer reproducible output with few non-ASCII characters.
os.environ ["LC_ALL"] = "C"
# Consistent formatting.
def show_pair (key, value):
# rstrip () for convenience, but do not assume that value is a string.
print ("{:25} {}".format (key, value).rstrip ())
def indent (lines):
print (" {}".format (lines.rstrip ().replace ("\n", "\n ")))
# Convenient shortcuts.
def stdout (*args):
return subprocess.check_output (args).decode ("utf8")
def which (command):
popen = subprocess.Popen (("which", command), stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = popen.communicate ()
if popen.returncode == 0:
return stdout.decode ("utf8").rstrip ()
elif popen.returncode == 1:
return None
else:
print (stderr)
sys.exit (1)
# Parse command line.
usage = """Usage: ffado-diag [--static | -V | --version | --usage]
--static Only display executable paths and libraries.
-V, --version Display version information.
--usage Print a short usage message and exit."""
if len (sys.argv) == 1:
static_option = False
elif len (sys.argv) == 2:
if sys.argv [1] == "--static":
static_option = True
elif sys.argv [1] in ("-V", "--version"):
print (version_info)
sys.exit (0)
elif sys.argv [1] == "--usage":
print (usage)
sys.exit (0)
else:
print (usage)
sys.exit (1)
else:
print (usage)
sys.exit (1)
if not(static_option):
print (version_info)
print (copyright_info)
for command in ("gcc", "g++", "pyuic4", "pyuic5"):
path = which (command)
show_pair (command, path)
if path:
version = stdout (path, "--version")
show_pair ('', version [:version.find ("\n")])
# jackd --version exits with a non-zero status (tested with jackd 1.9.10).
path = which ("jackd")
show_pair ("jackd", path)
if path:
popen = subprocess.Popen ((path, "--version"), stdout=subprocess.PIPE)
version, _ = popen.communicate ()
version = version.decode ("utf8")
show_pair ('', version [:version.find ("\n")])
pkg_config = which ("pkg-config")
show_pair ("pkg-config", pkg_config)
if pkg_config:
for lib in ("jack", "libraw1394", "libavc1394", "libiec61883", "libxml++-2.6", "dbus-1"):
if subprocess.call ((pkg_config, "--exists", lib)):
show_pair (lib, "not found")
else:
show_pair (lib, stdout (pkg_config, "--modversion", lib))
show_pair ('', stdout (pkg_config, "--cflags", "--libs", lib))
# If the "static" command line argument has been given, stop here.
# Else, attempt to display static_info.txt and go on.
if static_option:
sys.exit (0)
print ('')
show_pair ("Build time info", static_info)
try:
with open (static_info, "r" ) as f:
for line in f:
indent (line)
except:
indent ("Failed to read build time info.")
print ('')
kernel_version = stdout ("uname", "-r").rstrip ()
show_pair ("kernel version", kernel_version)
uname_v = stdout ("uname", "-v")
show_pair ("Preempt (low latency)", " PREEMPT " in uname_v and not " RT " in uname_v)
show_pair ("RT patched", "PREEMPT RT" in uname_v)
# Hint:
# The main parts of the rt patches are in mainline-kernels nowadays.
# Performance with stock kernels is sufficient...
fw_devices = glob.glob ("/dev/fw*")
show_pair ("/dev/fw*", fw_devices)
if fw_devices:
indent (stdout (*(["ls", "-lh"] + fw_devices)))
show_pair ("User IDs", stdout ("id"))
show_pair ("uname -a", stdout ("uname", "-a"))
lspci = which ("lspci")
if not lspci and os.path.exists ("/sbin/lspci"):
lspci = "/sbin/lspci"
show_pair ("lspci", lspci)
if lspci:
for m in re.findall ("^([^ ]*).*1394.*", stdout (lspci), re.MULTILINE):
indent (stdout (lspci, "-vv", "-nn", "-s", m))
lscpu = which ("lscpu")
show_pair ("lscpu", lscpu)
if lscpu:
indent (stdout (lscpu))
else:
print ("/proc/cpuinfo")
with open ("/proc/cpuinfo") as f:
for l in f:
indent (l)
######################################################################
class IRQ:
def __init__(self, number):
self.number = number
self.pid = ""
self.scheduling_class = ""
self.scheduling_priority = ""
self.drivers = ""
self.cpu_counts = ""
def description (self):
return "IRQ{:>4} PID{:>5} count{:>18} Sched{:>4} priority{:>4} drivers {}"\
.format (self.number, self.pid, self.cpu_counts, self.scheduling_class,
self.scheduling_priority, self.drivers)
class SoftIRQ:
def __init__(self, pid, scheduling_class, scheduling_priority, fullname):
self.pid = pid
self.fullname = fullname
self.scheduling_class = scheduling_class
self.scheduling_priority = scheduling_priority
def name (self):
return "{}-{}".format (self.fullname, self.pid)
def description (self):
return "SoftIRQ{:>12} PID{:>6} Sched{:>4} priority{:>4}) name softirq-{}"\
.format (self.name (), self.pid, self.scheduling_class,
self.scheduling_priority, self.fullname)
# get PID info
outtext = stdout ("ps", "-eLo", "pid,cmd,class,rtprio")
softIRQs = {}
for m in re.findall (r"^([0-9]+) +\[softirq-(.*)\] +([A-Z]+) +([-0-9]+)", outtext, re.MULTILINE):
irq = SoftIRQ (pid = m.group (1),
fullname = m.group (2),
scheduling_class = m.group (3),
scheduling_priority = m.group (4))
softIRQs [irq.name ()] = irq
IRQs = {}
for m in re.findall (r"^([0-9]+) +\[IRQ-([0-9]+)\] +([A-Z]{2}) +([-0-9]+)", outtext, re.MULTILINE):
irq = IRQ (number = int (m.group (2)))
IRQs [irq.number] = irq
irq.pid = m.group (1)
irq.scheduling_class = m.group (3)
irq.scheduling_priority = m.group (4)
# get irq info
regex_irq = re.compile (r"^ *([0-9]+): *((?:[0-9]+ +)+)(.*)$")
with open ("/proc/interrupts") as f:
for line in f:
m = regex_irq.search (line)
if m:
irq_number = int (m.group(1))
if irq_number in IRQs:
irq = IRQs [irq_number]
else:
irq = IRQ (number = irq_number)
IRQs [irq_number] = irq
irq.cpu_counts = ",".join (m.group (2).split ())
irq.drivers = ",".join (m.group (3).split ())
print ("\nHardware interrupts")
for _, irq in sorted (IRQs.items ()):
indent (irq.description ())
print ("\nSoftware interrupts")
for _, irq in sorted (softIRQs.items ()):
indent (irq.description ())
print ('')
######################################################################
def module_loaded (module_name, procfile):
with open (procfile) as f:
for l in f:
if module_name in l or module_name.replace ("-", "_") in l:
return True
return False
module_dir = "/lib/modules/" + kernel_version
show_pair ("module directory", module_dir)
class Stack:
def __init__ (self, modules, main_module):
self.present = True
self.loaded = True
for module_name in modules:
if module_name in stdout ("find", module_dir, "-name", module_name + ".ko"):
indent (module_name + " present")
else:
indent (module_name + " not present")
self.present = False
if module_loaded (module_name, "/proc/modules"):
indent (module_name + " loaded")
else:
indent (module_name + " not loaded")
self.loaded = False
self.active = self.loaded and module_loaded (main_module, "/proc/interrupts")
show_pair ("stack active", self.active)
self.statically_linked = not self.loaded and os.access ("/sys/module/" + main_module, os.F_OK)
show_pair ("statically linked", self.statically_linked)
print ("Old 1394 stack")
oldstack = Stack (("ieee1394", "ohci1394", "raw1394"), "ohci1394")
print ("New 1394 stack")
newstack = Stack (("firewire-core", "firewire-ohci"), "firewire-ohci")
print ("Kernel support:")
if (oldstack.loaded or oldstack.statically_linked) and \
(newstack.loaded or newstack.statically_linked):
indent ("""Both old and new FireWire kernel modules are loaded, your system
configuration is bogus.""")
sys.exit (1)
elif newstack.loaded or newstack.statically_linked:
indent ("""The new FireWire kernel stack is loaded.
If running a kernel earlier than 2.6.37 and problems are experienced, either
try with the old Firewire kernel stack or upgrade to a newer kernel
(preferrably 2.6.37 or later).""")
sys.exit (1)
elif oldstack.statically_linked:
indent ("[PASS] Kernel drivers statically linked into the kernel.")
elif not oldstack.present:
indent ("""FireWire kernel module(s) not found.
Please ensure that the raw1394 module is loaded.""")
sys.exit (1)
elif not oldstack.loaded:
indent ("""FireWire kernel stack not present.
Please compile the kernel with FireWire support.""")
sys.exit (1)
else:
indent ("[PASS] Kernel modules present and correctly loaded.")
######################################################################
print ("/dev/raw1394 devices:")
if not os.path.exists ("/dev/raw1394"):
indent ("""/dev/raw1394 device node not present.
Please fix your udev configuration or add it as a static node.""")
sys.exit (1)
try:
with open ("/dev/raw1394", "w"):
pass
except:
indent ("""Not enough permissions to access /dev/raw1394 device.
Please fix your udev configuration, the node permissions or
the user/group permissions.""")
sys.exit (1)
indent ("[PASS] /dev/raw1394 node present and accessible.")
libffado-2.4.2/support/tools/ffado-sandbox-install.py 0000644 0001750 0000144 00000033001 13246707102 022261 0 ustar jwoithe users #!/usr/bin/python
#
#
# Copyright (C) 2008 Pieter Palmers
#
# 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, 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 .
#
#
# A script to install FFADO in a 'sandbox', i.e. without changing the
# system installation.
#
import os.path
import shutil
import subprocess
try:
raw_input # Error in python3.
except:
raw_input = input
FFADOSBI_VERSION = '0.1'
LATEST_FFADO_RELEASE_URL = 'http://www.ffado.org/files/libffado-2.0-beta7.tar.gz'
LATEST_FFADO_RELEASE_UNPACK_DIR = 'libffado-2.0-beta7'
LATEST_JACK1_RELEASE_URL = 'http://jackaudio.org/downloads/jack-audio-connection-kit-0.109.2.tar.gz'
LATEST_JACK1_RELEASE_UNPACK_DIR = 'jack-audio-connection-kit-0.109.2'
def ask_for_dir(descr, suggestion):
ret_dir = None
while True:
ret_dir = raw_input("Please specify a %s directory [%s]: " % (descr, suggestion))
if ret_dir == "":
ret_dir = suggestion
if not os.path.exists(ret_dir):
try:
os.makedirs(ret_dir)
except:
yesno = raw_input("Could not create the %s directory. Try again? [yes/no] " % descr)
if yesno == "" or yesno[0] != 'y':
return None
else:
continue
break
else:
yesno = raw_input("WARNING: the %s directory at %s already exists. Do you want to overwrite it? [yes/no] " % (descr, ret_dir))
if yesno == "" or yesno[0] != 'y':
yesno = raw_input("Specify new %s directory? [yes/no] " % descr)
if yesno == "" or yesno[0] != 'y':
return None
else:
continue
else:
yesno = raw_input("WARNING: about to remove the old %s directory at %s. Proceed? [yes/no] " % (descr, ret_dir))
if yesno == "" or yesno[0] != 'y':
yesno = raw_input("Specify new %s directory? [yes/no] " % descr)
if yesno == "" or yesno[0] != 'y':
return None
else:
continue
else:
shutil.rmtree (ret_dir)
os.makedirs(ret_dir)
break
return ret_dir
def fetch_source(build_dir, source_descriptor, target):
logfile = "%s/%s.log" % (build_dir, target)
with open (logfile, 'w') as log:
if source_descriptor[1] == 'svn':
print( " Checking out SVN repository: %s" % source_descriptor[2] )
cwd = os.getcwd()
os.chdir(build_dir)
retval = subprocess.call (('svn', 'co', source_descriptor[2], target),
stdout=log)
os.chdir(cwd)
if retval:
print( " Failed to checkout the SVN repository. Inspect %s for details. (is subversion installed?)" % logfile )
return False
return True
elif source_descriptor[1] == 'tar.gz':
print( " Downloading tarball: %s" % source_descriptor[2] )
import urllib
tmp_file = '%s/tmp.tar.gz' % build_dir
try:
urllib.urlretrieve(source_descriptor[2], tmp_file)
except:
print( " Could not retrieve source tarball." )
return False
cwd = os.getcwd()
os.chdir(build_dir)
print( " extracting tarball..." )
retval = subprocess.call (('tar', '-zxf', tmp_file), stdout=log)
if retval:
print( " Failed to extract the source tarball. Inspect %s for details." % logfile )
os.chdir(cwd)
return False
if source_descriptor[3]:
try:
os.rename (source_descriptor[3], target)
except:
print( " Failed to move the extracted tarball" )
os.chdir(cwd)
return False
os.chdir(cwd)
return True
else:
print( "bad source type" )
return False
welcome_msg = """
FFADO sandbox install utility """ + FFADOSBI_VERSION + """
=================================
(C) 2008 Pieter Palmers
This utility will automatically build and install a sandbox
environment that can be used to evaluate FFADO. The required
FFADO and/or jack packages are downloaded.
NOTE: The build dependencies are not automatically installed.
Please consult http://subversion.ffado.org/wiki/Dependencies
for more information. The subversion tool has to be installed.
NOTE: This tool assumes that an internet connection is available
while it runs. Once everything is built, no connection is
required.
You can exit the tool at any time using CTRL-C.
"""
print( welcome_msg )
# get the paths to be used
if 'HOME' in os.environ.keys():
suggestion_sandbox = "%s/ffadosandbox" % os.environ['HOME']
else:
suggestion_sandbox = "/home/myuser/ffadosandbox"
sandbox_dir_msg = """
SANDBOX DIRECTORY
=================
The sandbox directory is the directory where all built files are
installed into. It should be writable by your user, and will
contain the evaluation binaries if this tool is successful. If
it doesn't exist, it will be created.
Once you are finished with evaluating FFADO you can simply remove
this directory and things are as if nothing happened.
Suggestion: %s
NOTE: if you specify a system directory here, the tool will install
system-wide (if run as root). This is not recommended, but can be
useful for automated installs. Uninstall will be a lot harder though.
""" % suggestion_sandbox
if 'HOME' in os.environ.keys():
suggestion_build = "%s/ffadobuild" % os.environ['HOME']
else:
suggestion_build = "/home/myuser/ffadobuild"
build_dir_msg = """
BUILD DIRECTORY
===============
The build directory is where all temporary files are stored while
building FFADO and jack. It should be writable by your user. If
it doesn't exist, it will be created.
The build directory can be removed as soon as this tool has finished.
It is not automatically removed.
Suggestion: %s
""" % suggestion_build
print( sandbox_dir_msg )
sandbox_dir = ask_for_dir('sandbox', suggestion_sandbox)
if sandbox_dir == None:
print( "Cannot proceed without valid sandbox directory." )
exit(-1)
print(" using %s as sandbox directory" % sandbox_dir)
print( build_dir_msg )
build_dir = ask_for_dir('build', suggestion_build)
if build_dir == None:
print( "Cannot proceed without valid build directory." )
exit(-1)
print(" using %s as build directory" % build_dir)
# figure out what version of FFADO to build
# Note: format:
# ['title', type=svn or tar.gz, url, (optional) dir that contains target]
ffado_versions = {}
ffado_versions[0] = ['SVN trunk', 'svn', 'http://subversion.ffado.org/ffado/trunk/libffado', None]
ffado_versions[1] = ['SVN libffado-2.0 (recommended)', 'svn', 'http://subversion.ffado.org/ffado/branches/libffado-2.0', None]
ffado_versions[2] = ['latest release', 'tar.gz', LATEST_FFADO_RELEASE_URL, LATEST_FFADO_RELEASE_UNPACK_DIR]
ffado_versions_msg = """
Available FFADO versions:
"""
for key in sorted(ffado_versions.keys()):
ffado_versions_msg += " %2s: %s\n" % (key, ffado_versions[key][0])
print( ffado_versions_msg )
while True:
ffado_version = raw_input("Please select a FFADO version: ")
try:
ffado_version_int = int (ffado_version)
if ffado_version_int not in [0, 1, 2]:
raise
except:
yesno = raw_input("Invalid FFADO version specified. Try again? [yes/no] ")
if yesno == "" or yesno[0] != 'y':
print( "Cannot proceed without valid FFADO version." )
exit(-1)
else:
continue
break
use_ffado_version = ffado_versions[ffado_version_int]
# figure out what version of jack to build
jack_versions = {}
jack_versions[0] = ['jack1 SVN trunk', 'svn', 'http://subversion.jackaudio.org/jack/trunk/jack', None]
# note: latest release is no good.
#jack_versions[1] = ['jack1 latest release', 'tar.gz', LATEST_JACK1_RELEASE_URL, LATEST_JACK_RELEASE_UNPACK_DIR]
jack_versions_msg = """
Available jack versions:
"""
for key in sorted(jack_versions.keys()):
jack_versions_msg += " %2s: %s\n" % (key, jack_versions[key][0])
print( jack_versions_msg )
while True:
jack_version = raw_input("Please select a jack version: ")
try:
jack_version_int = int (jack_version)
if jack_version_int not in [0, 1, 2]:
raise
except:
yesno = raw_input("Invalid jack version specified. Try again? [yes/no] ")
if yesno == "" or yesno[0] != 'y':
print( "Cannot proceed without valid jack version." )
exit(-1)
else:
continue
break
use_jack_version = jack_versions[jack_version_int]
# print( a summary )
print( """ )
SUMMARY
=======
Sandbox directory : %s
Build directory : %s
FFADO version : %s
Jack version : %s
""" % (sandbox_dir, build_dir, use_ffado_version[0], use_jack_version[0])
# get the ffado source
print( "Fetching FFADO source..." )
if not fetch_source(build_dir, use_ffado_version, 'libffado'):
print( "Could not fetch FFADO source" )
exit(-1)
print( " Successfully fetched FFADO source" )
print( "Fetching jack source..." )
if not fetch_source(build_dir, use_jack_version, 'jack'):
print( "Could not fetch jack source" )
exit(-1)
print( " Successfully fetched jack source" )
cwd = os.getcwd()
ffado_log = "%s/ffadobuild.log" % build_dir
ffado_scons_options = ("-j2",) # TODO: interactive config of the build
with open (ffado_log, 'w') as log:
# configure FFADO
os.chdir("%s/libffado/" % build_dir)
print( "Building FFADO..." )
print( " Compiling..." )
if subprocess.call (('scons', 'PREFIX="' + sandbox_dir + '"') + ffado_scons_options,
stdout=log):
print( """ )
Failed to configure/build FFADO. Most likely this is due to uninstalled dependencies.
Check %s for details.
""" % ffado_log
exit(-1)
# install FFADO
print( " Installing into %s..." % sandbox_dir )
if subprocess.check_output (('scons', 'install'), stdout=log):
print( "Failed to install FFADO. Check %s for details." % ffado_log )
exit(-1)
# configure JACK
os.chdir("%s/jack/" % build_dir)
jack_log = "%s/jackbuild.log" % build_dir
with open (jack_log, 'w') as log:
log.write ('\n')
print( "Building Jack..." )
if use_jack_version[1] == 'svn':
print( " Initializing build system..." )
if subprocess.check_output (('./autogen.sh',), stdout=log):
print( """ )
Failed to initialize the jack build system. Most likely this is due to uninstalled dependencies.
Check %s for details.
""" % jack_log
exit(-1)
print( " Configuring build..." )
if subprocess.check_output (('./configure', '--prefix="' + sandbox_dir + '"'),
stdout=log):
print( """ )
Failed to configure the jack build. Most likely this is due to uninstalled dependencies.
Check %s for details.
""" % jack_log
exit(-1)
# build and install jack
print( " Compiling..." )
if subprocess.check_output (('make',), stdout=log):
print( "Failed to build jack. Check %s for details." % jack_log )
exit(-1)
print( " Installing into %s..." % sandbox_dir )
if subprocess.check_output (('make', 'install'), stdout=log):
print( "Failed to install jack. Check %s for details." % jack_log )
exit(-1)
# write the bashrc file
sandbox_bashrc = """
#!/bin/bash
#
LD_LIBRARY_PATH="%s/lib:$LD_LIBRARY_PATH"
PKG_CONFIG_PATH="%s/lib/pkgconfig:$PKG_CONFIG_PATH"
PATH="%s/bin:$PATH"
export LD_LIBRARY_PATH
export PKG_CONFIG_PATH
export PATH
""" % (sandbox_dir, sandbox_dir, sandbox_dir)
print( "Writing shell configuration file..." )
sandbox_rc_file = "%s/ffado.rc" % sandbox_dir
try:
with open (sandbox_rc_file, "w") as fid:
fid.write(sandbox_bashrc)
except:
print( "Could not write the sandbox rc file." )
exit(-1)
os.chdir(cwd)
print( """ )
FFADO and jack are installed into %s. If you want to use the
versions in the sandbox, you have to alter your environment
such that it uses them instead of the system versions.
If you use the bash shell (or compatible) you can use the following
rc script: %s. The procedure to use the sandboxed ffado+jack would be:
$ source %s
$ jackd -R -d firewire
If you don't use the bash shell, you have to alter your environment
manually. Look at the %s script for inspiration.
Note that you have to source the settings script for every terminal
you open. If you want a client application to use the sandboxed jack
you have to source the settings.
E.g.:
terminal 1:
$ source %s
$ jackd -R -d firewire
terminal 2:
$ source %s
$ ardour2
terminal 3:
$ source %s
$ qjackctl &
$ hydrogen
If you want to use the sandboxed version as default, you have to ensure
that the default environment is changed. This can be done e.g. by adding
the settings script to ~/.bashrc.
The build directory %s can now be deleted. To uninstall this sandbox, delete
the %s directory.
""" % (sandbox_dir, sandbox_rc_file, sandbox_rc_file, \
sandbox_rc_file, sandbox_rc_file, sandbox_rc_file, \
sandbox_rc_file, build_dir, sandbox_dir)
libffado-2.4.2/support/tools/ffado-set-nickname.cpp 0000644 0001750 0000144 00000013451 12503644023 021673 0 ustar jwoithe users /*
* Copyright (C) 2005-2008 by Pieter Palmers
* Copyright (C) 2005-2008 by Daniel Wagner
* Copyright (C) 2012 Bent Bisballe Nyeng
*
* This file is part of FFADO
* FFADO = Free Firewire (pro-)audio drivers for linux
*
* FFADO is based upon FreeBoB
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
#include "config.h"
#include "devicemanager.h"
#include "dice/dice_avdevice.h"
using namespace Dice;
#include
#include
#include
#include
#include
#include
int run;
static void sighandler(int sig)
{
run = 0;
}
using namespace std;
using namespace Util;
DECLARE_GLOBAL_DEBUG_MODULE;
#define MAX_ARGS 1000
////////////////////////////////////////////////
// arg parsing
////////////////////////////////////////////////
const char *argp_program_version = "ffado-set-nickname 0.1";
const char *argp_program_bug_address = "";
static char doc[] = "ffado-set-nickname -- Set device nickname from commandline.";
static char args_doc[] = "NODE_ID";
static struct argp_option options[] = {
{"nickname", 'N', "NICKNAME", 0, "Set device nickname" },
{"verbose", 'v', "LEVEL", 0, "Produce verbose output" },
{"port", 'p', "PORT", 0, "Set port" },
{"node", 'n', "NODE", 0, "Set node" },
{ 0 }
};
struct arguments
{
arguments()
: nargs ( 0 )
, verbose( -1/*DEBUG_LEVEL_MESSAGE*/ )
, port( -1 )
, node( -1 )
, counts( -1 )
{
args[0] = 0;
}
char* args[MAX_ARGS];
int nargs;
int verbose;
int port;
int node;
int counts;
std::string nickname;
} arguments;
// Parse a single option.
static error_t
parse_opt( int key, char* arg, struct argp_state* state )
{
// Get the input argument from `argp_parse', which we
// know is a pointer to our arguments structure.
struct arguments* arguments = ( struct arguments* ) state->input;
char* tail;
errno = 0;
switch (key) {
case 'v':
arguments->verbose = strtol(arg, &tail, 0);
break;
case 'p':
arguments->port = strtol(arg, &tail, 0);
if (errno) {
perror("argument parsing failed:");
return errno;
}
break;
case 'n':
arguments->node = strtol(arg, &tail, 0);
if (errno) {
perror("argument parsing failed:");
return errno;
}
break;
case 'N':
arguments->nickname = arg;
break;
case ARGP_KEY_ARG:
if (state->arg_num >= MAX_ARGS) {
// Too many arguments.
argp_usage (state);
}
arguments->args[state->arg_num] = arg;
arguments->nargs++;
break;
case ARGP_KEY_END:
if(arguments->nargs<0) {
printf("not enough arguments\n");
return -1;
}
break;
default:
return ARGP_ERR_UNKNOWN;
}
return 0;
}
static struct argp argp = { options, parse_opt, args_doc, doc };
///////////////////////////
// main
//////////////////////////
int
main(int argc, char **argv)
{
run=1;
signal (SIGINT, sighandler);
signal (SIGPIPE, sighandler);
// arg parsing
if ( argp_parse ( &argp, argc, argv, 0, 0, &arguments ) ) {
printMessage("Could not parse command line\n" );
exit(-1);
}
errno = 0;
DeviceManager *m_deviceManager = new DeviceManager();
if ( !m_deviceManager ) {
printMessage("Could not allocate device manager\n" );
return -1;
}
if ( arguments.verbose ) {
m_deviceManager->setVerboseLevel(arguments.verbose);
}
if ( !m_deviceManager->initialize() ) {
printMessage("Could not initialize device manager\n" );
delete m_deviceManager;
return -1;
}
char s[1024];
if(arguments.node > -1) {
snprintf(s, 1024, "hw:%d,%d", arguments.port, arguments.node);
if ( !m_deviceManager->addSpecString(s) ) {
printMessage("Could not add spec string %s to device manager\n", s );
delete m_deviceManager;
return -1;
}
} else {
snprintf(s, 1024, "hw:%d", arguments.port);
if ( !m_deviceManager->addSpecString(s) ) {
printMessage("Could not add spec string %s to device manager\n", s );
delete m_deviceManager;
return -1;
}
}
if ( !m_deviceManager->discover(false) ) {
printMessage("Could not discover devices\n" );
delete m_deviceManager;
return -1;
}
if(m_deviceManager->getAvDeviceCount() == 0) {
printMessage("No devices found\n");
delete m_deviceManager;
return -1;
}
Dice::Device* avDevice = dynamic_cast(m_deviceManager->getAvDeviceByIndex(0));
if(avDevice == NULL) {
printMessage("Device is not a DICE device\n" );
delete m_deviceManager;
return -1;
}
if(arguments.nickname != "") {
printf("Setting nickname to '%s'\n", arguments.nickname.c_str());
avDevice->setNickname(arguments.nickname);
} else {
printf("Nickname: '%s'\n", avDevice->getNickname().c_str());
}
// cleanup
delete m_deviceManager;
return 0;
}
libffado-2.4.2/support/tools/.gitignore 0000644 0001750 0000144 00000000056 12132617070 017521 0 ustar jwoithe users ffado-diag
ffado-set-nickname
static_info.txt
libffado-2.4.2/support/xdg/ 0000755 0001750 0000144 00000000000 13541343162 015155 5 ustar jwoithe users libffado-2.4.2/support/xdg/ffado-mixer.appdata.xml 0000644 0001750 0000144 00000002236 13246707102 021514 0 ustar jwoithe users
ffado.org-ffadomixer.desktop
CC0-1.0
GPL-2.0 OR GPL-3.0
ffado-mixer
A graphical front-end for the FFADO mixer DBus controls exposed by ffado-dbus-server
ffado-mixer presents a graphical application allowing a firewire audio interface to be controlled.
The extent of the control is determined by the level of support for the
device in FFADO and in ffado-dbus-server.
Typical controls offered by ffado-mixer include faders for the on-board mixer,
phantom power control, mode switches and so on.
http://ffado.org/appdata/ffado-mixer-screenshot.png
Example of main ffado-mixer window.
http://ffado.org/
ffado-devel@lists.sourceforge.net
libffado-2.4.2/support/xdg/ffado.org-ffadomixer.desktop 0000644 0001750 0000144 00000001050 13246707102 022533 0 ustar jwoithe users [Desktop Entry]
Name=FFADO Mixer
Name[ru]=Микшер FFADO
Name[fr]=Mixeur FFADO
Comment=Audio mixer for Firewire devices
Comment[ru]=Микшер для звуковых устройств с интерфейсом Firewire
Comment[fr]=Mixeur audio pour les interfaces firewire
Exec=ffado-mixer
GenericName=Firewire audio mixer
GenericName[ru]=Звуковой микшер Firewire
GenericName[fr]=Mixeur audio Firewire
Icon=hi64-apps-ffado
Type=Application
Categories=Mixer;Audio;AudioVideo;HardwareSettings;Qt;
Keywords=Firewire;Sound Interface;
libffado-2.4.2/support/xdg/hi64-apps-ffado.png 0000644 0001750 0000144 00000007270 10767260611 020465 0 ustar jwoithe users PNG
IHDR @ @ iq sRGB bKGD pHYs U tIME /O` 8IDATx{\}?>>ݵ.F6PZS<
HiJiR
%@զHIHD(R5TB p (1~,zYs^Ts~5QjTըF5QjT#%"Nztto?$5H]
'H{,
_s|9lȌPp@kPlhTT8JE3R2Q81U*YL*9_^O)Uo=d}zBRzNӶM*G<2
s/a]"ϑF' ̾WI&X(,`b7(~/ÖT#oYK\A1إked69_Z "z rut+Θ6X"*~$#IQo"eZz4[p}=E[%DZ?{BkZ ~dr)0ctC`hNOG/ pوA :U$q֔]Btf d:,>'zp2
u1sdvX&^w(Rʁ:8Jz:_|? 76Y2'm]GǓop+#F&*1j'AJTT%+6Y )/r!|uMcaN*][5LKb̎cX]?ˁ/<DDo[[kJ$ 8Jd|_3R0c!4$ *,t^ F8BXF+i_Һ^.~|%D/PP,hFJz5z
=m%~Y#\#4&ꥁ A4\沦{ߺKQIXϏ~tӸkrs~67L>~݃XI#\QϺ(GHLoѰ!4K#%
QB[3 '/3.}+К@.x`H=;#k9ogw㵷T
$}Ol1I2(^=͒\ϳxQ H,U`$Ns{oy
n#)nzfM۸r"|u?) 9[8
-4~ns!~rDkGK@'*DZux8!5˟D-=ss'6jG7qX<WB_ƙ f5N=ٓ)DSY=s/OFτ!O0+> U4r N|UXG]G5m|
?Gi]wLj;O0;xޣccVҊm/éeEҷ8tPVy&8&4< ̹?[