Changeset 89636 in vbox
- Timestamp:
- Jun 11, 2021 6:20:31 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r89613 r89636 47 47 * Defined Constants And Macros * 48 48 *********************************************************************************************************************************/ 49 50 49 /** Current saved state version. */ 51 50 #define AC97_SAVED_STATE_VERSION 1 … … 57 56 #define AC97_MAX_STREAMS 3 58 57 59 /** Maximum FIFO size (in bytes) . */58 /** Maximum FIFO size (in bytes) - unused. */ 60 59 #define AC97_FIFO_MAX 256 61 60 61 /** @name AC97_SR_XXX - Status Register Bits (AC97_NABM_OFF_SR, PI_SR, PO_SR, MC_SR). 62 * @{ */ 62 63 #define AC97_SR_FIFOE RT_BIT(4) /**< rwc, FIFO error. */ 63 64 #define AC97_SR_BCIS RT_BIT(3) /**< rwc, Buffer completion interrupt status. */ … … 69 70 #define AC97_SR_RO_MASK (AC97_SR_DCH | AC97_SR_CELV) 70 71 #define AC97_SR_INT_MASK (AC97_SR_FIFOE | AC97_SR_BCIS | AC97_SR_LVBCI) 71 72 /** @} */ 73 74 /** @name AC97_CR_XXX - Control Register Bits (AC97_NABM_OFF_CR, PI_CR, PO_CR, MC_CR). 75 * @{ */ 72 76 #define AC97_CR_IOCE RT_BIT(4) /**< rw, Interrupt On Completion Enable. */ 73 77 #define AC97_CR_FEIE RT_BIT(3) /**< rw FIFO Error Interrupt Enable. */ … … 77 81 #define AC97_CR_VALID_MASK (RT_BIT(5) - 1) 78 82 #define AC97_CR_DONT_CLEAR_MASK (AC97_CR_IOCE | AC97_CR_FEIE | AC97_CR_LVBIE) 79 83 /** @} */ 84 85 /** @name AC97_GC_XXX - Global Control Bits (see AC97_GLOB_CNT). */ 80 86 #define AC97_GC_WR 4 /**< rw Warm reset. */ 81 87 #define AC97_GC_CR 2 /**< rw Cold reset. */ 82 88 #define AC97_GC_VALID_MASK (RT_BIT(6) - 1) 83 89 /** @} */ 90 91 /** @name AC97_GS_XXX - Global Status Bits (AC97_GLOB_STA). 92 * @{ */ 84 93 #define AC97_GS_MD3 RT_BIT(17) /**< rw */ 85 94 #define AC97_GS_AD3 RT_BIT(16) /**< rw */ … … 112 121 #define AC97_GS_VALID_MASK (RT_BIT(18) - 1) 113 122 #define AC97_GS_WCLEAR_MASK (AC97_GS_RCS | AC97_GS_S1R1 | AC97_GS_S0R1 | AC97_GS_GSCI) 114 115 /** @name Buffer Descriptor (BD). 123 /** @} */ 124 125 /** @name Buffer Descriptor (BDLE, BDL). 116 126 * @{ */ 117 127 #define AC97_BD_IOC RT_BIT(31) /**< Interrupt on Completion. */ … … 208 218 #define BUP_SET RT_BIT_32(0) 209 219 #define BUP_LAST RT_BIT_32(1) 210 /** @} 220 /** @} */ 211 221 212 222 /** @name AC'97 source indices. … … 735 745 /** @name Source indices 736 746 * @{ */ 737 # define AC97SOUNDSOURCE_PI_INDEX0 /**< PCM in */738 # define AC97SOUNDSOURCE_PO_INDEX1 /**< PCM out */739 # define AC97SOUNDSOURCE_MC_INDEX2 /**< Mic in */740 # define AC97SOUNDSOURCE_MAX3 /**< Max sound sources. */747 # define AC97SOUNDSOURCE_PI_INDEX 0 /**< PCM in */ 748 # define AC97SOUNDSOURCE_PO_INDEX 1 /**< PCM out */ 749 # define AC97SOUNDSOURCE_MC_INDEX 2 /**< Mic in */ 750 # define AC97SOUNDSOURCE_MAX 3 /**< Max sound sources. */ 741 751 /** @} */ 742 752 743 753 /** Port number (offset into NABM BAR) to stream index. */ 744 # define AC97_PORT2IDX(a_idx)( ((a_idx) >> 4) & 3 )754 # define AC97_PORT2IDX(a_idx) ( ((a_idx) >> 4) & 3 ) 745 755 /** Port number (offset into NABM BAR) to stream index, but no masking. */ 746 # define AC97_PORT2IDX_UNMASKED(a_idx)( ((a_idx) >> 4) )756 # define AC97_PORT2IDX_UNMASKED(a_idx) ( ((a_idx) >> 4) ) 747 757 748 758 /** @name Stream offsets 749 759 * @{ */ 750 # define AC97_NABM_OFF_BDBAR0x0 /**< Buffer Descriptor Base Address */751 # define AC97_NABM_OFF_CIV0x4 /**< Current Index Value */752 # define AC97_NABM_OFF_LVI0x5 /**< Last Valid Index */753 # define AC97_NABM_OFF_SR0x6 /**< Status Register */754 # define AC97_NABM_OFF_PICB0x8 /**< Position in Current Buffer */755 # define AC97_NABM_OFF_PIV0xa /**< Prefetched Index Value */756 # define AC97_NABM_OFF_CR0xb /**< Control Register */757 # define AC97_NABM_OFF_MASK0xf /**< Mask for getting the the per-stream register. */760 # define AC97_NABM_OFF_BDBAR 0x0 /**< Buffer Descriptor Base Address */ 761 # define AC97_NABM_OFF_CIV 0x4 /**< Current Index Value */ 762 # define AC97_NABM_OFF_LVI 0x5 /**< Last Valid Index */ 763 # define AC97_NABM_OFF_SR 0x6 /**< Status Register */ 764 # define AC97_NABM_OFF_PICB 0x8 /**< Position in Current Buffer */ 765 # define AC97_NABM_OFF_PIV 0xa /**< Prefetched Index Value */ 766 # define AC97_NABM_OFF_CR 0xb /**< Control Register */ 767 # define AC97_NABM_OFF_MASK 0xf /**< Mask for getting the the per-stream register. */ 758 768 /** @} */ 759 769 760 #endif 770 #endif /* IN_RING3 */ 761 771 762 772
Note:
See TracChangeset
for help on using the changeset viewer.