- Timestamp:
- 03/22/09 16:21:53 (15 years ago)
- Files:
-
- branches/libffado-2.0/src/motu/motu_avdevice.cpp (modified) (4 diffs)
- branches/libffado-2.0/src/motu/motu_controls.cpp (modified) (2 diffs)
- branches/libffado-2.0/src/motu/motu_controls.h (modified) (2 diffs)
- branches/libffado-2.0/support/mixer-qt4/mixer_motu.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/src/motu/motu_avdevice.cpp
r1518 r1520 413 413 }; 414 414 415 const MatrixMixBus MixerBuses_896HD[] = { 416 {"Mix 1", 0x4000, }, 417 {"Mix 2", 0x4100, }, 418 {"Mix 3", 0x4200, }, 419 {"Mix 4", 0x4300, }, 420 }; 421 415 422 const MatrixMixChannel MixerChannels_896HD[] = { 416 423 {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, }, … … 455 462 }; 456 463 464 const MatrixMixBus MixerBuses_828Mk2[] = { 465 {"Mix 1", 0x4000, }, 466 {"Mix 2", 0x4100, }, 467 {"Mix 3", 0x4200, }, 468 {"Mix 4", 0x4300, }, 469 }; 470 471 const MatrixMixChannel MixerChannels_828Mk2[] = { 472 {"Analog 1", MOTU_CTRL_STD_CHANNEL, 0x0000, }, 473 {"Analog 2", MOTU_CTRL_STD_CHANNEL, 0x0004, }, 474 {"Analog 3", MOTU_CTRL_STD_CHANNEL, 0x0008, }, 475 {"Analog 4", MOTU_CTRL_STD_CHANNEL, 0x000c, }, 476 {"Analog 5", MOTU_CTRL_STD_CHANNEL, 0x0010, }, 477 {"Analog 6", MOTU_CTRL_STD_CHANNEL, 0x0014, }, 478 {"Analog 7", MOTU_CTRL_STD_CHANNEL, 0x0018, }, 479 {"Analog 8", MOTU_CTRL_STD_CHANNEL, 0x001c, }, 480 {"Mic 1", MOTU_CTRL_STD_CHANNEL, 0x0020, }, 481 {"Mic 2", MOTU_CTRL_STD_CHANNEL, 0x0024, }, 482 {"SPDIF 1", MOTU_CTRL_STD_CHANNEL, 0x0028, }, 483 {"SPDIF 2", MOTU_CTRL_STD_CHANNEL, 0x002c, }, 484 {"ADAT 1", MOTU_CTRL_STD_CHANNEL, 0x0030, }, 485 {"ADAT 2", MOTU_CTRL_STD_CHANNEL, 0x0034, }, 486 {"ADAT 3", MOTU_CTRL_STD_CHANNEL, 0x0038, }, 487 {"ADAT 4", MOTU_CTRL_STD_CHANNEL, 0x003c, }, 488 {"ADAT 5", MOTU_CTRL_STD_CHANNEL, 0x0040, }, 489 {"ADAT 6", MOTU_CTRL_STD_CHANNEL, 0x0044, }, 490 {"ADAT 7", MOTU_CTRL_STD_CHANNEL, 0x0048, }, 491 {"ADAT 8", MOTU_CTRL_STD_CHANNEL, 0x004c, }, 492 }; 493 457 494 const MixerCtrl MixerCtrls_828Mk2[] = { 458 495 {"Mix1/Mix_", "Mix 1 ", "", MOTU_CTRL_STD_MIX, 0x0c20, }, … … 486 523 487 524 const MotuMixer Mixer_828Mk2 = MOTUMIXER( 488 MixerCtrls_828Mk2, MixerBuses_ Traveler, MixerChannels_Traveler);525 MixerCtrls_828Mk2, MixerBuses_828Mk2, MixerChannels_828Mk2); 489 526 490 527 const MotuMixer Mixer_896HD = MOTUMIXER( 491 MixerCtrls_896HD, MixerBuses_ Traveler, MixerChannels_896HD);528 MixerCtrls_896HD, MixerBuses_896HD, MixerChannels_896HD); 492 529 493 530 /* The order of DevicesProperty entries must match the numeric order of the … … 801 838 result &= m_MixerContainer->addElement( 802 839 new InfoElement(*this, MOTU_INFO_SAMPLE_RATE, "Info/SampleRate", "Device sample rate", "")); 803 result &= m_MixerContainer->addElement(804 new InfoElement(*this, MOTU_INFO_HAS_MIC_INPUTS, "Info/HasMicInputs", "Device has mic inputs", ""));805 result &= m_MixerContainer->addElement(806 new InfoElement(*this, MOTU_INFO_HAS_AESEBU_INPUTS, "Info/HasAESEBUInputs", "Device has AES/EBU inputs", ""));807 result &= m_MixerContainer->addElement(808 new InfoElement(*this, MOTU_INFO_HAS_SPDIF_INPUTS, "Info/HasSPDIFInputs", "Device has SPDIF inputs", ""));809 result &= m_MixerContainer->addElement(810 new InfoElement(*this, MOTU_INFO_HAS_OPTICAL_SPDIF, "Info/HasOpticalSPDIF", "Device has Optical SPDIF", ""));811 840 812 841 if (!addElement(m_MixerContainer)) { branches/libffado-2.0/src/motu/motu_controls.cpp
r1506 r1520 1 1 /* 2 2 * Copyright (C) 2005-2008 by Pieter Palmers 3 * Copyright (C) 2008 by Jonathan Woithe3 * Copyright (C) 2008-2009 by Jonathan Woithe 4 4 * 5 5 * This file is part of FFADO … … 985 985 debugOutput(DEBUG_LEVEL_VERBOSE, "SampleRate: %d\n", res); 986 986 break; 987 case MOTU_INFO_HAS_MIC_INPUTS:988 /* Only the 828Mk2 has separate mic inputs. In time this may be989 * deduced by walking the port info array within the parent.990 */991 res = m_parent.m_motu_model == MOTU_MODEL_828mkII ? 1:0;992 debugOutput(DEBUG_LEVEL_VERBOSE, "Has mic inputs: %d\n", res);993 break;994 case MOTU_INFO_HAS_AESEBU_INPUTS:995 /* AES/EBU inputs are currently present on the Traveler and996 * 896HD. In time this may be deduced by walking the port info997 * array within the parent.998 */999 val = m_parent.m_motu_model;1000 res = (val==MOTU_MODEL_TRAVELER || val==MOTU_MODEL_896HD);1001 debugOutput(DEBUG_LEVEL_VERBOSE, "HasAESEBUInputs: %d\n", res);1002 break;1003 case MOTU_INFO_HAS_SPDIF_INPUTS:1004 /* SPDIF inputs are present on all supported models except the1005 * 896HD and the 8pre. In time this may be deduced by walking1006 * the port info array within the parent.1007 */1008 val = m_parent.m_motu_model;1009 res = (val!=MOTU_MODEL_8PRE && val!=MOTU_MODEL_896HD);1010 debugOutput(DEBUG_LEVEL_VERBOSE, "HasSPDIFInputs: %d\n", res);1011 break;1012 case MOTU_INFO_HAS_OPTICAL_SPDIF:1013 /* THe 896HD doesn't have optical SPDIF capability */1014 val = m_parent.m_motu_model;1015 res = (val != MOTU_MODEL_896HD);1016 debugOutput(DEBUG_LEVEL_VERBOSE, "HasOpticalSPDIF: %d\n", res);1017 break;1018 987 } 1019 988 return res; branches/libffado-2.0/src/motu/motu_controls.h
r1508 r1520 2 2 * Copyright (C) 2005-2008 by Daniel Wagner 3 3 * Copyright (C) 2005-2008 by Pieter Palmers 4 * Copyright (C) 2008 by Jonathan Woithe4 * Copyright (C) 2008-2009 by Jonathan Woithe 5 5 * 6 6 * This file is part of FFADO … … 95 95 #define MOTU_INFO_IS_STREAMING 0x00000002 96 96 #define MOTU_INFO_SAMPLE_RATE 0x00000003 97 #define MOTU_INFO_HAS_MIC_INPUTS 0x0000000498 #define MOTU_INFO_HAS_AESEBU_INPUTS 0x0000000599 #define MOTU_INFO_HAS_SPDIF_INPUTS 0x00000006100 #define MOTU_INFO_HAS_OPTICAL_SPDIF 0x00000007101 97 102 98 #define MOTU_CTRL_TRIMGAINPAD_MAX_CHANNEL 3 branches/libffado-2.0/support/mixer-qt4/mixer_motu.py
r1509 r1520 605 605 log.debug("device streaming flag: %d" % (self.is_streaming)) 606 606 607 # Retrieve other device settings as needed 607 # Retrieve other device settings as needed and customise the UI 608 # based on these options. 608 609 self.model = self.hw.getDiscrete('/Mixer/Info/Model') 609 610 log.debug("device model identifier: %d" % (self.model)) 610 611 self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate') 611 612 log.debug("device sample rate: %d" % (self.sample_rate)) 612 self.has_mic_inputs = self.hw.getDiscrete('/Mixer/Info/HasMicInputs') 613 log.debug("device has mic inputs: %d" % (self.has_mic_inputs))614 self.has_aesebu_inputs = self.hw.getDiscrete('/Mixer/Info/HasAESEBUInputs')615 log.debug("device has AES/EBU inputs: %d" % (self.has_aesebu_inputs))616 self.has_spdif_inputs = self.hw.getDiscrete('/Mixer/Info/HasSPDIFInputs')617 log.debug("device has SPDIF inputs: %d" % (self.has_spdif_inputs))618 self.has_optical_spdif = self.hw.getDiscrete('/Mixer/Info/HasOpticalSPDIF')619 log.debug("device has optical SPDIF: %d" % (self.has_optical_spdif))620 621 # Customise the UI based on device options retrieved622 if (self.has_mic_inputs):623 # Mic input controls displace AES/EBU since no current device624 # has both.613 614 # The 828Mk2 has separate Mic inputs but no AES/EBU, so use the 615 # AES/EBU mixer controls as "Mic" controls. If a device comes along 616 # with both mic and AES inputs this approach will have to be 617 # re-thought. 618 # Doing this means that on the 828Mk2, the mixer matrix elements 619 # used for AES/EBU on other models are used for the Mic channels. 620 # So long as the MixerChannels_828Mk2 definition in 621 # motu_avdevice.cpp defines the mic channels immediately after the 8 622 # analog channels we'll be right. Note that we don't need to change 623 # the matrix lookup tables (self.ChannelFaders etc) because the QT 624 # controls are still named *aesebu*. 625 if (self.model == MOTU_MODEL_828mkII): 625 626 self.mix1_tab.setTabText(1, "Mic inputs"); 626 627 self.mix2_tab.setTabText(1, "Mic inputs"); 627 628 self.mix3_tab.setTabText(1, "Mic inputs"); 628 629 self.mix4_tab.setTabText(1, "Mic inputs"); 629 # FIXME: when implemented, will mic channels just reuse the AES/EBU630 # dbus path? If not we'll have to reset the respective values in631 # the control arrays (self.ChannelFaders etc).632 630 else: 633 if (not(self.has_aesebu_inputs)): 631 # Only the Traveler and 896HD have AES/EBU inputs, so disable the AES/EBU 632 # tab for all other models. 633 if (self.model!=MOTU_MODEL_TRAVELER and self.model!=MOTU_MODEL_896HD): 634 634 self.mix1_tab.setTabEnabled(1, False) 635 635 self.mix2_tab.setTabEnabled(1, False) 636 636 self.mix3_tab.setTabEnabled(1, False) 637 637 self.mix4_tab.setTabEnabled(1, False) 638 if (not(self.has_spdif_inputs)): 638 639 # All models except the 896HD and 8pre have SPDIF inputs. 640 if (self.model==MOTU_MODEL_8PRE or self.model==MOTU_MODEL_896HD): 639 641 self.mix1_tab.setTabEnabled(2, False); 640 642 self.mix2_tab.setTabEnabled(2, False); … … 642 644 self.mix4_tab.setTabEnabled(2, False); 643 645 644 # Devices without AES/EBU inputs/outputs (normally ID 6 in the 645 # destination lists) have dedicated "MainOut" outputs instead. The 646 # 896HD is an exception: it uses ID 6 for MainOut and ID 7 647 # (nominally SPDIF) for AES/EBU. 648 if (not(self.has_aesebu_inputs) or self.model==MOTU_MODEL_896HD): 646 # Devices without AES/EBU inputs/outputs (currently all except the 647 # Traveler and 896HD) have dedicated "MainOut" outputs instead. 648 # AES/EBU is normally ID 6 in the destination lists and "MainOut" 649 # displaces it on non-AES/EBU models. The 896HD has both AES/EBU 650 # and MainOut which complicates this; it uses ID 6 for MainOut and 651 # ID 7 (nominally SPDIF) for AES/EBU. Therefore change ID 6 to 652 # "MainOut" for everything but the Traveler, and set ID 7 (nominally 653 # SPDIF) to AES/EBU for the 896HD. 654 if (self.model != MOTU_MODEL_TRAVELER): 649 655 self.mix1_dest.setItemText(6, "MainOut") 650 656 self.mix2_dest.setItemText(6, "MainOut") … … 652 658 self.mix4_dest.setItemText(6, "MainOut") 653 659 self.phones_src.setItemText(6, "MainOut") 654 # Change the SPDIF destination to AES/EBU for the 896HD.655 660 if (self.model == MOTU_MODEL_896HD): 656 661 self.mix1_dest.setItemText(7, "AES/EBU") … … 672 677 # Some devices don't have the option of selecting an optical SPDIF 673 678 # mode. 674 if (not(self.has_optical_spdif)): 679 # The 896HD doesn't have optical SPDIF (aka Toslink) capability 680 if (self.model == MOTU_MODEL_896HD): 675 681 self.optical_in_mode.removeItem(2) 676 682 self.optical_out_mode.removeItem(2)