VirtualBox

Changeset 62972 in vbox


Ignore:
Timestamp:
Aug 4, 2016 10:44:09 AM (8 years ago)
Author:
vboxsync
Message:

Devices: warnings

File:
1 edited

Legend:

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

    r62632 r62972  
    26322632            AssertMsgFailed(("Unsupported bits per sample %x\n",
    26332633                             EXTRACT_VALUE(u32SDFMT, HDA_SDFMT_BITS_MASK, HDA_SDFMT_BITS_SHIFT)));
     2634            enmFmt = PDMAUDIOFMT_INVALID;
    26342635            rc = VERR_NOT_SUPPORTED;
    26352636            break;
     
    29832984DECLINLINE(int) hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value)
    29842985{
     2986    RT_NOREF(pThis, iReg, u32Value);
    29852987    AssertPtr(pThis);   /* don't bother returning errors */
    29862988    AssertPtr(pStream);
    29872989
    2988 #ifdef VBOX_STRICT
     2990# ifdef VBOX_STRICT
    29892991    /* Check if the SD's RUN bit is set. */
    29902992    uint32_t u32SDCTL = HDA_STREAM_REG(pThis, CTL, pStream->u8SD);
     
    29942996        LogFunc(("[SD%RU8]: Warning: Cannot write to register 0x%x (0x%x) when RUN bit is set (%R[sdctl])\n",
    29952997                 pStream->u8SD, iReg, u32Value, u32SDCTL));
    2996 # ifdef DEBUG_andy
     2998#  ifdef DEBUG_andy
    29972999        AssertFailed();
     3000#  endif
     3001        return VERR_ACCESS_DENIED;
     3002    }
    29983003# endif
    2999         return VERR_ACCESS_DENIED;
    3000     }
    3001 #endif
    30023004
    30033005    /** @todo r=bird: Why on EARTH are we using mutexes?  USE CRITICAL SECTIONS!! */
     
    34913493
    34923494    PHDABDLE       pBDLE   = &pStream->State.BDLE;
     3495#ifdef LOG_ENABLED
    34933496    const uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStream->u8SD);
     3497#endif
    34943498
    34953499    /* Check if the current BDLE entry is complete (full). */
     
    36563660        if (cbBuf >= hdaStreamGetFIFOW(pThis, pStream))
    36573661        {
     3662#if defined(VBOX_WITH_HDA_INTERLEAVING_STREAMS_SUPPORT) || defined(VBOX_WITH_HDA_51_SURROUND)
    36583663            PHDASTREAMMAPPING pMapping            = &pStream->State.Mapping;
     3664#endif
    36593665
    36603666            /** @todo Which channel is which? */
     
    37013707             * Write data to according mixer sinks.
    37023708             */
    3703             rc2 = AudioMixerSinkWrite(pThis->SinkFront.pMixSink, AUDMIXOP_COPY, pvDataFront,     cbDataFront,
     3709            rc2 = AudioMixerSinkWrite(pThis->SinkFront.pMixSink, AUDMIXOP_COPY, pvDataFront,     (uint32_t)cbDataFront,
    37043710                                      NULL /* pcbWritten */);
    37053711            AssertRC(rc2);
     
    41614167static DECLCALLBACK(void) hdaTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    41624168{
     4169    RT_NOREF(pDevIns);
    41634170    PHDASTATE pThis = (PHDASTATE)pvUser;
    41644171    Assert(pThis == PDMINS_2_DATA(pDevIns, PHDASTATE));
     
    41674174    STAM_PROFILE_START(&pThis->StatTimer, a);
    41684175
    4169     uint64_t cTicksNow     = TMTimerGet(pTimer);
    4170     uint64_t cTicksElapsed = cTicksNow - pThis->uTimerTS;
     4176    uint64_t cTicksNow = TMTimerGet(pTimer);
    41714177
    41724178    LogFlowFuncEnter();
     
    43734379    /* State sanity checks. */
    43744380    Assert(pStream->State.fInReset == false);
    4375 
    4376     uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStream->u8SD);
    4377     Assert(u32LPIB <= pStream->u32CBL);
     4381    Assert(HDA_STREAM_REG(pThis, LPIB, pStream->u8SD) <= pStream->u32CBL);
    43784382
    43794383    bool fInterrupt = false;
     
    47574761 * @callback_method_impl{FNPCIIOREGIONMAP}
    47584762 */
    4759 static DECLCALLBACK(int) hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb,
    4760                                            PCIADDRESSSPACE enmType)
    4761 {
     4763static DECLCALLBACK(int)
     4764hdaPciIoRegionMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
     4765{
     4766    RT_NOREF(iRegion, enmType);
    47624767    PPDMDEVINS  pDevIns = pPciDev->pDevIns;
    47634768    PHDASTATE   pThis = RT_FROM_MEMBER(pPciDev, HDASTATE, PciDev);
    4764     RTIOPORT    Port = (RTIOPORT)GCPhysAddress;
    4765     int         rc;
    47664769
    47674770    /*
     
    47724775     */
    47734776    Assert(enmType == PCI_ADDRESS_SPACE_MEM);
    4774     rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
    4775                                  IOMMMIO_FLAGS_READ_DWORD
    4776                                | IOMMMIO_FLAGS_WRITE_PASSTHRU,
    4777                                hdaMMIOWrite, hdaMMIORead, "HDA");
    4778 
     4777    int rc = PDMDevHlpMMIORegister(pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
     4778                                   IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_PASSTHRU,
     4779                                   hdaMMIOWrite, hdaMMIORead, "HDA");
    47794780    if (RT_FAILURE(rc))
    47804781        return rc;
     
    48054806static int hdaSaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PHDASTREAM pStrm)
    48064807{
     4808    RT_NOREF(pDevIns);
     4809#ifdef DEBUG
    48074810    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
    4808 
     4811#endif
    48094812    LogFlowFunc(("[SD%RU8]\n", pStrm->u8SD));
    48104813
     
    48794882
    48804883    /* Save stream states. */
    4881     int rc;
    48824884    for (uint8_t i = 0; i < HDA_MAX_STREAMS; i++)
    48834885    {
    4884         rc = hdaSaveStream(pDevIns, pSSM, &pThis->aStreams[i]);
     4886        int rc = hdaSaveStream(pDevIns, pSSM, &pThis->aStreams[i]);
    48854887        AssertRCReturn(rc, rc);
    48864888    }
    48874889
    4888     return rc;
     4890    return VINF_SUCCESS;
    48894891}
    48904892
     
    56205622static int hdaAttachInternal(PPDMDEVINS pDevIns, PHDADRIVER pDrv, unsigned uLUN, uint32_t fFlags)
    56215623{
     5624    RT_NOREF(fFlags);
    56225625    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
    56235626
     
    56985701static DECLCALLBACK(void) hdaDetach(PPDMDEVINS pDevIns, unsigned uLUN, uint32_t fFlags)
    56995702{
     5703    RT_NOREF(pDevIns, uLUN, fFlags);
    57005704    LogFunc(("iLUN=%u, fFlags=0x%x\n", uLUN, fFlags));
    57015705}
     
    57925796static DECLCALLBACK(int) hdaConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    57935797{
     5798    RT_NOREF(iInstance);
     5799    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    57945800    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
    57955801    Assert(iInstance == 0);
    5796     PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    57975802
    57985803    /*
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