VirtualBox

Changeset 34828 in vbox for trunk


Ignore:
Timestamp:
Dec 8, 2010 11:55:14 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: nuked trailing whitespace.

File:
1 edited

Legend:

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

    r34827 r34828  
    664664#endif
    665665    return 0;
    666 } 
     666}
    667667
    668668static int hdaProcessInterrupt(INTELHDLinkState* pState)
     
    848848{
    849849    Log(("hda: reset of stream (%d) started\n", u8Strm));
    850     Assert((   pState 
    851             && pBdle 
    852             && pStreamDesc 
     850    Assert((   pState
     851            && pBdle
     852            && pStreamDesc
    853853            && u8Strm <= 7));
    854854    memset(pBdle, 0, sizeof(HDABDLEDESC));
     
    10631063    bool fInRun = RT_BOOL((HDA_REG_IND(pState, index) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN)));
    10641064    bool fReset = RT_BOOL((u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST)));
    1065     bool fInReset = RT_BOOL((HDA_REG_IND(pState, index) & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST))); 
     1065    bool fInReset = RT_BOOL((HDA_REG_IND(pState, index) & HDA_REG_FIELD_FLAG_MASK(SDCTL, SRST)));
    10661066    int rc = VINF_SUCCESS;
    10671067    if (fInReset)
    10681068    {
    1069         /* Assert!!! Guest is resetting HDA's stream, we're expecting guest will mark stream as exit 
    1070          * from reset 
     1069        /* Assert!!! Guest is resetting HDA's stream, we're expecting guest will mark stream as exit
     1070         * from reset
    10711071         */
    10721072        Assert((!fReset));
    10731073        Log(("hda: guest initiate exit of stream reset.\n"));
    10741074        goto done;
    1075     } 
     1075    }
    10761076    else if (fReset)
    10771077    {
     
    11871187                case HDA_SDONFIFO_192B:
    11881188                    return hdaRegWriteU16(pState, offset, index, u32Value);
    1189                    
     1189
    11901190                case HDA_SDONFIFO_256B:
    11911191                    Log(("hda: 256 bit is unsupported, HDA is switched into 192B mode\n"));
    11921192                default:
    11931193                    return hdaRegWriteU16(pState, offset, index, HDA_SDONFIFO_192B);
    1194             } 
     1194            }
    11951195            return VINF_SUCCESS;
    11961196        default:
    11971197            AssertMsgFailed(("Something wierd happens with register lookup routine"));
    1198     } 
     1198    }
    11991199    return VINF_SUCCESS;
    12001200}
     
    13641364{
    13651365    uint8_t  bdle[16];
    1366     Assert((   pStreamDesc->u64BaseDMA 
    1367             && pBdle 
     1366    Assert((   pStreamDesc->u64BaseDMA
     1367            && pBdle
    13681368            && pBdle->u32BdleMaxCvi));
    13691369    PDMDevHlpPhysRead(ICH6_HDASTATE_2_DEVINS(pState), pStreamDesc->u64BaseDMA + pBdle->u32BdleCvi*16, bdle, 16);
     
    13941394    Assert((pBdle->u32BdleCviLen >= pBdle->u32BdleCviPos)); /* sanity */
    13951395    cb2Copy = pBdle->u32BdleCviLen - pBdle->u32BdleCviPos;
    1396     /* 
    1397      * we may increase the counter in range of [0, FIFOS + 1] 
     1396    /*
     1397     * we may increase the counter in range of [0, FIFOS + 1]
    13981398     */
    1399     cb2Copy = RT_MIN(cb2Copy, pStreamDesc->u32Fifos + 1); 
     1399    cb2Copy = RT_MIN(cb2Copy, pStreamDesc->u32Fifos + 1);
    14001400    Assert((u32SoundBackendBufferBytesAvail > 0));
    14011401
    14021402    /* sanity check to avoid overriding sound backend buffer */
    1403     cb2Copy = RT_MIN(cb2Copy, u32SoundBackendBufferBytesAvail); 
     1403    cb2Copy = RT_MIN(cb2Copy, u32SoundBackendBufferBytesAvail);
    14041404    cb2Copy = RT_MIN(cb2Copy, u32CblLimit);
    14051405
     
    14121412static inline void hdaBackendWriteTransferReported(PHDABDLEDESC pBdle, uint32_t cbArranged2Copy, uint32_t cbCopied, uint32_t *pu32DMACursor, uint32_t *pu32BackendBufferCapacity)
    14131413{
    1414     Log(("hda:hdaBackendWriteTransferReported: cbArranged2Copy: %d, cbCopied: %d, pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n", 
     1414    Log(("hda:hdaBackendWriteTransferReported: cbArranged2Copy: %d, cbCopied: %d, pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n",
    14151415        cbArranged2Copy, cbCopied, pu32DMACursor ? *pu32DMACursor : 0, pu32BackendBufferCapacity ? *pu32BackendBufferCapacity : 0));
    14161416    Assert((cbCopied));
    14171417    Assert((pu32BackendBufferCapacity && *pu32BackendBufferCapacity));
    1418     /* Assertion!!! It was copied less than cbUnderFifoW 
     1418    /* Assertion!!! It was copied less than cbUnderFifoW
    14191419     * Probably we need to move the buffer, but it rather hard to imagine situation
    14201420     * why it may happen.
     
    14241424        && pBdle->cbUnderFifoW <= cbCopied)
    14251425        Log(("hda:hdaBackendWriteTransferReported: CVI resetting cbUnderFifoW:%d(pos:%d, len:%d)\n", pBdle->cbUnderFifoW, pBdle->u32BdleCviPos, pBdle->u32BdleCviLen));
    1426    
    1427     pBdle->cbUnderFifoW -= RT_MIN(pBdle->cbUnderFifoW, cbCopied); 
     1426
     1427    pBdle->cbUnderFifoW -= RT_MIN(pBdle->cbUnderFifoW, cbCopied);
    14281428    Assert((!pBdle->cbUnderFifoW)); /* Assert!!! Assumption failed */
    14291429
     
    14331433    Assert((pBdle->u32BdleCviLen >= pBdle->u32BdleCviPos && *pu32BackendBufferCapacity >= cbCopied)); /* sanity */
    14341434    /* We reports all bytes (including unreported previously) */
    1435     *pu32DMACursor += cbCopied; 
     1435    *pu32DMACursor += cbCopied;
    14361436    /* reducing backend counter on amount of bytes we copied to backend */
    14371437    *pu32BackendBufferCapacity -= cbCopied;
    1438     Log(("hda:hdaBackendWriteTransferReported: CVI(pos:%d, len:%d), pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n", 
     1438    Log(("hda:hdaBackendWriteTransferReported: CVI(pos:%d, len:%d), pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n",
    14391439        pBdle->u32BdleCviPos, pBdle->u32BdleCviLen, *pu32DMACursor, *pu32BackendBufferCapacity));
    14401440}
     
    14481448    *pu32DMACursor += cbCopied + pBdle->cbUnderFifoW;
    14491449    pBdle->cbUnderFifoW = 0;
    1450     Log(("hda:hdaBackendReadTransferReported: CVI(pos:%d, len:%d), pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n", 
     1450    Log(("hda:hdaBackendReadTransferReported: CVI(pos:%d, len:%d), pu32DMACursor: %d, pu32BackendBufferCapacity:%d\n",
    14511451        pBdle->u32BdleCviPos, pBdle->u32BdleCviLen, pu32DMACursor ? *pu32DMACursor : 0, pu32BackendBufferCapacity ? *pu32BackendBufferCapacity : 0));
    14521452}
     
    14711471        *pStreamDesc->pu32Lpib -= pStreamDesc->u32Cbl;
    14721472    hdaUpdatePosBuf(pState, pStreamDesc);
    1473    
     1473
    14741474    if (pBdle->u32BdleCviPos == pBdle->u32BdleCviLen)
    14751475    {
     
    14911491    {
    14921492        *pStreamDesc->pu32Lpib += cbInc;
    1493    
     1493
    14941494        /*
    14951495         * Assert. Overlapping of buffer counter shouldn't happen.
    14961496         */
    14971497        Assert((*pStreamDesc->pu32Lpib <= pStreamDesc->u32Cbl));
    1498    
     1498
    14991499        hdaUpdatePosBuf(pState, pStreamDesc);
    1500    
     1500
    15011501    }
    15021502}
     
    15231523                hdaProcessInterrupt(pState);
    15241524        }
    1525         fDoNextTransferLoop = false; 
     1525        fDoNextTransferLoop = false;
    15261526    }
    15271527    return fDoNextTransferLoop;
     
    15301530/*
    15311531 * hdaReadAudio - copies samples from Qemu Sound back-end to DMA.
    1532  * Note: this function writes immediately to DMA buffer, but "reports bytes" when all conditions meet (FIFOW) 
     1532 * Note: this function writes immediately to DMA buffer, but "reports bytes" when all conditions meet (FIFOW)
    15331533 */
    15341534static uint32_t hdaReadAudio(INTELHDLinkState *pState, PHDASTREAMTRANSFERDESC pStreamDesc, uint32_t *pu32Avail, bool *fStop, uint32_t u32CblLimit)
     
    15481548        goto done;
    15491549    }
    1550        
    1551    
     1550
     1551
    15521552    /*
    15531553     * read from backend input line to last ureported position or at the begining.
     
    15851585
    15861586    cb2Copy = hdaCalculateTransferBufferLength(pBdle, pStreamDesc, *pu32Avail, u32CblLimit);
    1587    
     1587
    15881588    /*
    15891589     * Copy from DMA to the corresponding hdaBuffer (if there exists some bytes from the previous not reported transfer we write to ''pBdle->cbUnderFifoW'' offset)
     
    15941594        goto done;
    15951595    }
    1596        
     1596
    15971597    PDMDevHlpPhysRead(ICH6_HDASTATE_2_DEVINS(pState), pBdle->u64BdleCviAddr + pBdle->u32BdleCviPos, pBdle->au8HdaBuffer + pBdle->cbUnderFifoW, cb2Copy);
    15981598    /*
     
    16281628static inline void hdaInitTransferDescriptor(PINTELHDLinkState pState, PHDABDLEDESC pBdle, uint8_t u8Strm, PHDASTREAMTRANSFERDESC pStreamDesc)
    16291629{
    1630     Assert((   pState 
    1631             && pBdle 
     1630    Assert((   pState
     1631            && pBdle
    16321632            && pStreamDesc
    1633             && u8Strm <= 7));               
     1633            && u8Strm <= 7));
    16341634    memset(pStreamDesc, 0, sizeof(HDASTREAMTRANSFERDESC));
    16351635    pStreamDesc->u8Strm = u8Strm;
     
    16511651    }
    16521652#endif
    1653 } 
     1653}
    16541654
    16551655DECLCALLBACK(void) hdaTransfer(CODECState *pCodecState, ENMSOUNDSOURCE src, int avail)
     
    17091709        Assert(nBytes <= (stStreamDesc.u32Fifos + 1));
    17101710        *stStreamDesc.pu32Sts &= ~HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY);
    1711        
     1711
    17121712        /* Process end of buffer condition. */
    17131713        hdaStreamCounterUpdate(pState, pBdle, &stStreamDesc, nBytes);
     
    19931993        hdaInitTransferDescriptor(&pThis->hda, pBdle, u8Strm, &stStreamDesc);
    19941994        /* hdaStreamReset prevents changing SRST bit, so we zerro it here forcely. */
    1995         HDA_STREAM_REG2(&pThis->hda, CTL, u8Strm) = 0; 
     1995        HDA_STREAM_REG2(&pThis->hda, CTL, u8Strm) = 0;
    19961996        hdaStreamReset(&pThis->hda, pBdle, &stStreamDesc, u8Strm);
    19971997    }
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