VirtualBox

Changeset 63819 in vbox


Ignore:
Timestamp:
Sep 13, 2016 4:50:26 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DevIchAc97.cpp: More status register (SR) fun.

File:
1 edited

Legend:

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

    r63817 r63819  
    490490 * Update the BM status register
    491491 */
    492 static void ichac97StreamUpdateStatus(PAC97STATE pThis, PAC97STREAM pStream, uint32_t new_sr)
     492static void ichac97StreamUpdateSR(PAC97STATE pThis, PAC97STREAM pStream, uint32_t new_sr)
    493493{
    494494    PPDMDEVINS  pDevIns = ICHAC97STATE_2_DEVINS(pThis);
     
    600600    pRegs->lvi      = 0;
    601601
    602     ichac97StreamUpdateStatus(pThis, pStream, AC97_SR_DCH); /** @todo Do we need to do that? */
     602    ichac97StreamSetActive(pThis, pStream, false /* fActive */);
     603
     604    ichac97StreamUpdateSR(pThis, pStream, AC97_SR_DCH); /** @todo Do we need to do that? */
    603605
    604606    pRegs->picb     = 0;
     
    606608    pRegs->cr       = pRegs->cr & AC97_CR_DONT_CLEAR_MASK;
    607609    pRegs->bd_valid = 0;
    608 
    609     ichac97StreamSetActive(pThis, pStream, false /* fActive */);
    610610
    611611    RT_ZERO(pThis->silence);
     
    16071607            }
    16081608
    1609             ichac97StreamUpdateStatus(pThis, pStream, new_sr);
     1609            ichac97StreamUpdateSR(pThis, pStream, new_sr);
    16101610        }
    16111611
     
    18301830                        {
    18311831                            ichac97StreamSetActive(pThis, pStream, false /* fActive */);
     1832
    18321833                            pRegs->sr |= AC97_SR_DCH;
    18331834                        }
     
    18381839
    18391840                            ichac97StreamFetchBDLE(pThis, pStream);
     1841                            ichac97StreamSetActive(pThis, pStream, true /* fActive */);
    18401842
    18411843                            pRegs->sr &= ~AC97_SR_DCH;
    1842                             ichac97StreamSetActive(pThis, pStream, true /* fActive */);
    18431844                        }
    18441845                    }
     
    18511852                    /* Status Register */
    18521853                    pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
    1853                     ichac97StreamUpdateStatus(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
     1854                    ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
    18541855                    Log3Func(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));
    18551856                    break;
     
    18701871                    /* Status Register */
    18711872                    pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
    1872                     ichac97StreamUpdateStatus(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
     1873                    ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
    18731874                    Log3Func(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));
    18741875                    break;
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