diff --git a/mythtv/libs/libmythtv/darwinfirewiredevice.cpp b/mythtv/libs/libmythtv/darwinfirewiredevice.cpp
index 58224c9..c2e966d 100644
a
|
b
|
|
17 | 17 | #include <IOKit/firewire/IOFireWireLibIsoch.h> |
18 | 18 | #include <IOKit/firewire/IOFireWireFamilyCommon.h> |
19 | 19 | #include <IOKit/avc/IOFireWireAVCLib.h> |
| 20 | #include <CoreServices/CoreServices.h> // for EndianU32_BtoN() etc. |
20 | 21 | |
21 | 22 | // Std C++ headers |
22 | 23 | #include <algorithm> |
… |
… |
int DarwinFirewireDevice::GetMaxSpeed(void) |
375 | 376 | uint32_t val; |
376 | 377 | int ret = (*fw_handle)->ReadQuadlet( |
377 | 378 | fw_handle, dev, &addr, (UInt32*) &val, false, 0); |
| 379 | val = EndianU32_BtoN(val); |
378 | 380 | |
379 | 381 | return (ret == kIOReturnSuccess) ? (int)((val>>30) & 0x3) : -1; |
380 | 382 | } |
… |
… |
bool DarwinFirewireDevice::IsSTBStreaming(uint *fw_channel) |
400 | 402 | uint32_t val; |
401 | 403 | int ret = (*fw_handle)->ReadQuadlet( |
402 | 404 | fw_handle, dev, &addr, (UInt32*) &val, false, 0); |
| 405 | val = EndianU32_BtoN(val); |
403 | 406 | |
404 | 407 | if (ret != kIOReturnSuccess) |
405 | 408 | return false; |
… |
… |
bool DarwinFirewireDevice::UpdatePlugRegisterPrivate( |
714 | 717 | { |
715 | 718 | return false; |
716 | 719 | } |
| 720 | old_plug_val = EndianU32_BtoN(old_plug_val); |
717 | 721 | |
718 | 722 | int old_plug_cnt = (old_plug_val >> 24) & 0x3f; |
719 | 723 | int old_fw_chan = (old_plug_val >> 16) & 0x3f; |
… |
… |
bool DarwinFirewireDevice::UpdatePlugRegisterPrivate( |
758 | 762 | new_plug_val &= ~(0x03<<14); |
759 | 763 | new_plug_val |= (new_speed & 0x03) << 14; |
760 | 764 | |
| 765 | old_plug_val = EndianU32_NtoB(old_plug_val); |
| 766 | new_plug_val = EndianU32_NtoB(new_plug_val); |
| 767 | |
761 | 768 | return (kIOReturnSuccess == (*fw_handle)->CompareSwap( |
762 | 769 | fw_handle, dev, &addr, old_plug_val, new_plug_val, false, 0)); |
763 | 770 | } |