Changeset 65020 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Dec 29, 2016 9:23:50 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112515
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r65019 r65020 509 509 } 510 510 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 */ 511 518 DECLINLINE(PAUDMIXSINK) ichac97IndexToSink(PAC97STATE pThis, uint8_t uIndex) 512 519 { … … 525 532 } 526 533 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 */ 528 543 static void ichac97StreamFetchBDLE(PAC97STATE pThis, PAC97STREAM pStream) 529 544 { … … 549 564 550 565 /** 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). 552 571 */ 553 572 static void ichac97StreamUpdateSR(PAC97STATE pThis, PAC97STREAM pStream, uint32_t new_sr) … … 620 639 } 621 640 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 */ 622 649 static int ichac97StreamEnable(PAC97STATE pThis, PAC97STREAM pStream, bool fEnable) 623 650 { … … 713 740 714 741 /** 715 * Creates an AC'97 stream.742 * Creates an AC'97 audio stream. 716 743 * 717 744 * @returns IPRT status code. … … 738 765 739 766 /** 740 * Destroys an AC'97 stream.767 * Destroys an AC'97 audio stream. 741 768 * 742 769 * @returns IPRT status code. … … 768 795 769 796 /** 770 * Creates all AC'97 streams forthe device.797 * Creates all AC'97 audio streams of the device. 771 798 * 772 799 * @returns IPRT status code. … … 822 849 } 823 850 851 /** 852 * Destroys all AC'97 audio streams of the device. 853 * 854 * @param pThis AC'97 state. 855 */ 824 856 static void ichac97StreamsDestroy(PAC97STATE pThis) 825 857 { … … 1704 1736 } 1705 1737 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 */ 1706 1749 static int ichac97MixerSetVolume(PAC97STATE pThis, int index, PDMAUDIOMIXERCTL enmMixerCtl, uint32_t uVal) 1707 1750 { … … 1798 1841 } 1799 1842 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 */ 1800 1849 static PDMAUDIORECSOURCE ichac97IndextoRecSource(uint8_t i) 1801 1850 { … … 1816 1865 } 1817 1866 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 */ 1818 1873 static uint8_t ichac97RecSourceToIndex(PDMAUDIORECSOURCE rs) 1819 1874 { … … 1834 1889 } 1835 1890 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 */ 1836 1898 static void ichac97RecordSelect(PAC97STATE pThis, uint32_t val) 1837 1899 { … … 1845 1907 } 1846 1908 1909 /** 1910 * Resets the AC'97 mixer. 1911 * 1912 * @returns IPRT status code. 1913 * @param pThis AC'97 state. 1914 */ 1847 1915 static int ichac97MixerReset(PAC97STATE pThis) 1848 1916 { … … 1949 2017 1950 2018 #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 */ 1951 2024 static void ichac97TimerMaybeStart(PAC97STATE pThis) 1952 2025 { … … 1972 2045 } 1973 2046 2047 /** 2048 * Stops the internal audio device timer (if not stopped yet). 2049 * 2050 * @param pThis AC'97 state. 2051 */ 1974 2052 static void ichac97TimerMaybeStop(PAC97STATE pThis) 1975 2053 { … … 1989 2067 } 1990 2068 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 */ 1991 2075 static void ichac97DoTransfers(PAC97STATE pThis) 1992 2076 { … … 2030 2114 #endif /* !VBOX_WITH_AUDIO_AC97_CALLBACKS */ 2031 2115 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 */ 2032 2123 static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 2033 2124 { … … 2817 2908 } 2818 2909 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 */ 2819 2916 DECLINLINE(PAC97STREAM) ichac97GetStreamFromID(PAC97STATE pThis, uint32_t uID) 2820 2917 { … … 2831 2928 2832 2929 #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 */ 2833 2938 static int ichac97SaveStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream) 2834 2939 { … … 2886 2991 } 2887 2992 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 */ 2888 3001 static int ichac97LoadStream(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, PAC97STREAM pStream) 2889 3002 {
Note:
See TracChangeset
for help on using the changeset viewer.