VirtualBox

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


Ignore:
Timestamp:
Nov 9, 2010 6:24:35 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: hda{Read,Write}Audio respects SDnFIFOS value.

File:
1 edited

Legend:

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

    r33673 r33880  
    11831183static uint32_t hdaReadAudio(INTELHDLinkState *pState, int avail, bool *fStop)
    11841184{
    1185     uint8_t tmpbuf[4096];
     1185    uint8_t tmpbuf[512];
    11861186    uint32_t temp;
    11871187    uint32_t u32Rest = 0;
     
    12011201    {
    12021202        int copied;
    1203         to_copy = audio_MIN(temp, 4096U);
     1203        to_copy = audio_MIN(temp, SDFIFOS(pState, 4) & ~((1<<4) - 1));
    12041204        copied = AUD_read (voice, tmpbuf, to_copy);
    12051205        Log (("hda: read_audio max=%x to_copy=%x copied=%x\n",
     
    12191219static uint32_t hdaWriteAudio(INTELHDLinkState *pState, int avail, bool *fStop)
    12201220{
    1221     uint8_t tmpbuf[4096];
     1221    uint8_t tmpbuf[512];
    12221222    uint32_t temp;
    12231223    uint32_t u32Rest;
     
    12321232        return written;
    12331233    }
     1234    temp = audio_MIN(SDFIFOS(pState, 4) & ~((1<<4) - 1), temp);
    12341235    while (temp)
    12351236    {
     
    12401241        Log (("hda: write_audio max=%x to_copy=%x copied=%x\n",
    12411242              avail, to_copy, copied));
    1242         Assert((copied));
    12431243        if (!copied)
    12441244        {
     
    12711271    uint32_t *pu32Lpib;
    12721272    uint32_t u32Lcbl;
     1273    uint32_t u32Fifos;
    12731274    switch (src)
    12741275    {
     
    13071308        return;
    13081309    /* Fetch the Buffer Descriptor Entry (BDE). */
     1310    *pu32Sts |= HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY);
    13091311    fetch_bd(pState, pBdle, u64BaseDMA);
    13101312    while( avail && !fStop)
     
    13511353        }
    13521354    }
     1355    *pu32Sts &= ~HDA_REG_FIELD_FLAG_MASK(SDSTS, FIFORDY);
    13531356}
    13541357
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