1 from PyQt4
.QtCore
import SIGNAL
, QObject
, Qt
2 from PyQt4
.QtGui
import QSizePolicy
, QHBoxLayout
, QVBoxLayout
, QGroupBox
3 from PyQt4
.QtGui
import QWidget
, QTabWidget
, QLabel
, QSlider
, QToolButton
5 from ffado
.config
import *
8 log
= logging
.getLogger('MAudioBeBoB')
10 class MAudio_BeBoB_Input_Widget(QWidget
):
11 def __init__(self
, parent
=None):
12 QWidget
.__init
__(self
, parent
)
13 uicLoad("ffado/mixer/maudio_bebob_input", self
)
15 class MAudio_BeBoB_Output_Widget(QWidget
):
16 def __init__(self
, parent
=None):
17 QWidget
.__init
__(self
, parent
)
18 uicLoad("ffado/mixer/maudio_bebob_output", self
)
21 class MAudio_BeBoB(QWidget
):
22 def __init__(self
, parent
=None):
23 QWidget
.__init
__(self
, parent
)
26 0x0000000a: (0, "Ozonic"),
27 0x00010062: (1, "Firewire Solo"),
28 0x00010060: (2, "Firewire Audiophile"),
29 0x00010046: (3, "Firewire 410"),
30 0x00010071: (4, "Firewire 1814"),
31 0x00010091: (4, "ProjectMix I/O"),
36 "inputs": ("Analog 1/2", "Analog 3/4",
37 "Stream 1/2", "Stream 3/4"),
38 "mixers": ("Mixer 1/2", "Mixer 3/4"),
39 "outputs": ("Analog 1/2", "Analog 3/4")
42 "inputs": ("Analog 1/2", "Digital 1/2",
43 "Stream 1/2", "Stream 3/4"),
44 "mixers": ("Mixer 1/2", "Mixer 3/4"),
45 "outputs": ("Analog 1/2", "Digital 1/2")
48 "inputs": ("Analog 1/2", "Digital 1/2",
49 "Stream 1/2", "Stream 3/4", "Stream 5/6"),
50 "mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Aux 1/2"),
51 "outputs": ("Analog 1/2", "Analog 3/4", "Digital 1/2",
55 "inputs": ("Analog 1/2", "Digital 1/2",
56 "Stream 1/2", "Stream 3/4", "Stream 5/6",
57 "Stream 7/8", "Stream 9/10"),
58 "mixers": ("Mixer 1/2", "Mixer 3/4", "Mixer 5/6", "Mixer 7/8",
59 "Mixer 9/10", "Aux 1/2"),
60 "outputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
61 "Digital 1/2", "Headphone 1/2")
64 "inputs": ("Analog 1/2", "Analog 3/4", "Analog 5/6", "Analog 7/8",
65 "Stream 1/2", "Stream 3/4", "S/PDIF 1/2",
66 "ADAT 1/2", "ADAT 3/4", "ADAT 5/6", "ADAT 7/8"),
67 "mixers": ("Mixer 1/2", "Mixer 3/4", "Aux 1/2"),
68 "outputs": ("Analog 1/2", "Analog 3/4",
69 "Headphone 1/2", "Headphone 3/4")
73 # hardware inputs and stream playbacks
74 # format: function_id/channel_idx/panning-able
75 # NOTE: function_id = channel_idx = panning-able = labels["inputs"]
78 (0x03, 0x04, 0x01, 0x02),
79 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
80 (True, True, False, False)
83 (0x01, 0x02, 0x04, 0x03),
84 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
85 (True, True, False, False)
88 (0x04, 0x05, 0x01, 0x02, 0x03),
89 ((0x01, 0x02), (0x01, 0x02),
90 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
91 (True, True, False, False, False)
94 (0x03, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01),
95 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
96 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08)),
97 (True, True, False, False, False, False, False)
100 (0x01, 0x02, 0x03, 0x04, 0x0a, 0x0b, 0x05, 0x06, 0x07, 0x08, 0x09),
101 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
102 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
103 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
104 (True, True, True, True, False, False, True,
105 True, True, True, True)
109 # jack sources except for headphone
110 # format: function_id/source id
111 # NOTE: "function_id" = labels["output"] - "Headphone 1/2/3/4"
112 # NOTE: "source_id" = labels["mixer"]
117 (0x00, 0x00, 0x00, 0x01)),
118 ((0x02, 0x03, 0x04, 0x05, 0x06),
119 (0x00, 0x00, 0x00, 0x00, 0x00, 0x01)),
125 # format: sink id/source id
126 # NOTE: "source_id" = labels["mixer"]
131 (0x00, 0x01, 0x02, 0x03)),
133 (0x02, 0x03, 0x04, 0x05, 0x06, 0x07)),
139 # format: function id
140 # NOTE: "function_id" = labels["output"]
144 (0x0c, 0x0d, 0x0e, 0x0f),
145 (0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f),
146 (0x0c, 0x0d, 0x0f, 0x10)
149 # Mixer inputs/outputs
150 # format: function_id/out_stereo_channel_id/in_id/in_stereo_channel_id
151 # NOTE: function_id = out_stereo_channel_id = labels["mixers"]
152 # NOTE: in_id = in_stereo_channel_id = labels["inputs"]
156 ((0x01, 0x02), (0x01, 0x02)),
157 (0x02, 0x03, 0x00, 0x01),
158 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
162 ((0x01, 0x02), (0x03, 0x04)),
163 (0x00, 0x01, 0x03, 0x02),
164 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
167 (0x01, 0x02, 0x03, 0x04),
168 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
169 (0x03, 0x04, 0x00, 0x01, 0x02),
170 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
171 (0x01, 0x02), (0x01, 0x02))
174 (0x01, 0x01, 0x01, 0x01, 0x01, 0x07),
175 ((0x01, 0x02), (0x03, 0x04),
176 (0x05, 0x06), (0x07, 0x08), (0x09, 0x0a), (0x01, 0x02)),
177 (0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00),
178 ((0x01, 0x02), (0x01, 0x02),
179 (0x01, 0x02), (0x01, 0x02), (0x03, 0x04),
180 (0x05, 0x06), (0x07, 0x08))
184 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02)),
185 (0x01, 0x01, 0x01, 0x01,
187 0x04, 0x04, 0x04, 0x04),
188 ((0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08),
189 (0x01, 0x02), (0x03, 0x04), (0x01, 0x02),
190 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
194 # Aux mixer inputs/outputs
195 # format: function_id/input_id/input_stereo_channel_id
196 # NOTE: input_id = labels["inputs"]
202 (0x09, 0x0a, 0x06, 0x07, 0x08),
203 ((0x01, 0x02), (0x01, 0x02),
204 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
208 (0x07, 0x08, 0x06, 0x05, 0x05, 0x05, 0x05),
209 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
210 (0x01, 0x02), (0x03, 0x04), (0x05, 0x06), (0x07, 0x08))
214 (0x13, 0x14, 0x15, 0x16, 0x11, 0x12, 0x17, 0x18, 0x19, 0x1a, 0x1b),
215 ((0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
216 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02),
217 (0x01, 0x02), (0x01, 0x02), (0x01, 0x02), (0x01, 0x02))
221 def getDisplayTitle(self
):
222 model
= self
.configrom
.getModelId()
223 return self
.info
[model
][1]
225 def buildMixer(self
):
233 model
= self
.configrom
.getModelId()
234 if model
not in self
.info
:
237 self
.id = self
.info
[model
][0]
239 tabs_layout
= QHBoxLayout(self
)
240 tabs
= QTabWidget(self
)
242 self
.addInputTab(tabs
)
244 if self
.aux
[self
.id] is not None:
246 self
.addOutputTab(tabs
)
248 tabs_layout
.addWidget(tabs
)
251 def addInputTab(self
, tabs
):
252 tab_input
= QWidget(self
)
253 tabs
.addTab(tab_input
, "In")
255 tab_input_layout
= QHBoxLayout()
256 tab_input
.setLayout(tab_input_layout
)
258 in_labels
= self
.labels
[self
.id]["inputs"]
259 in_ids
= self
.inputs
[self
.id][0]
260 in_pan
= self
.inputs
[self
.id][2]
262 for i
in range(len(in_ids
)):
263 l_idx
= self
.inputs
[self
.id][1][i
][0]
264 r_idx
= self
.inputs
[self
.id][1][i
][1]
266 widget
= MAudio_BeBoB_Input_Widget(tab_input
)
267 tab_input_layout
.addWidget(widget
)
269 widget
.name
.setText(in_labels
[i
])
271 self
.Volumes
[widget
.l_sld
] = (
272 "/Mixer/Feature_Volume_%d" % in_ids
[i
], l_idx
,
276 self
.Volumes
[widget
.r_sld
] = (
277 "/Mixer/Feature_Volume_%d" % in_ids
[i
], r_idx
,
281 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
284 widget
.l_pan
.setDisabled(True)
285 widget
.r_pan
.setDisabled(True)
287 self
.Pannings
[widget
.l_pan
] = (
288 "/Mixer/Feature_LRBalance_%d" % in_ids
[i
],
291 self
.Pannings
[widget
.r_pan
] = (
292 "/Mixer/Feature_LRBalance_%d" % in_ids
[i
],
296 tab_input_layout
.addStretch()
299 def addMixTab(self
, tabs
):
300 tab_mix
= QWidget(self
)
301 tabs
.addTab(tab_mix
, "Mix")
303 tab_layout
= QHBoxLayout()
304 tab_mix
.setLayout(tab_layout
)
306 in_labels
= self
.labels
[self
.id]["inputs"]
307 in_idxs
= self
.inputs
[self
.id][0]
309 mix_labels
= self
.labels
[self
.id]["mixers"]
310 mix_idxs
= self
.mixers
[self
.id][0]
312 for i
in range(len(mix_idxs
)):
313 if mix_labels
[i
] == 'Aux 1/2':
316 grp
= QGroupBox(tab_mix
)
317 grp_layout
= QVBoxLayout()
318 grp
.setLayout(grp_layout
)
319 tab_layout
.addWidget(grp
)
322 grp_layout
.addWidget(label
)
324 label
.setText(mix_labels
[i
])
325 label
.setAlignment(Qt
.AlignCenter
)
326 label
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
328 for j
in range(len(in_idxs
)):
329 mix_in_id
= self
.mixers
[self
.id][2][j
]
331 button
= QToolButton(grp
)
332 grp_layout
.addWidget(button
)
334 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
335 button
.setText('%s In' % in_labels
[j
])
336 button
.setCheckable(True)
338 self
.Mixers
[button
] = (
339 "/Mixer/EnhancedMixer_%d" % mix_idxs
[i
],
343 grp_layout
.addStretch()
344 tab_layout
.addStretch()
346 def addAuxTab(self
, tabs
):
348 def addLinkButton(parent
, layout
):
349 button
= QToolButton(parent
)
350 layout
.addWidget(button
)
351 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
352 button
.setText('Link')
353 button
.setCheckable(True)
355 def addMuteButton(parent
, layout
):
356 button
= QToolButton(parent
)
357 layout
.addWidget(button
)
358 button
.setSizePolicy(QSizePolicy
.Expanding
, QSizePolicy
.Minimum
)
359 button
.setText('Mute')
360 button
.setCheckable(True)
364 tab_aux
= QWidget(self
)
365 tabs
.addTab(tab_aux
, "Aux")
367 layout
= QHBoxLayout()
368 tab_aux
.setLayout(layout
)
370 aux_label
= self
.labels
[self
.id]["mixers"][-1]
371 aux_id
= self
.aux
[self
.id][0]
373 aux_in_labels
= self
.labels
[self
.id]["inputs"]
374 aux_in_ids
= self
.aux
[self
.id][1]
376 for i
in range(len(aux_in_ids
)):
377 in_ch_l
= self
.aux
[self
.id][2][i
][0]
378 in_ch_r
= self
.aux
[self
.id][2][i
][1]
380 grp
= QGroupBox(tab_aux
)
381 grp_layout
= QVBoxLayout()
382 grp
.setLayout(grp_layout
)
383 layout
.addWidget(grp
)
386 grp_layout
.addWidget(label
)
387 label
.setText("%s\nIn" % aux_in_labels
[i
])
388 label
.setAlignment(Qt
.AlignCenter
)
390 grp_sld
= QGroupBox(grp
)
391 grp_sld_layout
= QHBoxLayout()
392 grp_sld
.setLayout(grp_sld_layout
)
393 grp_layout
.addWidget(grp_sld
)
395 l_sld
= QSlider(grp_sld
)
396 grp_sld_layout
.addWidget(l_sld
)
397 r_sld
= QSlider(grp_sld
)
398 grp_sld_layout
.addWidget(r_sld
)
400 button
= addLinkButton(grp
, grp_layout
)
401 self
.Volumes
[l_sld
] = (
402 "/Mixer/Feature_Volume_%d" % aux_in_ids
[i
], in_ch_l
,
406 self
.Volumes
[r_sld
] = (
407 "/Mixer/Feature_Volume_%d" % aux_in_ids
[i
], in_ch_r
,
412 button
= addMuteButton(grp
, grp_layout
)
413 self
.Mutes
[button
] = (l_sld
, r_sld
)
415 grp
= QGroupBox(tab_aux
)
416 grp_layout
= QVBoxLayout()
417 grp
.setLayout(grp_layout
)
418 layout
.addWidget(grp
)
421 grp_layout
.addWidget(label
)
422 label
.setText("%s\nOut" % aux_label
)
423 label
.setAlignment(Qt
.AlignCenter
)
425 grp_sld
= QGroupBox(grp
)
426 grp_sld_layout
= QHBoxLayout()
427 grp_sld
.setLayout(grp_sld_layout
)
428 grp_layout
.addWidget(grp_sld
)
430 l_sld
= QSlider(grp_sld
)
431 grp_sld_layout
.addWidget(l_sld
)
432 r_sld
= QSlider(grp_sld
)
433 grp_sld_layout
.addWidget(r_sld
)
435 button
= addLinkButton(grp
, grp_layout
)
436 self
.Volumes
[l_sld
] = (
437 "/Mixer/Feature_Volume_%d" % aux_id
, 1,
441 self
.Volumes
[r_sld
] = (
442 "/Mixer/Feature_Volume_%d" % aux_id
, 2,
447 button
= addMuteButton(grp
, grp_layout
)
448 self
.Mutes
[button
] = (l_sld
, r_sld
)
452 def addOutputTab(self
, tabs
):
453 tab_out
= QWidget(self
)
454 tabs
.addTab(tab_out
, "Out")
456 layout
= QHBoxLayout()
457 tab_out
.setLayout(layout
)
459 out_labels
= self
.labels
[self
.id]["outputs"]
460 out_ids
= self
.outputs
[self
.id]
462 mixer_labels
= self
.labels
[self
.id]["mixers"]
464 if self
.jack_src
[self
.id] is None:
465 for i
in range(len(out_ids
)):
466 label
= QLabel(tab_out
)
467 layout
.addWidget(label
)
468 label
.setText("%s Out is fixed to %s Out" %
469 (mixer_labels
[i
], out_labels
[i
]))
472 mixer_ids
= self
.jack_src
[self
.id][1]
475 for i
in range(len(out_ids
)):
476 out_label
= out_labels
[i
]
477 if out_label
.find('Headphone') >= 0:
480 out_id
= self
.jack_src
[self
.id][0][i
]
482 widget
= MAudio_BeBoB_Output_Widget(tab_out
)
483 layout
.addWidget(widget
)
485 widget
.name
.setText(out_label
)
487 self
.Volumes
[widget
.l_sld
] = (
488 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 1,
492 self
.Volumes
[widget
.r_sld
] = (
493 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 2,
497 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
499 self
.Selectors
[widget
.cmb_src
] = ("/Mixer/Selector_%d" % out_id
, )
501 for j
in range(len(mixer_ids
)):
502 if i
!= j
and j
!= len(mixer_ids
) - 1:
504 widget
.cmb_src
.addItem("%s Out" % mixer_labels
[j
], mixer_ids
[j
])
508 for i
in range(len(out_ids
)):
509 out_label
= out_labels
[i
]
510 if out_label
.find('Headphone') < 0:
513 hp_label
= self
.labels
[self
.id]["outputs"][i
]
514 hp_id
= self
.hp_src
[self
.id][0][hp_idx
]
517 mixer_labels
= self
.labels
[self
.id]["mixers"]
519 widget
= MAudio_BeBoB_Output_Widget(tab_out
)
520 layout
.addWidget(widget
)
522 widget
.name
.setText(hp_label
)
524 mixer_labels
= self
.labels
[self
.id]["mixers"]
525 mixer_ids
= self
.mixers
[self
.id][0]
527 self
.Volumes
[widget
.l_sld
] = (
528 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 1,
532 self
.Volumes
[widget
.r_sld
] = (
533 "/Mixer/Feature_Volume_%d" % out_ids
[i
], 2,
537 self
.Mutes
[widget
.mute
] = (widget
.l_sld
, widget
.r_sld
)
539 for i
in range(len(mixer_ids
)):
540 widget
.cmb_src
.addItem("%s Out" % mixer_labels
[i
], mixer_ids
[i
])
543 self
.Selectors
[widget
.cmb_src
] = ("/Mixer/Selector_%d" % hp_id
, )
545 QObject
.connect(widget
.cmb_src
, SIGNAL('activated(int)'),
547 self
.FW410HP
= widget
.cmb_src
551 def initValues(self
):
552 for ctl
, params
in self
.Selectors
.items():
554 state
= self
.hw
.getDiscrete(path
)
555 ctl
.setCurrentIndex(state
)
556 QObject
.connect(ctl
, SIGNAL('activated(int)'), self
.updateSelector
)
558 # Right - Center - Left
559 # 0x8000 - 0x0000 - 0x0001 - 0x7FFE
560 # ..., -1, 0, +1, ...
561 for ctl
, params
in self
.Pannings
.items():
564 curr
= self
.hw
.getContignuous(path
, idx
)
565 state
= -(curr
/ 0x7FFE) * 50 + 50
567 QObject
.connect(ctl
, SIGNAL('valueChanged(int)'),
570 for ctl
, params
in self
.Volumes
.items():
576 db
= self
.hw
.getContignuous(path
, idx
)
577 vol
= self
.db2vol(db
)
579 QObject
.connect(ctl
, SIGNAL('valueChanged(int)'), self
.updateVolume
)
581 # to activate link button, a pair is checked twice, sign...
582 pair_db
= self
.hw
.getContignuous(path
, p_idx
)
584 link
.setChecked(True)
586 for ctl
, params
in self
.Mutes
.items():
587 QObject
.connect(ctl
, SIGNAL('clicked(bool)'), self
.updateMute
)
589 for ctl
, params
in self
.Mixers
.items():
592 mix_in_idx
= params
[2]
593 mix_out_idx
= params
[3]
594 in_ch_l
= self
.mixers
[self
.id][3][mix_in_idx
][0]
595 out_ch_l
= self
.mixers
[self
.id][1][mix_out_idx
][0]
596 # see /libffado/src/bebob/bebob_mixer.cpp
597 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
598 curr
= self
.hw
.getContignuous(path
, mux_id
)
603 ctl
.setChecked(state
)
604 QObject
.connect(ctl
, SIGNAL('clicked(bool)'), self
.updateMixer
)
610 def vol2db(self
, vol
):
611 return (log10(vol
+ 1) - 2) * 16384
613 def db2vol(self
, db
):
614 return pow(10, db
/ 16384 + 2) - 1
616 def getMultiplexedId(self
, in_id
, in_ch_l
, out_ch_l
):
617 # see /libffado/src/bebob/bebob_mixer.cpp
618 return (in_id
<< 8) |
(in_ch_l
<< 4) |
(out_ch_l
<< 0)
620 def updateSelector(self
, state
):
621 sender
= self
.sender()
622 path
= self
.Selectors
[sender
][0]
623 log
.debug("set %s to %d" % (path
, state
))
624 self
.hw
.setDiscrete(path
, state
)
626 def updatePanning(self
, state
):
627 sender
= self
.sender()
628 path
= self
.Pannings
[sender
][0]
629 idx
= self
.Pannings
[sender
][1]
630 value
= (state
- 50) * 0x7FFE / -50
631 log
.debug("set %s for %d to %d(%d)" % (path
, idx
, value
, state
))
632 self
.hw
.setContignuous(path
, value
, idx
)
634 def updateVolume(self
, vol
):
635 sender
= self
.sender()
636 path
= self
.Volumes
[sender
][0]
637 idx
= self
.Volumes
[sender
][1]
638 pair
= self
.Volumes
[sender
][2]
639 link
= self
.Volumes
[sender
][4]
641 db
= self
.vol2db(vol
)
642 log
.debug("set %s for %d to %d(%d)" % (path
, idx
, db
, vol
))
643 self
.hw
.setContignuous(path
, db
, idx
)
648 # device remeber gain even if muted
649 def updateMute(self
, state
):
650 sender
= self
.sender()
651 l_sld
= self
.Mutes
[sender
][0]
652 r_sld
= self
.Mutes
[sender
][1]
658 for w
in [l_sld
, r_sld
]:
659 path
= self
.Volumes
[w
][0]
660 self
.hw
.setContignuous(path
, db
)
663 def updateMixer(self
, checked
):
669 sender
= self
.sender()
670 path
= self
.Mixers
[sender
][0]
671 in_id
= self
.Mixers
[sender
][1]
672 mix_in_idx
= self
.Mixers
[sender
][2]
673 mix_out_idx
= self
.Mixers
[sender
][3]
674 in_ch_l
= self
.mixers
[self
.id][3][mix_in_idx
][0]
675 out_ch_l
= self
.mixers
[self
.id][1][mix_out_idx
][0]
677 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
679 log
.debug("set %s for 0x%04X(%d/%d/%d) to %d" %
680 (path
, mux_id
, in_id
, in_ch_l
, out_ch_l
, state
))
681 self
.hw
.setContignuous(path
, state
, mux_id
)
684 path
= "/Mixer/Selector_7"
685 sel
= self
.hw
.getDiscrete(path
)
691 path
= "/Mixer/EnhancedMixer_7"
696 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
697 state
= self
.hw
.getContignuous(path
, mux_id
)
698 if enbl
< 0 and state
== 0:
701 self
.hw
.setContignuous(path
, 0x8000, mux_id
)
702 # if inconsistency between Selector and Mixer, set AUX as default
704 self
.hw
.setDiscrete('/Mixer/Selector_7', 1)
707 self
.FW410HP
.setCurrentIndex(enbl
)
709 def update410HP(self
, state
):
710 # each output from mixer can be multiplexed in headphone
711 # but here they are exclusive because of GUI simpleness, sigh...
712 path
= "/Mixer/EnhancedMixer_7"
717 mux_id
= self
.getMultiplexedId(in_id
, in_ch_l
, out_ch_l
)
722 self
.hw
.setContignuous(path
, value
, mux_id
)
724 # Mixer/Aux is selectable exclusively
725 path
= "/Mixer/Selector_7"
727 self
.hw
.setDiscrete(path
, sel
)