VirtualBox

Changeset 71735 in vbox


Ignore:
Timestamp:
Apr 7, 2018 2:55:31 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121837
Message:

DevHDACommon.cpp: The two hdaProcessInterrupt() prototypes was incorrectly guarded by DEBUG instead of LOG_ENABLED.

Location:
trunk/src/VBox/Devices/Audio
Files:
4 edited

Legend:

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

    r71727 r71735  
    591591    LogFunc(("fInterrupt=%RTbool\n", fInterrupt));
    592592
    593 # ifndef DEBUG
     593# ifndef LOG_ENABLED
    594594    hdaProcessInterrupt(pThis);
    595595# else
     
    875875                HDA_REG(pThis, RIRBSTS) |= HDA_RIRBSTS_RINTFL;
    876876
    877 # ifndef DEBUG
     877# ifndef LOG_ENABLED
    878878                rc = hdaProcessInterrupt(pThis);
    879879# else
     
    15151515    }
    15161516
    1517 # ifndef DEBUG
     1517# ifndef LOG_ENABLED
    15181518    hdaProcessInterrupt(pThis);
    15191519# else
     
    22872287    HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value);
    22882288
    2289 #ifndef DEBUG
     2289#ifndef LOG_ENABLED
    22902290    int rc = hdaProcessInterrupt(pThis);
    22912291#else
  • trunk/src/VBox/Devices/Audio/DevHDACommon.cpp

    r71734 r71735  
    3434
    3535
    36 #ifndef DEBUG
     36#ifndef LOG_ENABLED
    3737/**
    3838 * Processes (de/asserts) the interrupt according to the HDA's current state.
     
    205205            return &pThis->SinkLineIn;
    206206# ifdef VBOX_WITH_AUDIO_HDA_MIC_IN
    207         else if (uSD == uFirstSDI + 1)
     207        if (uSD == uFirstSDI + 1)
    208208            return &pThis->SinkMicIn;
    209209# else
    210         else /* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */
    211             return &pThis->SinkLineIn;
     210        /* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */
     211        return &pThis->SinkLineIn;
    212212# endif
    213213    }
     
    219219            return &pThis->SinkFront;
    220220# ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND
    221         else if (uSD == uFirstSDO + 1)
     221        if (uSD == uFirstSDO + 1)
    222222            return &pThis->SinkCenterLFE;
    223         else if (uSD == uFirstSDO + 2)
     223        if (uSD == uFirstSDO + 2)
    224224            return &pThis->SinkRear;
    225225# endif
     
    311311    uint32_t cbLeft      = RT_MIN(cbBuf, pBDLE->Desc.u32BufSize - pBDLE->State.u32BufOff);
    312312
    313 #ifdef HDA_DEBUG_SILENCE
     313# ifdef HDA_DEBUG_SILENCE
    314314    uint64_t   csSilence = 0;
    315315
    316316    pStream->Dbg.cSilenceThreshold = 100;
    317317    pStream->Dbg.cbSilenceReadMin  = _1M;
    318 #endif
     318# endif
    319319
    320320    RTGCPHYS addrChunk = pBDLE->Desc.u64BufAdr + pBDLE->State.u32BufOff;
     
    328328            break;
    329329
    330 #ifdef HDA_DEBUG_SILENCE
     330# ifdef HDA_DEBUG_SILENCE
    331331        uint16_t *pu16Buf = (uint16_t *)pvBuf;
    332332        for (size_t i = 0; i < cbChunk / sizeof(uint16_t); i++)
    333333        {
    334334            if (*pu16Buf == 0)
    335             {
    336335                csSilence++;
    337             }
    338336            else
    339337                break;
    340338            pu16Buf++;
    341339        }
    342 #endif
     340# endif
    343341        if (pStream->Dbg.Runtime.fEnabled)
    344342            DrvAudioHlpFileWrite(pStream->Dbg.Runtime.pFileDMA, (uint8_t *)pvBuf + cbReadTotal, cbChunk, 0 /* fFlags */);
    345343
    346 #ifdef VBOX_WITH_STATISTICS
    347344        STAM_COUNTER_ADD(&pThis->StatBytesRead, cbChunk);
    348 #endif
    349345        addrChunk         = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize;
    350346
     
    355351    }
    356352
    357 #ifdef HDA_DEBUG_SILENCE
    358 
     353# ifdef HDA_DEBUG_SILENCE
    359354    if (csSilence)
    360355        pStream->Dbg.csSilence += csSilence;
     
    367362        pStream->Dbg.csSilence = 0;
    368363    }
    369 #endif
     364# endif
    370365
    371366    if (RT_SUCCESS(rc))
     
    418413            break;
    419414
    420 #ifdef VBOX_WITH_STATISTICS
    421415        STAM_COUNTER_ADD(&pThis->StatBytesWritten, cbChunk);
    422 #endif
    423416        addrChunk       = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize;
    424417
     
    495488    AssertPtrReturn(pProps, VERR_INVALID_POINTER);
    496489
    497 # define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift))
     490#define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift))
    498491
    499492    int rc = VINF_SUCCESS;
     
    563556    }
    564557
    565 # undef EXTRACT_VALUE
     558#undef EXTRACT_VALUE
    566559    return rc;
    567560}
  • trunk/src/VBox/Devices/Audio/DevHDACommon.h

    r70964 r71735  
    2020
    2121#include "AudioMixer.h"
     22#include <VBox/log.h> /* LOG_ENABLED */
    2223
    2324/** See 302349 p 6.2. */
     
    515516#define HDA_BDLE_FLAG_IOC           RT_BIT(0)
    516517
     518
    517519/*********************************************************************************************************************************
    518520*   Prototypes                                                                                                                 *
     
    587589 * @{
    588590 */
    589 #ifdef DEBUG
     591#ifdef LOG_ENABLED
    590592int           hdaProcessInterrupt(PHDASTATE pThis, const char *pszSource);
    591593#else
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r71704 r71735  
    11911191        /* Trigger an interrupt first and let hdaRegWriteSDSTS() deal with
    11921192         * ending / beginning a period. */
    1193 #ifndef DEBUG
     1193#ifndef LOG_ENABLED
    11941194        hdaProcessInterrupt(pThis);
    11951195#else
Note: See TracChangeset for help on using the changeset viewer.

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