def get_clock_src(self): plugs = self.__get_clock_plugs() dst = plugs['input'] src = AvcCcm.get_signal_source(self.fcp, dst) addr = AvcCcm.parse_signal_addr(plugs['output']) if AvcCcm.compare_addrs(src, addr): return 'Internal' for name, addr in self.__CLOCK_SRCS.items(): if AvcCcm.compare_addrs(src, AvcCcm.parse_signal_addr(addr)): return name raise OSError('Unexpected state of device.')
def get_clock_source(self): dst = AvcCcm.get_subunit_signal_addr('music', 0, 1) curr = AvcCcm.get_signal_source(self.unit.fcp, dst) for name, addr in self.__clocks.items(): if AvcCcm.compare_addrs(curr, AvcCcm.parse_signal_addr(addr)): return name