VirtualBox

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


Ignore:
Timestamp:
Dec 29, 2016 9:23:50 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112515
Message:

Documentation.

File:
1 edited

Legend:

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

    r65019 r65020  
    509509}
    510510
     511/**
     512 * Retrieves the audio mixer sink of a corresponding AC'97 stream index.
     513 *
     514 * @returns Pointer to audio mixer sink if found, or NULL if not found / invalid.
     515 * @param   pThis               AC'97 state.
     516 * @param   uIndex              Stream index to get audio mixer sink for.
     517 */
    511518DECLINLINE(PAUDMIXSINK) ichac97IndexToSink(PAC97STATE pThis, uint8_t uIndex)
    512519{
     
    525532}
    526533
    527 /** Fetches the buffer descriptor at _CIV. */
     534/**
     535 * Fetches the current BDLE (Buffer Descriptor List Entry) of an AC'97 audio stream.
     536 *
     537 * @returns IPRT status code.
     538 * @param   pThis               AC'97 state.
     539 * @param   pStream             AC'97 stream to fetch BDLE for.
     540 *
     541 * @remark  Uses CIV as BDLE index.
     542 */
    528543static void ichac97StreamFetchBDLE(PAC97STATE pThis, PAC97STREAM pStream)
    529544{
     
    549564
    550565/**
    551  * Update the BM status register
     566 * Updates the status register (SR) of an AC'97 audio stream.
     567 *
     568 * @param   pThis               AC'97 state.
     569 * @param   pStream             AC'97 stream to update SR for.
     570 * @param   new_sr              New value for status register (SR).
    552571 */
    553572static void ichac97StreamUpdateSR(PAC97STATE pThis, PAC97STREAM pStream, uint32_t new_sr)
     
    620639}
    621640
     641/**
     642 * Enables or disables an AC'97 audio stream.
     643 *
     644 * @returns IPRT status code.
     645 * @param   pThis               AC'97 state.
     646 * @param   pStream             AC'97 stream to enable or disable.
     647 * @param   fEnable             Whether to enable or disble the stream.
     648 */
    622649static int ichac97StreamEnable(PAC97STATE pThis, PAC97STREAM pStream, bool fEnable)
    623650{
     
    713740
    714741/**
    715  * Creates an AC'97 stream.
     742 * Creates an AC'97 audio stream.
    716743 *
    717744 * @returns IPRT status code.
     
    738765
    739766/**
    740  * Destroys an AC'97 stream.
     767 * Destroys an AC'97 audio stream.
    741768 *
    742769 * @returns IPRT status code.
     
    768795
    769796/**
    770  * Creates all AC'97 streams for the device.
     797 * Creates all AC'97 audio streams of the device.
    771798 *
    772799 * @returns IPRT status code.
     
    822849}
    823850
     851/**
     852 * Destroys all AC'97 audio streams of the device.
     853 *
     854 * @param   pThis               AC'97 state.
     855 */
    824856static void ichac97StreamsDestroy(PAC97STATE pThis)
    825857{
     
    17041736}
    17051737
     1738/**
     1739 * Sets the volume of a specific AC'97 mixer control.
     1740 *
     1741 * This currently only supports attenuation -- gain support is currently not implemented.
     1742 *
     1743 * @returns IPRT status code.
     1744 * @param   pThis               AC'97 state.
     1745 * @param   index               AC'97 mixer index to set volume for.
     1746 * @param   enmMixerCtl         Corresponding audio mixer sink.
     1747 * @param   uVal                Volume value to set.
     1748 */
    17061749static int ichac97MixerSetVolume(PAC97STATE pThis, int index, PDMAUDIOMIXERCTL enmMixerCtl, uint32_t uVal)
    17071750{
     
    17981841}
    17991842
     1843/**
     1844 * Converts an AC'97 recording source index to a PDM audio recording source.
     1845 *
     1846 * @returns PDM audio recording source.
     1847 * @param   i                   AC'97 index to convert.
     1848 */
    18001849static PDMAUDIORECSOURCE ichac97IndextoRecSource(uint8_t i)
    18011850{
     
    18161865}
    18171866
     1867/**
     1868 * Converts a PDM audio recording source to an AC'97 recording source index.
     1869 *
     1870 * @returns AC'97 recording source index.
     1871 * @param   rs                  PDM audio recording source to convert.
     1872 */
    18181873static uint8_t ichac97RecSourceToIndex(PDMAUDIORECSOURCE rs)
    18191874{
     
    18341889}
    18351890
     1891/**
     1892 * Performs an AC'97 mixer record select to switch to a different recording
     1893 * source.
     1894 *
     1895 * @param   pThis               AC'97 state.
     1896 * @param   val                 AC'97 recording source index to set.
     1897 */
    18361898static void ichac97RecordSelect(PAC97STATE pThis, uint32_t val)
    18371899{
     
    18451907}
    18461908
     1909/**
     1910 * Resets the AC'97 mixer.
     1911 *
     1912 * @returns IPRT status code.
     1913 * @param   pThis               AC'97 state.
     1914 */
    18471915static int ichac97MixerReset(PAC97STATE pThis)
    18481916{
     
    19492017
    19502018#ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     2019/**
     2020 * Starts the internal audio device timer (if not started yet).
     2021 *
     2022 * @param   pThis               AC'97 state.
     2023 */
    19512024static void ichac97TimerMaybeStart(PAC97STATE pThis)
    19522025{
     
    19722045}
    19732046
     2047/**
     2048 * Stops the internal audio device timer (if not stopped yet).
     2049 *
     2050 * @param   pThis               AC'97 state.
     2051 */
    19742052static void ichac97TimerMaybeStop(PAC97STATE pThis)
    19752053{
     
    19892067}
    19902068
     2069/**
     2070 * Main routine to perform the actual audio data transfers from the AC'97 streams
     2071 * to the backend(s) and vice versa.
     2072 *
     2073 * @param   pThis               AC'97 state.
     2074 */
    19912075static void ichac97DoTransfers(PAC97STATE pThis)
    19922076{
     
    20302114#endif /* !VBOX_WITH_AUDIO_AC97_CALLBACKS */
    20312115
     2116/**
     2117 * Timer callback which handles the audio data transfers on a periodic basis.
     2118 *
     2119 * @param   pDevIns             Device instance.
     2120 * @param   pTimer              Timer which was used when calling this.
     2121 * @param   pvUser              User argument as PAC97STATE.
     2122 */
    20322123static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    20332124{
     
    28172908}
    28182909
     2910/**
     2911 * Retrieves an AC'97 audio stream from an AC'97 stream index.
     2912 *
     2913 * @returns Pointer to AC'97 audio stream if found, or NULL if not found / invalid.
     2914 * @param                       AC'97 state.
     2915 */
    28192916DECLINLINE(PAC97STREAM) ichac97GetStreamFromID(PAC97STATE pThis, uint32_t uID)
    28202917{
     
    28312928
    28322929#ifdef IN_RING3
     2930/**
     2931 * Saves (serializes) an AC'97 stream using SSM.
     2932 *
     2933 * @returns IPRT status code.
     2934 * @param   pDevIns             Device instance.
     2935 * @param   pSSM                Saved state manager (SSM) handle to use.
     2936 * @param   pStream             AC'97 stream to save.
     2937 */
    28332938static int ichac97SaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream)
    28342939{
     
    28862991}
    28872992
     2993/**
     2994 * Loads an AC'97 stream from SSM.
     2995 *
     2996 * @returns IPRT status code.
     2997 * @param   pDevIns             Device instance.
     2998 * @param   pSSM                Saved state manager (SSM) handle to use.
     2999 * @param   pStream             AC'97 stream to load.
     3000 */
    28883001static int ichac97LoadStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream)
    28893002{
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette