VirtualBox

Changeset 88196 in vbox


Ignore:
Timestamp:
Mar 18, 2021 4:43:03 PM (4 years ago)
Author:
vboxsync
Message:

DevHDA: No need to clear HDA_SDCTL_RUN before calling hdaR3StreamReset. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r88195 r88196  
    14051405        }
    14061406
    1407         /* Make sure to remove the run bit before doing the actual stream reset. */
    1408         HDA_STREAM_REG(pThis, CTL, uSD) &= ~HDA_SDCTL_RUN; /** @todo r=bird: Isn't this utterly pointless? */
    14091407        hdaR3StreamReset(pThis, pThisCC, pStreamShared, pStreamR3, uSD);
    14101408
     
    28772875        pStreamShared->State.fRunning = false;
    28782876
    2879         /* Remove the RUN bit from SDnCTL in case the stream was in a running state before. */
    2880         HDA_STREAM_REG(pThis, CTL, idxStream) &= ~HDA_SDCTL_RUN; /** @todo r=bird: Isn't this utterly pointless? */
    28812877        hdaR3StreamReset(pThis, pThisCC, pStreamShared, &pThisCC->aStreams[idxStream], (uint8_t)idxStream);
    28822878
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r88172 r88196  
    780780void hdaR3StreamReset(PHDASTATE pThis, PHDASTATER3 pThisCC, PHDASTREAM pStreamShared, PHDASTREAMR3 pStreamR3, uint8_t uSD)
    781781{
     782    LogFunc(("[SD%RU8] Reset\n", uSD));
     783
     784    /*
     785     * Assert some sanity.
     786     */
    782787    AssertPtr(pThis);
    783788    AssertPtr(pStreamShared);
    784789    AssertPtr(pStreamR3);
    785790    Assert(uSD < HDA_MAX_STREAMS);
     791    Assert(pStreamShared->u8SD == uSD);
     792    Assert(pStreamR3->u8SD == uSD);
    786793    AssertMsg(!pStreamShared->State.fRunning, ("[SD%RU8] Cannot reset stream while in running state\n", uSD));
    787 
    788     LogFunc(("[SD%RU8] Reset\n", uSD));
    789794
    790795    /*
     
    801806    /* According to the ICH6 datasheet, 0x40000 is the default value for stream descriptor register 23:20
    802807     * bits are reserved for stream number 18.2.33, resets SDnCTL except SRST bit. */
    803     HDA_STREAM_REG(pThis, CTL,   uSD) = 0x40000 | (HDA_STREAM_REG(pThis, CTL, uSD) & HDA_SDCTL_SRST);
     808    HDA_STREAM_REG(pThis, CTL,   uSD) = HDA_SDCTL_TP | (HDA_STREAM_REG(pThis, CTL, uSD) & HDA_SDCTL_SRST);
    804809    /* ICH6 defines default values (120 bytes for input and 192 bytes for output descriptors) of FIFO size. 18.2.39. */
    805810    HDA_STREAM_REG(pThis, FIFOS, uSD) = hdaGetDirFromSD(uSD) == PDMAUDIODIR_IN ? HDA_SDIFIFO_120B : HDA_SDOFIFO_192B;
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