1 from PyQt4
.QtCore
import SIGNAL
, QObject
, Qt
2 from PyQt4
.QtGui
import QWidget
, QHBoxLayout
, QVBoxLayout
, QTabWidget
, QGroupBox
, QLabel
, QSlider
, QToolButton
, QSizePolicy
4 from ffado
.config
import *
7 log
= logging
.getLogger('MAudioBeBoB')
9 class MAudio_BeBoB_Input_Widget(QWidget
):
10 def __init__(self
, parent
=None):
11 QWidget
.__init
__(self
, parent
)
12 uicLoad("ffado/mixer/maudio_bebob_input", self
)
14 class MAudio_BeBoB_Output_Widget(QWidget
):
15 def __init__(self
, parent
=None):
16 QWidget
.__init
__(self
, parent
)
17 uicLoad("ffado/mixer/maudio_bebob_output", self
)
20 class MAudio_BeBoB(QWidget
):
21 def __init__(self
, parent
=None):
22 QWidget
.__init
__(self
, parent
)
25 0x0000000a: (0, "Ozonic"),
26 0x00010062: (1, "Firewire Solo"),
27 0x00010060: (2, "Firewire Audiophile"),
28 0x00010046: (3, "Firewire 410"),
29 0x00010071: (4, "Firewire 1814"),
30 0x00010091: (4, "ProjectMix I/O"),
35 "inputs": ("Analog 1/2", "Analog 3/4",
36 "Stream 1/2", "Stream 3/4"),
37 "mixers": ("Mixer 1/2", "Mixer 3/4"),
38 "outputs": ("Analog 1/2", "Analog 3/4")
41 "inputs": ("Analog 1/2", "Digital 1/2",
42 "Stream 1/2", "Stream 3/4"),
43 "mixers": ("Mixer 1/2", "Mixer 3/4"),
44 "outputs": ("Analog 1/2", "Digital 1/2")
47 "inputs": ("Analog 1/2", "Digital 1/2",
48 "Stream 1/2", "Stream 3/4", "Stream 5/6"),
49 "mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Aux 1/2"),
50 "outputs": ("Analog 1/2", "Analog 3/4", "Digital 1/2",
54 "inputs": ("Analog 1/2", "Digital 1/2",
55 "Stream 1/2", "Stream 3/4", "Stream 5/6",
56 "Stream 7/8", "Stream 9/10"),
57 "mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Mixer 7/8",
58 "Mixer 9/10", "Aux 1/2"),
59 "outputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
60 "Digital 1/2", "Headphone 1/2")
63 "inputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
64 "Stream 1/2", "Stream 3/4", "S/PDIF 1/2",
65 "ADAT 1/2", "ADAT 3/4", "ADAT 5/6", "ADAT 7/8"),
66 "mixers": ("Mixer 1/2", "Mixer 3/4", "Aux 1/2"),
67 "outputs": ("Analog 1/2", "Analog 3/4",
68 "Headphone 1/2", "Headphone 3/4")
72 # hardware inputs and stream playbacks
73 # format: function_id/channel_idx/panning-able
74 # NOTE: function_id = channel_idx = panning-able = labels["inputs"]
77 (0x03, 0x04, 0x01, 0x02),
78 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
79 (True, True, False, False)
82 (0x01, 0x02, 0x04, 0x03),
83 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
84 (True, True, False, False)
87 (0x04, 0x05, 0x01, 0x02, 0x03),
88 ((0x01, 0x02), (0x01, 0x02),
89 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
90 (True, True, False, False, False)
93 (0x03, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01),
94 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
95 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08)),
96 (True, True, False, False, False, False, False)
99 (0x01, 0x02, 0x03, 0x04, 0x0a, 0x0b, 0x05, 0x06, 0x07, 0x08, 0x09),
100 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
101 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
102 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
103 (True, True, True, True, False, False, True,
104 True, True, True, True)
108 # jack sources except for headphone
109 # format: function_id/source id
110 # NOTE: "function_id" = labels["output"] - "Headphone 1/2/3/4"
111 # NOTE: "source_id" = labels["mixer"]
116 (0x00, 0x00, 0x00, 0x01)),
117 ((0x02, 0x03, 0x04, 0x05, 0x06),
118 (0x00, 0x00, 0x00, 0x00, 0x00, 0x01)),
124 # format: sink id/source id
125 # NOTE: "source_id" = labels["mixer"]
130 (0x00, 0x01, 0x02, 0x03)),
132 (0x02, 0x03, 0x04, 0x05, 0x06, 0x07)),
138 # format: function id
139 # NOTE: "function_id" = labels["output"]
143 (0x0c, 0x0d, 0x0e, 0x0f),
144 (0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f),
145 (0x0c, 0x0d, 0x0f, 0x10)
148 # Mixer inputs/outputs
149 # format: function_id/out_stereo_channel_id/in_id/in_stereo_channel_id
150 # NOTE: function_id = out_stereo_channel_id = labels["mixers"]
151 # NOTE: in_id = in_stereo_channel_id = labels["inputs"]
155 ((0x01, 0x02), (0x01, 0x02)),
156 (0x02, 0x03, 0x00, 0x01),
157 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
161 ((0x01, 0x02), (0x03, 0x04)),
162 (0x00, 0x01, 0x03, 0x02),
163 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
166 (0x01, 0x02, 0x03, 0x04),
167 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
168 (0x03, 0x04, 0x00, 0x01, 0x02),
169 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
170 (0x01, 0x02), (0x01, 0x02))
173 (0x01, 0x01, 0x01, 0x01, 0x01, 0x07),
174 ((0x01, 0x02), (0x03, 0x04),
175 (0x05, 0x06), (0x07, 0x08), (0x09, 0x0a), (0x01, 0x02)),
176 (0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00),
177 ((0x01, 0x02), (0x01, 0x02),
178 (0x01, 0x02), (0x01, 0x02), (0x03, 0x04),
179 (0x05, 0x06), (0x07, 0x08))
183 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
184 (0x01, 0x01, 0x01, 0x01,
186 0x04, 0x04, 0x04, 0x04),
187 ((0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08),
188 (0x01, 0x02), (0x03, 0x04), (0x01, 0x02),
189 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
193 # Aux mixer inputs/outputs
194 # format: function_id/input_id/input_stereo_channel_id
195 # NOTE: input_id = labels["inputs"]
201 (0x09, 0x0a, 0x06, 0x07, 0x08),
202 ((0x01, 0x02), (0x01, 0x02),
203 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
207 (0x07, 0x08, 0x06, 0x05, 0x05, 0x05, 0x05),
208 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
209 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
213 (0x13, 0x14, 0x15, 0x16, 0x11, 0x12, 0x17, 0x18, 0x19, 0x1a, 0x1b),
214 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
215 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
216 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
220 def getDisplayTitle(self
):
221 model
= self
.configrom
.getModelId()
222 return self
.info
[model
][1]
224 def buildMixer(self
):
232 model
= self
.configrom
.getModelId()
233 if model
not in self
.info
:
236 self
.id = self
.info
[model
][0]
238 tabs_layout
= QHBoxLayout(self
)
239 tabs
= QTabWidget(self
)
241 self
.addInputTab(tabs
)
243 if self
.aux
[self
.id] is not None:
245 self
.addOutputTab(tabs
)
247 tabs_layout
.addWidget(tabs
)
250 def addInputTab(self
, tabs
):
251 tab_input
= QWidget(self
)
252 tabs
.addTab(tab_input
, "In")
254 tab_input_layout
= QHBoxLayout()
255 tab_input
.setLayout(tab_input_layout
)
257 in_labels
= self
.labels
[self
.id]["inputs"]
258 in_ids
= self
.inputs
[self
.id][0]
259 in_pan
= self
.inputs
[self
.id][2]
261 for i
in range(len(in_ids
)):
262 l_idx
= self
.inputs
[self
.id][1][i
][0]
263 r_idx
= self
.inputs
[self
.id][1][i
][1]
265 widget
= MAudio_BeBoB_Input_Widget(tab_input
)
266 tab_input_layout
.addWidget(widget
)
268 widget
.name
.setText(in_labels
[i
])
270 self
.Volumes
[widget
.l_sld
] = (
271 "/Mixer/Feature_Volume_%d" % in_ids
[i
], l_idx
,
275 self
.Volumes
[widget
.r_sld
] = (
276 "/Mixer/Feature_Volume_%d" % in_ids
[i
], r_idx
,
280 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
283 widget
.l_pan
.setDisabled(True)
284 widget
.r_pan
.setDisabled(True)
286 self
.Pannings
[widget
.l_pan
] = (
287 "/Mixer/Feature_LRBalance_%d" % in_ids
[i
],
290 self
.Pannings
[widget
.r_pan
] = (
291 "/Mixer/Feature_LRBalance_%d" % in_ids
[i
],
295 tab_input_layout
.addStretch()
298 def addMixTab(self
, tabs
):
299 tab_mix
= QWidget(self
)
300 tabs
.addTab(tab_mix
, "Mix")
302 tab_layout
= QHBoxLayout()
303 tab_mix
.setLayout(tab_layout
)
305 in_labels
= self
.labels
[self
.id]["inputs"]
306 in_idxs
= self
.inputs
[self
.id][0]
308 mix_labels
= self
.labels
[self
.id]["mixers"]
309 mix_idxs
= self
.mixers
[self
.id][0]
311 for i
in range(len(mix_idxs
)):
312 if mix_labels
[i
] == 'Aux 1/2':
315 grp
= QGroupBox(tab_mix
)
316 grp_layout
= QVBoxLayout()
317 grp
.setLayout(grp_layout
)
318 tab_layout
.addWidget(grp
)
321 grp_layout
.addWidget(label
)
323 label
.setText(mix_labels
[i
])
324 label
.setAlignment(Qt
.AlignCenter
)
325 label
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
327 for j
in range(len(in_idxs
)):
328 mix_in_id
= self
.mixers
[self
.id][2][j
]
330 button
= QToolButton(grp
)
331 grp_layout
.addWidget(button
)
333 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
334 button
.setText('%s In' % in_labels
[j
])
335 button
.setCheckable(True)
337 self
.Mixers
[button
] = (
338 "/Mixer/EnhancedMixer_%d" % mix_idxs
[i
],
342 grp_layout
.addStretch()
343 tab_layout
.addStretch()
345 def addAuxTab(self
, tabs
):
347 def addLinkButton(parent
, layout
):
348 button
= QToolButton(parent
)
349 layout
.addWidget(button
)
350 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
351 button
.setText('Link')
352 button
.setCheckable(True)
354 def addMuteButton(parent
, layout
):
355 button
= QToolButton(parent
)
356 layout
.addWidget(button
)
357 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
358 button
.setText('Mute')
359 button
.setCheckable(True)
363 tab_aux
= QWidget(self
)
364 tabs
.addTab(tab_aux
, "Aux")
366 layout
= QHBoxLayout()
367 tab_aux
.setLayout(layout
)
369 aux_label
= self
.labels
[self
.id]["mixers"][-1]
370 aux_id
= self
.aux
[self
.id][0]
372 aux_in_labels
= self
.labels
[self
.id]["inputs"]
373 aux_in_ids
= self
.aux
[self
.id][1]
375 for i
in range(len(aux_in_ids
)):
376 in_ch_l
= self
.aux
[self
.id][2][i
][0]
377 in_ch_r
= self
.aux
[self
.id][2][i
][1]
379 grp
= QGroupBox(tab_aux
)
380 grp_layout
= QVBoxLayout()
381 grp
.setLayout(grp_layout
)
382 layout
.addWidget(grp
)
385 grp_layout
.addWidget(label
)
386 label
.setText("%s\nIn" % aux_in_labels
[i
])
387 label
.setAlignment(Qt
.AlignCenter
)
389 grp_sld
= QGroupBox(grp
)
390 grp_sld_layout
= QHBoxLayout()
391 grp_sld
.setLayout(grp_sld_layout
)
392 grp_layout
.addWidget(grp_sld
)
394 l_sld
= QSlider(grp_sld
)
395 grp_sld_layout
.addWidget(l_sld
)
396 r_sld
= QSlider(grp_sld
)
397 grp_sld_layout
.addWidget(r_sld
)
399 button
= addLinkButton(grp
, grp_layout
)
400 self
.Volumes
[l_sld
] = (
401 "/Mixer/Feature_Volume_%d" % aux_in_ids
[i
], in_ch_l
,
405 self
.Volumes
[r_sld
] = (
406 "/Mixer/Feature_Volume_%d" % aux_in_ids
[i
], in_ch_r
,
411 button
= addMuteButton(grp
, grp_layout
)
412 self
.Mutes
[button
] = (l_sld
, r_sld
)
414 grp
= QGroupBox(tab_aux
)
415 grp_layout
= QVBoxLayout()
416 grp
.setLayout(grp_layout
)
417 layout
.addWidget(grp
)
420 grp_layout
.addWidget(label
)
421 label
.setText("%s\nOut" % aux_label
)
422 label
.setAlignment(Qt
.AlignCenter
)
424 grp_sld
= QGroupBox(grp
)
425 grp_sld_layout
= QHBoxLayout()
426 grp_sld
.setLayout(grp_sld_layout
)
427 grp_layout
.addWidget(grp_sld
)
429 l_sld
= QSlider(grp_sld
)
430 grp_sld_layout
.addWidget(l_sld
)
431 r_sld
= QSlider(grp_sld
)
432 grp_sld_layout
.addWidget(r_sld
)
434 button
= addLinkButton(grp
, grp_layout
)
435 self
.Volumes
[l_sld
] = (
436 "/Mixer/Feature_Volume_%d" % aux_id
, 1,
440 self
.Volumes
[r_sld
] = (
441 "/Mixer/Feature_Volume_%d" % aux_id
, 2,
446 button
= addMuteButton(grp
, grp_layout
)
447 self
.Mutes
[button
] = (l_sld
, r_sld
)
451 def addOutputTab(self
, tabs
):
452 tab_out
= QWidget(self
)
453 tabs
.addTab(tab_out
, "Out")
455 layout
= QHBoxLayout()
456 tab_out
.setLayout(layout
)
458 out_labels
= self
.labels
[self
.id]["outputs"]
459 out_ids
= self
.outputs
[self
.id]
461 mixer_labels
= self
.labels
[self
.id]["mixers"]
463 if self
.jack_src
[self
.id] is None:
464 for i
in range(len(out_ids
)):
465 label
= QLabel(tab_out
)
466 layout
.addWidget(label
)
467 label
.setText("%s Out is fixed to %s Out" % (mixer_labels
[i
], out_labels
[i
]))
470 mixer_ids
= self
.jack_src
[self
.id][1]
473 for i
in range(len(out_ids
)):
474 out_label
= out_labels
[i
]
475 if out_label
.find('Headphone') >= 0:
478 out_id
= self
.jack_src
[self
.id][0][i
]
480 widget
= MAudio_BeBoB_Output_Widget(tab_out
)
481 layout
.addWidget(widget
)
483 widget
.name
.setText(out_label
)
485 self
.Volumes
[widget
.l_sld
] = (
486 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 1,
490 self
.Volumes
[widget
.r_sld
] = (
491 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 2,
495 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
497 self
.Selectors
[widget
.cmb_src
] = ("/Mixer/Selector_%d" % out_id
, )
499 for j
in range(len(mixer_ids
)):
500 if i
!= j
and j
!= len(mixer_ids
) - 1:
502 widget
.cmb_src
.addItem("%s Out" % mixer_labels
[j
], mixer_ids
[j
])
506 for i
in range(len(out_ids
)):
507 out_label
= out_labels
[i
]
508 if out_label
.find('Headphone') < 0:
511 hp_label
= self
.labels
[self
.id]["outputs"][i
]
512 hp_id
= self
.hp_src
[self
.id][0][hp_idx
]
515 mixer_labels
= self
.labels
[self
.id]["mixers"]
517 widget
= MAudio_BeBoB_Output_Widget(tab_out
)
518 layout
.addWidget(widget
)
520 widget
.name
.setText(hp_label
)
522 mixer_labels
= self
.labels
[self
.id]["mixers"]
523 mixer_ids
= self
.mixers
[self
.id][0]
525 self
.Volumes
[widget
.l_sld
] = (
526 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 1,
530 self
.Volumes
[widget
.r_sld
] = (
531 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 2,
535 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
537 for i
in range(len(mixer_ids
)):
538 widget
.cmb_src
.addItem("%s Out" % mixer_labels
[i
], mixer_ids
[i
])
541 self
.Selectors
[widget
.cmb_src
] = ("/Mixer/Selector_%d" % hp_id
)
543 QObject
.connect(widget
.cmb_src
, SIGNAL('activated(int)'), self
.update410HP
)
544 self
.FW410HP
= widget
.cmb_src
548 def initValues(self
):
549 for ctl
, params
in self
.Selectors
.items():
551 state
= self
.hw
.getDiscrete(path
)
552 ctl
.setCurrentIndex(state
)
553 QObject
.connect(ctl
, SIGNAL('activated(int)'), self
.updateSelector
)
555 # Right - Center - Left
556 # 0x8000 - 0x0000 - 0x0001 - 0x7FFE
557 # ..., -1, 0, +1, ...
558 for ctl
, params
in self
.Pannings
.items():
561 curr
= self
.hw
.getContignuous(path
, idx
)
562 state
= -(curr
/ 0x7FFE) * 50 + 50
564 QObject
.connect(ctl
, SIGNAL('valueChanged(int)'), self
.updatePanning
)
566 for ctl
, params
in self
.Volumes
.items():
572 db
= self
.hw
.getContignuous(path
, idx
)
573 vol
= self
.db2vol(db
)
575 QObject
.connect(ctl
, SIGNAL('valueChanged(int)'), self
.updateVolume
)
577 # to activate link button, a pair is checked twice, sign...
578 pair_db
= self
.hw
.getContignuous(path
, p_idx
)
580 link
.setChecked(True)
582 for ctl
, params
in self
.Mutes
.items():
583 QObject
.connect(ctl
, SIGNAL('clicked(bool)'), self
.updateMute
)
585 for ctl
, params
in self
.Mixers
.items():
588 mix_in_idx
= params
[2]
589 mix_out_idx
= params
[3]
590 in_ch_l
= self
.mixers
[self
.id][3][mix_in_idx
][0]
591 out_ch_l
= self
.mixers
[self
.id][1][mix_out_idx
][0]
592 # see /libffado/src/bebob/bebob_mixer.cpp
593 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
594 curr
= self
.hw
.getContignuous(path
, mux_id
)
599 ctl
.setChecked(state
)
600 QObject
.connect(ctl
, SIGNAL('clicked(bool)'), self
.updateMixer
)
606 def vol2db(self
, vol
):
607 return (log10(vol
+ 1) - 2) * 16384
609 def db2vol(self
, db
):
610 return pow(10, db
/ 16384 + 2) - 1
612 def getMultiplexedId(self
, in_id
, in_ch_l
, out_ch_l
):
613 # see /libffado/src/bebob/bebob_mixer.cpp
614 return (in_id
<< 8) |
(in_ch_l
<< 4) |
(out_ch_l
<< 0)
616 def updateSelector(self
, state
):
617 sender
= self
.sender()
618 path
= self
.Selectors
[sender
][0]
619 log
.debug("set %s to %d" % (path
, state
))
620 self
.hw
.setDiscrete(path
, state
)
622 def updatePanning(self
, state
):
623 sender
= self
.sender()
624 path
= self
.Pannings
[sender
][0]
625 idx
= self
.Pannings
[sender
][1]
626 value
= (state
- 50) * 0x7FFE / -50
627 log
.debug("set %s for %d to %d(%d)" % (path
, idx
, value
, state
))
628 self
.hw
.setContignuous(path
, value
, idx
)
630 def updateVolume(self
, vol
):
631 sender
= self
.sender()
632 path
= self
.Volumes
[sender
][0]
633 idx
= self
.Volumes
[sender
][1]
634 pair
= self
.Volumes
[sender
][2]
635 link
= self
.Volumes
[sender
][4]
637 db
= self
.vol2db(vol
)
638 log
.debug("set %s for %d to %d(%d)" % (path
, idx
, db
, vol
))
639 self
.hw
.setContignuous(path
, db
, idx
)
644 # device remeber gain even if muted
645 def updateMute(self
, state
):
646 sender
= self
.sender()
647 l_sld
= self
.Mutes
[sender
][0]
648 r_sld
= self
.Mutes
[sender
][1]
654 for w
in [l_sld
, r_sld
]:
655 path
= self
.Volumes
[w
][0]
656 self
.hw
.setContignuous(path
, db
)
659 def updateMixer(self
, checked
):
665 sender
= self
.sender()
666 path
= self
.Mixers
[sender
][0]
667 in_id
= self
.Mixers
[sender
][1]
668 mix_in_idx
= self
.Mixers
[sender
][2]
669 mix_out_idx
= self
.Mixers
[sender
][3]
670 in_ch_l
= self
.mixers
[self
.id][3][mix_in_idx
][0]
671 out_ch_l
= self
.mixers
[self
.id][1][mix_out_idx
][0]
673 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
675 log
.debug("set %s for 0x%04X(%d/%d/%d) to %d" % (path
, mux_id
, in_id
, in_ch_l
, out_ch_l
, state
))
676 self
.hw
.setContignuous(path
, state
, mux_id
)
679 path
= "/Mixer/Selector_7"
680 sel
= self
.hw
.getDiscrete(path
)
686 path
= "/Mixer/EnhancedMixer_7"
691 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
692 state
= self
.hw
.getContignuous(path
, mux_id
)
693 if enbl
< 0 and state
== 0:
696 self
.hw
.setContignuous(path
, 0x8000, mux_id
)
697 # if inconsistency between Selector and Mixer, set AUX as default
699 self
.hw
.setDiscrete('/Mixer/Selector_7', 1)
702 self
.FW410HP
.setCurrentIndex(enbl
)
704 def update410HP(self
, state
):
705 # each output from mixer can be multiplexed in headphone
706 # but here they are exclusive because of GUI simpleness, sigh...
707 path
= "/Mixer/EnhancedMixer_7"
712 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
717 self
.hw
.setContignuous(path
, value
, mux_id
)
719 # Mixer/Aux is selectable exclusively
720 path
= "/Mixer/Selector_7"
722 self
.hw
.setDiscrete(path
, sel
)