From 9da78f14ad98c6fc56d29b2bbf6394cd0325a68e Mon Sep 17 00:00:00 2001 From: mocchi Date: Sun, 9 Mar 2014 12:58:13 +0000 Subject: [PATCH] BeBoB: add codes to mixer script for M-Audio Firewire 1814 and ProjectMix I/O With previous commit, ffado-dbus-server can handle these devices and exports paths as M-Audio normal drivers do. This commit adds codes for mixer scripts to support them. git-svn-id: svn+ssh://ffado.org/ffado/trunk@2492 2be59082-3212-0410-8809-b0798e1608f0 --- .../support/mixer-qt4/ffado/mixer/maudio_bebob.py | 51 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/libffado/support/mixer-qt4/ffado/mixer/maudio_bebob.py b/libffado/support/mixer-qt4/ffado/mixer/maudio_bebob.py index c30dd2f6..f2dfe084 100644 --- a/libffado/support/mixer-qt4/ffado/mixer/maudio_bebob.py +++ b/libffado/support/mixer-qt4/ffado/mixer/maudio_bebob.py @@ -25,6 +25,7 @@ class MAudio_BeBoB(QWidget): 0x00010062: [1, "Firewire Solo"], 0x00010060: [2, "Firewire Audiophile"], 0x00010046: [3, "Firewire 410"], + 0x00010071: [4, "fw1814/ProjectMix"], } labels = [ @@ -39,7 +40,12 @@ class MAudio_BeBoB(QWidget): "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"]} + "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 @@ -57,7 +63,16 @@ class MAudio_BeBoB(QWidget): [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]] + [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 @@ -70,7 +85,9 @@ class MAudio_BeBoB(QWidget): [[0x01, 0x02, 0x03], [0x00, 0x00, 0x00, 0x01]], [[0x02, 0x03, 0x04, 0x05, 0x06], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x01]] + [0x00, 0x00, 0x00, 0x00, 0x00, 0x01]], + [[0x03, 0x04], + [0x00, 0x01, 0x02]] ] # headphone sources @@ -82,7 +99,9 @@ class MAudio_BeBoB(QWidget): [[0x04], [0x00, 0x01, 0x02, 0x03]], [[0x07], - [0x02, 0x03, 0x04, 0x05, 0x06, 0x07]] + [0x02, 0x03, 0x04, 0x05, 0x06, 0x07]], + [[0x01, 0x02], + [0x01, 0x02, 0x04]] ] # hardware outputs @@ -92,7 +111,8 @@ class MAudio_BeBoB(QWidget): [0x05, 0x06], [0x02, 0x03], [0x0c, 0x0d, 0x0e, 0x0f], - [0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] + [0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f], + [0x0c, 0x0d, 0x0f, 0x10] ] # Mixer inputs/outputs @@ -115,7 +135,17 @@ class MAudio_BeBoB(QWidget): [[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], [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 @@ -129,7 +159,10 @@ class MAudio_BeBoB(QWidget): [[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]]] + [[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): @@ -378,13 +411,15 @@ class MAudio_BeBoB(QWidget): 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][0] + hp_id = self.hp_src[self.id][0][hp_idx] + hp_idx += 1 mixer_labels = self.labels[self.id]["mixers"] -- 2.11.4.GIT