VirtualBox

Changeset 34824 in vbox


Ignore:
Timestamp:
Dec 8, 2010 10:31:22 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: WALCLK emulation uses virtual time source, math fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp

    r34819 r34824  
    2626#include <iprt/mem.h>
    2727#include <iprt/asm.h>
     28#include <iprt/asm-math.h>
    2829
    2930#include "../Builtins.h"
     
    10021003DECLCALLBACK(int)hdaRegReadWALCLK(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value)
    10031004{
    1004     *pu32Value = (uint32_t)((RTTimeNanoTS() - pState->u64BaseTS) * 24) / 100;
     1005    *pu32Value = (uint32_t)ASMMultU64ByU32DivByU32(PDMDevHlpTMTimeVirtGetNano(ICH6_HDASTATE_2_DEVINS(pState) - pState->u64BaseTS), 24, 1000);
    10051006    return VINF_SUCCESS;
    10061007}
     
    19471948        pThis->hda.pu64RirbBuf = (uint64_t *)RTMemAllocZ(pThis->hda.cbRirbBuf);
    19481949
    1949     pThis->hda.u64BaseTS = RTTimeNanoTS();
     1950    pThis->hda.u64BaseTS = PDMDevHlpTMTimeVirtGetNano(pDevIns);
    19501951
    19511952#if 0
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette