VirtualBox

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


Ignore:
Timestamp:
Feb 12, 2018 4:42:51 PM (7 years ago)
Author:
vboxsync
Message:

Audio/HDA: Disable audio streams before doing a stream reset in hdaGCTLReset().

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

Legend:

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

    r70966 r70975  
    30393039    for (uint8_t uSD = 0; uSD < HDA_MAX_STREAMS; ++uSD)
    30403040    {
    3041         /* Remove the RUN bit from SDnCTL in case the stream was in a running state before. */
    3042         HDA_STREAM_REG(pThis, CTL, uSD) &= ~HDA_SDCTL_RUN;
    3043         hdaStreamReset(pThis, &pThis->aStreams[uSD], uSD);
     3041        int rc2 = hdaStreamEnable(&pThis->aStreams[uSD], false /* fEnable */);
     3042        if (RT_SUCCESS(rc2))
     3043        {
     3044            /* Remove the RUN bit from SDnCTL in case the stream was in a running state before. */
     3045            HDA_STREAM_REG(pThis, CTL, uSD) &= ~HDA_SDCTL_RUN;
     3046            hdaStreamReset(pThis, &pThis->aStreams[uSD], uSD);
     3047        }
    30443048    }
    30453049
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r70964 r70975  
    504504    int rc = VINF_SUCCESS;
    505505
    506     if (!pStream->pMixSink) /* Stream attached to a sink? */
    507     {
    508         AssertMsgFailed(("Stream #%RU8 not has no mixer sink attached\n", pStream->u8SD));
    509         return VERR_WRONG_ORDER;
    510     }
    511 
    512506    AUDMIXSINKCMD enmCmd = fEnable
    513507                         ? AUDMIXSINKCMD_ENABLE : AUDMIXSINKCMD_DISABLE;
    514508
    515509    /* First, enable or disable the stream and the stream's sink, if any. */
    516     if (pStream->pMixSink->pMixSink)
     510    if (   pStream->pMixSink
     511        && pStream->pMixSink->pMixSink)
    517512        rc = AudioMixerSinkCtl(pStream->pMixSink->pMixSink, enmCmd);
    518513
    519514    if (   RT_SUCCESS(rc)
     515        && fEnable
    520516        && pStream->Dbg.Runtime.fEnabled)
    521517    {
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