VirtualBox

Changeset 89733 in vbox


Ignore:
Timestamp:
Jun 16, 2021 7:49:01 AM (3 years ago)
Author:
vboxsync
Message:

DevIchAc97: Renamed a couple of functions. bugref:9890

File:
1 edited

Legend:

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

    r89724 r89733  
    18471847 * Adds all current driver streams to a specific mixer sink.
    18481848 *
    1849  * Called by ichac97R3StreamOpen().
     1849 * Called by ichac97R3StreamSetUp().
    18501850 *
    18511851 * @returns VBox status code.
     
    19161916 * Removes all driver streams from a specific mixer sink.
    19171917 *
    1918  * Called by ichac97R3StreamOpen() and ichac97R3StreamsDestroy().
     1918 * Called by ichac97R3StreamSetUp() and ichac97R3StreamsDestroy().
    19191919 *
    19201920 * @param   pDevIns     The device instance.
     
    19791979
    19801980/**
    1981  * Opens an AC'97 stream with its current mixer settings.
    1982  *
    1983  * This will open an AC'97 stream with 2 (stereo) channels, 16-bit samples and
     1981 * Sets up an AC'97 stream with its current mixer settings.
     1982 *
     1983 * This will set up an AC'97 stream with 2 (stereo) channels, 16-bit samples and
    19841984 * the last set sample rate in the AC'97 mixer for this stream.
    19851985 *
     
    19931993 *                      Otherwise re-opening only will happen if the PCM properties have changed.
    19941994 */
    1995 static int ichac97R3StreamOpen(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATER3 pThisCC, PAC97STREAM pStream,
    1996                                PAC97STREAMR3 pStreamCC, bool fForce)
     1995static int ichac97R3StreamSetUp(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATER3 pThisCC, PAC97STREAM pStream,
     1996                                PAC97STREAMR3 pStreamCC, bool fForce)
    19971997{
    19981998    /*
     
    22162216
    22172217/**
    2218  * Closes an AC'97 stream.
     2218 * Tears down an AC'97 stream (counter part to ichac97R3StreamSetUp).
    22192219 *
    22202220 * Empty stub at present, nothing to do here as we reuse streams and only really
     
    22232223 * @param   pStream             The AC'97 stream to close (shared).
    22242224 */
    2225 static void ichac97R3StreamClose(PAC97STREAM pStream)
     2225static void ichac97R3StreamTearDown(PAC97STREAM pStream)
    22262226{
    22272227    RT_NOREF(pStream);
     
    22312231
    22322232/**
    2233  * Re-opens (that is, closes and opens again) an AC'97 stream on the backend
    2234  * side with the current AC'97 mixer settings for this stream.
     2233 * Tears down and sets up an AC'97 stream on the backend side with the current
     2234 * AC'97 mixer settings for this stream.
    22352235 *
    22362236 * @returns VBox status code.
     
    22432243 *                      Otherwise re-opening only will happen if the PCM properties have changed.
    22442244 */
    2245 static int ichac97R3StreamReOpen(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATER3 pThisCC,
    2246                                  PAC97STREAM pStream, PAC97STREAMR3 pStreamCC, bool fForce)
     2245static int ichac97R3StreamReSetUp(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATER3 pThisCC,
     2246                                  PAC97STREAM pStream, PAC97STREAMR3 pStreamCC, bool fForce)
    22472247{
    22482248    LogFlowFunc(("[SD%RU8]\n", pStream->u8SD));
     
    22512251    Assert(pStreamCC - &pThisCC->aStreams[0] == pStream->u8SD);
    22522252
    2253     ichac97R3StreamClose(pStream);
    2254     return ichac97R3StreamOpen(pDevIns, pThis, pThisCC, pStream, pStreamCC, fForce);
     2253    ichac97R3StreamTearDown(pStream);
     2254    return ichac97R3StreamSetUp(pDevIns, pThis, pThisCC, pStream, pStreamCC, fForce);
    22552255}
    22562256
     
    22842284
    22852285        /* (Re-)Open the stream if necessary. */
    2286         rc = ichac97R3StreamOpen(pDevIns, pThis, pThisCC, pStream, pStreamCC, false /* fForce */);
     2286        rc = ichac97R3StreamSetUp(pDevIns, pThis, pThisCC, pStream, pStreamCC, false /* fForce */);
    22872287
    22882288        /* Re-register the update job with the AIO thread with correct sched hint.
     
    23212321    {
    23222322        rc = AudioMixerSinkDrainAndStop(pSink, pStreamCC->State.pCircBuf ? (uint32_t)RTCircBufUsed(pStreamCC->State.pCircBuf) : 0);
    2323         ichac97R3StreamClose(pStream);
     2323        ichac97R3StreamTearDown(pStream);
    23242324    }
    23252325
     
    23602360 * @param   pStream             The AC'97 stream to destroy (shared).
    23612361 * @param   pStreamCC           The AC'97 stream to destroy (ring-3).
    2362  * @sa      ichac97R3StreamCreate
     2362 * @sa      ichac97R3StreamConstruct
    23632363 */
    23642364static void ichac97R3StreamDestroy(PAC97STATER3 pThisCC, PAC97STREAM pStream, PAC97STREAMR3 pStreamCC)
     
    23662366    LogFlowFunc(("[SD%RU8]\n", pStream->u8SD));
    23672367
    2368     ichac97R3StreamClose(pStream);
     2368    ichac97R3StreamTearDown(pStream);
    23692369
    23702370    int rc2 = RTCritSectDelete(&pStreamCC->State.CritSect);
     
    24122412 * @sa      ichac97R3StreamDestroy
    24132413 */
    2414 static int ichac97R3StreamCreate(PAC97STATER3 pThisCC, PAC97STREAM pStream, PAC97STREAMR3 pStreamCC, uint8_t u8SD)
     2414static int ichac97R3StreamConstruct(PAC97STATER3 pThisCC, PAC97STREAM pStream, PAC97STREAMR3 pStreamCC, uint8_t u8SD)
    24152415{
    24162416    LogFunc(("[SD%RU8] pStream=%p\n", u8SD, pStream));
     
    34003400                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34013401                         *        actually used? */
    3402                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PO_INDEX],
     3402                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PO_INDEX],
    34033403                                              &pThisCC->aStreams[AC97SOUNDSOURCE_PO_INDEX], true /* fForce */);
    34043404
     
    34063406                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34073407                         *        actually used? */
    3408                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PI_INDEX],
     3408                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PI_INDEX],
    34093409                                              &pThisCC->aStreams[AC97SOUNDSOURCE_PI_INDEX], true /* fForce */);
    34103410                    }
     
    34203420                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34213421                         *        actually used? */
    3422                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_MC_INDEX],
     3422                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_MC_INDEX],
    34233423                                              &pThisCC->aStreams[AC97SOUNDSOURCE_MC_INDEX], true /* fForce */);
    34243424                    }
     
    34403440                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34413441                         *        actually used? */
    3442                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PO_INDEX],
     3442                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PO_INDEX],
    34433443                                              &pThisCC->aStreams[AC97SOUNDSOURCE_PO_INDEX], true /* fForce */);
    34443444                    }
     
    34573457                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34583458                         *        actually used? */
    3459                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_MC_INDEX],
     3459                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_MC_INDEX],
    34603460                                              &pThisCC->aStreams[AC97SOUNDSOURCE_MC_INDEX], true /* fForce */);
    34613461                    }
     
    34743474                        /** @todo r=bird: Why reopen it now?  Can't we put that off till it's
    34753475                         *        actually used? */
    3476                         ichac97R3StreamReOpen(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PI_INDEX],
     3476                        ichac97R3StreamReSetUp(pDevIns, pThis, pThisCC, &pThis->aStreams[AC97SOUNDSOURCE_PI_INDEX],
    34773477                                              &pThisCC->aStreams[AC97SOUNDSOURCE_PI_INDEX], true /* fForce */);
    34783478                    }
     
    43934393    for (unsigned i = 0; i < AC97_MAX_STREAMS; i++)
    43944394    {
    4395         rc = ichac97R3StreamCreate(pThisCC, &pThis->aStreams[i], &pThisCC->aStreams[i], i /* SD# */);
     4395        rc = ichac97R3StreamConstruct(pThisCC, &pThis->aStreams[i], &pThisCC->aStreams[i], i /* SD# */);
    43964396        AssertRCReturn(rc, rc);
    43974397    }
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