VirtualBox

Changeset 34818 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 8, 2010 6:35:19 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: Implementation of WALCLK register. fixes with Ubuntu 10.10 issue.

File:
1 edited

Legend:

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

    r34460 r34818  
    433433    CODECState  Codec;
    434434    uint8_t     u8Counter;
     435    uint64_t    u64BaseTS;
    435436} INTELHDLinkState, *PINTELHDLinkState;
    436437
     
    461462DECLCALLBACK(int)hdaRegReadGCAP(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value);
    462463DECLCALLBACK(int)hdaRegReadINTSTS(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value);
     464DECLCALLBACK(int)hdaRegReadWALCLK(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value);
    463465DECLCALLBACK(int)hdaRegWriteINTSTS(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t pu32Value);
    464466DECLCALLBACK(int)hdaRegWriteCORBWP(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t pu32Value);
     
    530532    { 0x00020, 0x00004, 0xC00000FF, 0xC00000FF, hdaRegReadU32          , hdaRegWriteU32          , "INTCTL"    , "Interrupt Control" },
    531533    { 0x00024, 0x00004, 0xC00000FF, 0x00000000, hdaRegReadINTSTS       , hdaRegWriteUnimplemented, "INTSTS"    , "Interrupt Status" },
    532     //** @todo r=michaln: Are guests really not reading the WALCLK register at all?
    533     { 0x00030, 0x00004, 0xFFFFFFFF, 0x00000000, hdaRegReadUnimplemented, hdaRegWriteUnimplemented, "WALCLK"    , "Wall Clock Counter" },
     534    { 0x00030, 0x00004, 0xFFFFFFFF, 0x00000000, hdaRegReadWALCLK, hdaRegWriteUnimplemented, "WALCLK"    , "Wall Clock Counter" },
    534535    //** @todo r=michaln: Doesn't the SSYNC register need to actually stop the stream(s)?
    535536    { 0x00034, 0x00004, 0x000000FF, 0x000000FF, hdaRegReadU32          , hdaRegWriteU32          , "SSYNC"     , "Stream Synchronization" },
     
    996997    v |= v ? RT_BIT(31) : 0;
    997998    *pu32Value = v;
     999    return VINF_SUCCESS;
     1000}
     1001
     1002DECLCALLBACK(int)hdaRegReadWALCLK(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value)
     1003{
     1004    *pu32Value = (uint32_t)((RTTimeNanoTS() - pState->u64BaseTS) * 24) / 100;
    9981005    return VINF_SUCCESS;
    9991006}
     
    19391946    else
    19401947        pThis->hda.pu64RirbBuf = (uint64_t *)RTMemAllocZ(pThis->hda.cbRirbBuf);
     1948
     1949    pThis->hda.u64BaseTS = RTTimeNanoTS();
    19411950
    19421951#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