VirtualBox

Changeset 76852 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jan 17, 2019 11:37:38 AM (6 years ago)
Author:
vboxsync
Message:

Audio/AC97: Condensed NABMBAR status register writes.

File:
1 edited

Legend:

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

    r76851 r76852  
    833833}
    834834
     835static void ichac97StreamWriteSR(PAC97STATE pThis, PAC97STREAM pStream, uint32_t u32Val)
     836{
     837    PAC97BMREGS pRegs = &pStream->Regs;
     838
     839    Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8SD, u32Val));
     840
     841    pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
     842    ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
     843}
     844
    835845#ifdef IN_RING3
    836846
     
    32263236                case MC_SR:
    32273237                {
    3228                     AssertPtr(pStream);
    3229                     AssertPtr(pRegs);
    3230                     pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
    3231                     ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
    3232                     Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8SD, u32Val, pRegs->sr));
     3238                    ichac97StreamWriteSR(pThis, pStream, u32Val);
    32333239                    break;
    32343240                }
     
    32483254                case PO_SR:
    32493255                case MC_SR:
    3250                     AssertPtr(pStream);
    3251                     AssertPtr(pRegs);
    3252                     /* Status Register */
    3253                     pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
    3254                     ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK));
    3255                     Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8SD, u32Val, pRegs->sr));
     3256                    ichac97StreamWriteSR(pThis, pStream, u32Val);
    32563257                    break;
    32573258                default:
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