VirtualBox

Changeset 69946 in vbox


Ignore:
Timestamp:
Dec 6, 2017 9:35:18 AM (7 years ago)
Author:
vboxsync
Message:

Audio/HDA: Logging.

File:
1 edited

Legend:

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

    r69921 r69946  
    721721    uint32_t cbToProcess = RT_MIN(pStream->State.cbTransferSize - pStream->State.cbTransferProcessed,
    722722                                  pStream->State.cbTransferChunk);
     723
     724    Log3Func(("[SD%RU8] cbToProcess=%RU32, cbToProcessMax=%RU32\n", pStream->u8SD, cbToProcess, cbToProcessMax));
     725
     726    if (cbToProcess > cbToProcessMax)
     727    {
     728        if (pStream->State.Cfg.enmDir == PDMAUDIODIR_IN)
     729            LogRelMax2(64, ("HDA: Warning: FIFO underflow for stream #%RU8 (still %RU32 bytes needed)\n",
     730                            pStream->u8SD, cbToProcess - cbToProcessMax));
     731        else
     732            LogRelMax2(64, ("HDA: Warning: FIFO overflow for stream #%RU8 (%RU32 bytes outstanding)\n",
     733                            pStream->u8SD, cbToProcess - cbToProcessMax));
     734
     735        LogFunc(("[SD%RU8] Warning: Limiting transfer (cbToProcess=%RU32, cbToProcessMax=%RU32)\n",
     736                 pStream->u8SD, cbToProcess, cbToProcessMax));
     737
     738        /* Never process more than a stream currently can handle. */
     739        cbToProcess = cbToProcessMax;
     740    }
     741
    723742    uint32_t cbProcessed = 0;
    724743    uint32_t cbLeft      = cbToProcess;
    725744    Assert(cbLeft % HDA_FRAME_SIZE == 0);
    726 
    727     if (cbToProcess > cbToProcessMax)
    728         LogRel2(("HDA: More data to process\n"));
    729 
    730     Log3Func(("[SD%RU8] cbToProcess=%RU32\n", pStream->u8SD, cbToProcess));
    731745
    732746    uint8_t abChunk[HDA_FIFO_MAX + 1];
     
    781795            if (cbDMAToWrite)
    782796            {
    783                 LogRel2(("HDA: FIFO underflow for stream #%RU8 (%RU32 bytes outstanding)\n", pStream->u8SD, cbDMAToWrite));
    784 
    785797                Assert(cbChunk == cbDMAWritten + cbDMAToWrite);
    786798                memset((uint8_t *)abChunk + cbDMAWritten, 0, cbDMAToWrite);
     
    806818                if (cbDMALeft > RTCircBufFree(pCircBuf))
    807819                {
    808                     LogRel2(("HDA: FIFO overflow for stream #%RU8 (%RU32 bytes outstanding)\n",
    809                              pStream->u8SD, cbDMALeft - RTCircBufFree(pCircBuf)));
    810 
    811820                    /* Try to read as much as possible. */
    812821                    cbDMALeft = (uint32_t)RTCircBufFree(pCircBuf);
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