VirtualBox

Changeset 73213 in vbox


Ignore:
Timestamp:
Jul 18, 2018 3:27:05 PM (7 years ago)
Author:
vboxsync
Message:

Audio/HDA: A bit of renaming / docs.

File:
1 edited

Legend:

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

    r73212 r73213  
    888888    {
    889889        if (pStream->State.Cfg.enmDir == PDMAUDIODIR_IN)
    890             LogRelMax2(64, ("HDA: Warning: FIFO underflow for stream #%RU8 (still %RU32 bytes needed)\n",
     890            LogRelMax2(64, ("HDA: Warning: DMA buffer underflow for stream #%RU8 (still %RU32 bytes needed)\n",
    891891                            pStream->u8SD, cbToProcess - cbToProcessMax));
    892892        else
    893             LogRelMax2(64, ("HDA: Warning: FIFO overflow for stream #%RU8 (%RU32 bytes outstanding)\n",
     893            LogRelMax2(64, ("HDA: Warning: DMA buffer overflow for stream #%RU8 (%RU32 bytes outstanding)\n",
    894894                            pStream->u8SD, cbToProcess - cbToProcessMax));
    895895
     
    977977            if (RT_SUCCESS(rc))
    978978            {
     979                const uint32_t cbDMAFree = (uint32_t)RTCircBufFree(pCircBuf);
     980
     981                if (cbDMAFree < cbDMA)
     982                    LogRelMax2(64, ("HDA: Warning: DMA buffer overflow of stream #%RU8 (discarding %RU32 bytes)\n",
     983                               pStream->u8SD, cbDMA - cbDMAFree));
     984
    979985#ifndef VBOX_WITH_HDA_AUDIO_INTERLEAVING_STREAMS_SUPPORT
    980986                /*
     
    988994                {
    989995                    uint32_t cbDMARead = 0;
    990                     uint32_t cbDMALeft = RT_MIN(cbDMA, (uint32_t)RTCircBufFree(pCircBuf));
     996                    uint32_t cbDMALeft = RT_MIN(cbDMA, cbDMAFree);
    991997
    992998                    while (cbDMALeft)
     
    10211027                    /** @todo Optimize this stuff -- copying only one frame a time is expensive. */
    10221028                    uint32_t cbDMARead = pStream->State.cbDMALeft ? pStream->State.cbFrameSize - pStream->State.cbDMALeft : 0;
    1023                     uint32_t cbDMALeft = RT_MIN(cbDMA, (uint32_t)RTCircBufFree(pCircBuf));
     1029                    uint32_t cbDMALeft = RT_MIN(cbDMA, cbDMAFree);
    10241030
    10251031                    while (cbDMALeft >= pStream->State.cbFrameSize)
     
    10431049                    Assert(pStream->State.cbDMALeft < pStream->State.cbFrameSize);
    10441050                }
    1045 
    1046                 const size_t cbFree = RTCircBufFree(pCircBuf);
    1047                 if (!cbFree)
    1048                     LogRel2(("HDA: FIFO of stream #%RU8 full, discarding audio data\n", pStream->u8SD));
    10491051#else
    10501052                /** @todo This needs making use of HDAStreamMap + HDAStreamChannel. */
     
    10641066        {
    10651067            /* We always increment the position of DMA buffer counter because we're always reading
    1066              * into an intermediate buffer. */
     1068             * into an intermediate DMA buffer. */
    10671069            pBDLE->State.u32BufOff += (uint32_t)cbDMA;
    10681070            Assert(pBDLE->State.u32BufOff <= pBDLE->Desc.u32BufSize);
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