VirtualBox

Changeset 89847 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 23, 2021 8:47:54 AM (3 years ago)
Author:
vboxsync
Message:

DevHda: Some preprocessor indentation fixes. bugref:9890

File:
1 edited

Legend:

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

    r89845 r89847  
    7373    pStreamShared->State.fInReset = false;
    7474    pStreamShared->State.fRunning = false;
    75 #ifdef HDA_USE_DMA_ACCESS_HANDLER
     75# ifdef HDA_USE_DMA_ACCESS_HANDLER
    7676    RTListInit(&pStreamR3->State.lstDMAHandlers);
    77 #endif
     77# endif
    7878
    7979    AssertPtr(pStreamR3->pHDAStateR3);
    8080    AssertPtr(pStreamR3->pHDAStateR3->pDevIns);
    8181
    82 #ifdef DEBUG
     82# ifdef DEBUG
    8383    int rc = RTCritSectInit(&pStreamR3->Dbg.CritSect);
    8484    AssertRCReturn(rc, rc);
    85 #endif
     85# endif
    8686
    8787    const bool fIsInput = hdaGetDirFromSD(uSD) == PDMAUDIODIR_IN;
     
    178178    }
    179179
    180 #ifdef DEBUG
     180# ifdef DEBUG
    181181    if (RTCritSectIsInitialized(&pStreamR3->Dbg.CritSect))
    182182    {
     
    184184        AssertRC(rc2);
    185185    }
    186 #endif
     186# endif
    187187
    188188    if (pStreamR3->Dbg.Runtime.fEnabled)
     
    697697    hdaR3StreamSetPositionAbs(pStreamShared, pDevIns, pThis, HDA_STREAM_REG(pThis, LPIB, uSD));
    698698
    699 #ifdef LOG_ENABLED
     699# ifdef LOG_ENABLED
    700700    hdaR3BDLEDumpAll(pDevIns, pThis, pStreamShared->u64BDLBase, pStreamShared->u16LVI + 1);
    701 #endif
     701# endif
    702702
    703703    /*
     
    784784        LogRelMax(32, ("HDA: Initializing stream #%RU8 failed with %Rrc\n", uSD, rc));
    785785
    786 #ifdef VBOX_WITH_DTRACE
     786# ifdef VBOX_WITH_DTRACE
    787787    VBOXDD_HDA_STREAM_SETUP((uint32_t)uSD, rc, pStreamShared->State.Cfg.Props.uHz,
    788788                            pStreamShared->State.aSchedule[pStreamShared->State.cSchedule - 1].cPeriodTicks,
    789789                            pStreamShared->State.aSchedule[pStreamShared->State.cSchedule - 1].cbPeriod);
    790 #endif
     790# endif
    791791    return rc;
    792792}
     
    841841    HDA_STREAM_REG(pThis, BDPL,  uSD) = 0;
    842842
    843 #ifdef HDA_USE_DMA_ACCESS_HANDLER
     843# ifdef HDA_USE_DMA_ACCESS_HANDLER
    844844    hdaR3StreamUnregisterDMAHandlers(pThis, pStream);
    845 #endif
     845# endif
    846846
    847847    /* Assign the default mixer sink to the stream. */
     
    881881    pStreamR3->State.offRead  = 0;
    882882
    883 #ifdef DEBUG
     883# ifdef DEBUG
    884884    pStreamR3->Dbg.cReadsTotal      = 0;
    885885    pStreamR3->Dbg.cbReadTotal      = 0;
     
    890890    pStreamR3->Dbg.cbWrittenHz      = 0;
    891891    pStreamR3->Dbg.tsWriteSlotBegin = 0;
    892 #endif
     892# endif
    893893
    894894    /* Report that we're done resetting this stream. */
    895895    HDA_STREAM_REG(pThis, CTL,   uSD) = 0;
    896896
    897 #ifdef VBOX_WITH_DTRACE
     897# ifdef VBOX_WITH_DTRACE
    898898    VBOXDD_HDA_STREAM_RESET((uint32_t)uSD);
    899 #endif
     899# endif
    900900    LogFunc(("[SD%RU8] Reset\n", uSD));
    901901
     
    10241024
    10251025
    1026 #if 0 /* Not used atm. */
     1026# if 0 /* Not used atm. */
    10271027static uint32_t hdaR3StreamGetPosition(PHDASTATE pThis, PHDASTREAM pStreamShared)
    10281028{
    10291029    return HDA_STREAM_REG(pThis, LPIB, pStreamShared->u8SD);
    10301030}
    1031 #endif
     1031# endif
    10321032
    10331033/**
     
    12371237    {
    12381238        Log3(("%s: [SD%RU8] BCIS bit set, skipping transfer\n", pszFunction, uSD));
    1239 #ifdef HDA_STRICT
     1239# ifdef HDA_STRICT
    12401240        /* Timing emulation bug or guest is misbehaving -- let me know. */
    12411241        AssertMsgFailed(("%s: BCIS bit for stream #%RU8 still set when it shouldn't\n", pszFunction, uSD));
    1242 #endif
     1242# endif
    12431243        return false;
    12441244    }
     
    14361436                AssertRC(rc2);
    14371437
    1438 #ifdef HDA_DEBUG_SILENCE
     1438# ifdef HDA_DEBUG_SILENCE
    14391439                fix me if relevant;
    1440 #endif
     1440# endif
    14411441                if (RT_LIKELY(!pStreamR3->Dbg.Runtime.fEnabled))
    14421442                { /* likely */ }
     
    14441444                    AudioHlpFileWrite(pStreamR3->Dbg.Runtime.pFileDMARaw, pvBufSrc, cbBufSrc, 0 /* fFlags */);
    14451445
    1446 #ifdef VBOX_WITH_DTRACE
     1446# ifdef VBOX_WITH_DTRACE
    14471447                VBOXDD_HDA_STREAM_DMA_IN((uint32_t)uSD, (uint32_t)cbBufSrc, pStreamR3->State.offRead);
    1448 #endif
     1448# endif
    14491449                pStreamR3->State.offRead += cbBufSrc;
    14501450                RTCircBufReleaseReadBlock(pCircBuf, cbBufSrc);
     
    15511551static void hdaR3StreamPullFromMixer(PHDASTREAMR3 pStreamR3, PAUDMIXSINK pSink)
    15521552{
    1553 #ifdef LOG_ENABLED
     1553# ifdef LOG_ENABLED
    15541554    uint64_t const offWriteOld = pStreamR3->State.offWrite;
    1555 #endif
     1555# endif
    15561556    pStreamR3->State.offWrite = AudioMixerSinkTransferToCircBuf(pSink,
    15571557                                                                pStreamR3->State.pCircBuf,
     
    16061606     *
    16071607     */
    1608 #if 0
     1608# if 0
    16091609    uint8_t    abBounce[4096 + 128];    /* Most guest does at most 4KB BDLE. So, 4KB + space for a partial frame to reduce loops. */
    16101610    uint32_t   cbBounce = 0;            /* in case of incomplete frames between buffer segments */
    1611 #endif
     1611# endif
    16121612    PRTCIRCBUF pCircBuf = pStreamR3->State.pCircBuf;
    16131613    uint32_t   cbLeft   = cbToProduce;
     
    16261626
    16271627        /* Need to diverge if the BDLEs contain misaligned entries.  */
    1628 #if 0
     1628# if 0
    16291629        if (/** @todo pStreamShared->State.fFrameAlignedBuffers */)
    1630 #endif
     1630# endif
    16311631        {
    16321632            if (cbChunk <= cbLeft)
     
    16491649                AssertRC(rc2);
    16501650
    1651 #ifdef HDA_DEBUG_SILENCE
     1651# ifdef HDA_DEBUG_SILENCE
    16521652                fix me if relevant;
    1653 #endif
     1653# endif
    16541654                if (RT_LIKELY(!pStreamR3->Dbg.Runtime.fEnabled))
    16551655                { /* likely */ }
     
    16571657                    AudioHlpFileWrite(pStreamR3->Dbg.Runtime.pFileDMARaw, pvBufDst, cbBufDst, 0 /* fFlags */);
    16581658
    1659 #ifdef VBOX_WITH_DTRACE
     1659# ifdef VBOX_WITH_DTRACE
    16601660                VBOXDD_HDA_STREAM_DMA_OUT((uint32_t)uSD, (uint32_t)cbBufDst, pStreamR3->State.offWrite);
    1661 #endif
     1661# endif
    16621662                pStreamR3->State.offWrite += cbBufDst;
    16631663                RTCircBufReleaseWriteBlock(pCircBuf, cbBufDst);
     
    16711671            }
    16721672        }
    1673 #if 0
     1673# if 0
    16741674        /*
    16751675         * Need to map the frame content, so we need to read the guest data
     
    17321732                              offBounce, cFramesToConvert, cbBufDst, ASMMemIsZero(pvBufDst, cbBufDst) ? " all zero" : ""));
    17331733
    1734 # ifdef HDA_DEBUG_SILENCE
     1734#  ifdef HDA_DEBUG_SILENCE
    17351735                    fix me if relevant;
    1736 # endif
     1736#  endif
    17371737                    if (RT_LIKELY(!pStreamR3->Dbg.Runtime.fEnabled))
    17381738                    { /* likely */ }
     
    17601760            Log5Func(("loop0: GCPhys=%RGp cbBounce=%#x cbLeft=%#x\n", GCPhys, cbBounce, cbLeft));
    17611761        }
    1762 #endif
     1762# endif
    17631763
    17641764        STAM_PROFILE_STOP(&pThis->StatOut, a);
     
    17711771
    17721772    Assert(cbLeft == 0); /* There shall be no break statements in the above loop, so cbLeft is always zero here! */
    1773 #if 0
     1773# if 0
    17741774    AssertMsg(cbBounce == 0, ("%#x\n", cbBounce));
    1775 #endif
     1775# endif
    17761776
    17771777    /*
     
    17991799static void hdaR3StreamPushToMixer(PHDASTREAM pStreamShared, PHDASTREAMR3 pStreamR3, PAUDMIXSINK pSink, uint64_t nsNow)
    18001800{
    1801 #ifdef LOG_ENABLED
     1801# ifdef LOG_ENABLED
    18021802    uint64_t const offReadOld = pStreamR3->State.offRead;
    1803 #endif
     1803# endif
    18041804    pStreamR3->State.offRead = AudioMixerSinkTransferFromCircBuf(pSink,
    18051805                                                                 pStreamR3->State.pCircBuf,
     
    21972197
    21982198
    2199 #if 0 /* unused - no prototype even */
     2199# if 0 /* unused - no prototype even */
    22002200/**
    22012201 * Updates an HDA stream's current read or write buffer position (depending on the stream type) by
     
    22312231    return u32LPIB;
    22322232}
    2233 #endif
     2233# endif
    22342234
    22352235# ifdef HDA_USE_DMA_ACCESS_HANDLER
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