Changeset 1843
- Timestamp:
- 05/31/10 05:11:42 (2 years ago)
- Files:
-
- trunk/libffado/src/motu/motu_avdevice.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/motu/motu_avdevice.cpp
r1842 r1843 1490 1490 if (getDeviceGeneration() == MOTU_DEVICE_G3) { 1491 1491 unsigned int mask, enable, toslink; 1492 /* The Ultralite Mk3s don't have any optical ports. All others have 2. */ 1493 if (m_motu_model==MOTU_MODEL_ULTRALITEmk3 || m_motu_model==MOTU_MODEL_ULTRALITEmk3_HYB) { 1494 if (port_a_mode != NULL) 1495 *port_a_mode = MOTU_OPTICAL_MODE_NONE; 1496 if (port_b_mode != NULL) 1497 *port_b_mode = MOTU_OPTICAL_MODE_NONE; 1498 return 0; 1499 } 1492 1500 reg = ReadRegister(MOTU_G3_REG_OPTICAL_CTRL); 1493 1501 if (port_a_mode != NULL) { … … 1692 1700 1693 1701 switch (optical_mode_a) { 1702 case MOTU_OPTICAL_MODE_NONE: flags |= MOTU_PA_OPTICAL_ANY; break; 1694 1703 case MOTU_OPTICAL_MODE_OFF: flags |= MOTU_PA_OPTICAL_OFF; break; 1695 1704 case MOTU_OPTICAL_MODE_ADAT: flags |= MOTU_PA_OPTICAL_ADAT; break; … … 1707 1716 for (i=0; i < DevicesProperty[m_motu_model-1].n_port_entries; i++) { 1708 1717 port_flags = DevicesProperty[m_motu_model-1].port_entry[i].port_flags; 1709 /* Make sure the "port B" test returnstrue for devices without1710 * a port B.1718 /* Make sure the optical port tests return true for devices without 1719 * one or both optical ports. 1711 1720 */ 1721 if (optical_mode_a == MOTU_OPTICAL_MODE_NONE) { 1722 port_flags |= MOTU_PA_OPTICAL_ANY; 1723 } 1712 1724 if (optical_mode_b == MOTU_OPTICAL_MODE_NONE) { 1713 1725 port_flags |= MOTU_PA_MK3_OPT_B_ANY; … … 1775 1787 1776 1788 switch (optical_a_mode) { 1789 case MOTU_OPTICAL_MODE_NONE: flags |= MOTU_PA_OPTICAL_ANY; break; 1777 1790 case MOTU_OPTICAL_MODE_OFF: flags |= MOTU_PA_OPTICAL_OFF; break; 1778 1791 case MOTU_OPTICAL_MODE_ADAT: flags |= MOTU_PA_OPTICAL_ADAT; break; … … 1800 1813 for (i=0; i < DevicesProperty[m_motu_model-1].n_port_entries; i++) { 1801 1814 port_flags = DevicesProperty[m_motu_model-1].port_entry[i].port_flags; 1802 /* For devices without an optical port B ensure the test on the1803 * o ptical port B modealways returns "true".1815 /* For devices without one or more optical ports, ensure the tests 1816 * on the optical ports always returns "true". 1804 1817 */ 1818 if (optical_a_mode == MOTU_OPTICAL_MODE_NONE) 1819 port_flags |= MOTU_PA_OPTICAL_ANY; 1805 1820 if (optical_b_mode == MOTU_OPTICAL_MODE_NONE) 1806 1821 port_flags |= MOTU_PA_MK3_OPT_B_ANY;
