Changeset 59280 in vbox for trunk/src/VBox/Devices/Audio/DevIchHda.cpp
- Timestamp:
- Jan 7, 2016 6:02:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchHda.cpp
r59275 r59280 55 55 #define VBOX_WITH_INTEL_HDA 56 56 57 #if (defined(DEBUG) && defined(DEBUG_andy))57 #ifdef DEBUG_andy 58 58 /* Enables experimental support for separate mic-in handling. 59 59 Do not enable this yet for regular builds, as this needs more testing first! */ 60 # define VBOX_WITH_HDA_MIC_IN60 //# define VBOX_WITH_HDA_MIC_IN 61 61 #endif 62 62 … … 3630 3630 3631 3631 /* Save number of streams. */ 3632 #ifdef VBOX_WITH_HDA_MIC_IN 3632 3633 SSMR3PutU32(pSSM, 3); 3634 #else 3635 SSMR3PutU32(pSSM, 2); 3636 #endif 3633 3637 3634 3638 /* Save stream states. */ 3635 3639 int rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStOut); 3636 3640 AssertRCReturn(rc, rc); 3641 #ifdef VBOX_WITH_HDA_MIC_IN 3637 3642 rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStMicIn); 3638 3643 AssertRCReturn(rc, rc); 3644 #endif 3639 3645 rc = hdaSaveStream(pDevIns, pSSM, &pThis->StrmStLineIn); 3640 3646 AssertRCReturn(rc, rc); … … 3808 3814 switch (uStreamID) 3809 3815 { 3810 case 0: /** @todo Use a define. */3816 case 0: /** @todo Implement dynamic stream IDs. */ 3811 3817 pStrm = &pThis->StrmStLineIn; 3812 3818 break; 3813 3814 case 2: /** @todo Use a define. */3819 #ifdef VBOX_WITH_HDA_MIC_IN 3820 case 2: /** @todo Implement dynamic stream IDs. */ 3815 3821 pStrm = &pThis->StrmStMicIn; 3816 3822 break; 3817 3818 case 4: /** @todo Use a define. */3823 #endif 3824 case 4: /** @todo Implement dynamic stream IDs. */ 3819 3825 pStrm = &pThis->StrmStOut; 3820 3826 break; … … 3829 3835 if (RT_FAILURE(rc)) 3830 3836 break; 3831 3837 #ifdef DEBUG 3838 uint32_t cBDLE = pStrm->State.cBDLE; 3839 LogFlowFunc(("Stream #%RU32: ID=%RU8, cBDLE=%RU32\n", i, uStreamID, cBDLE)); 3840 #endif 3832 3841 rc = hdaStreamInit(pThis, pStrm, uStreamID); 3833 3842 if (RT_FAILURE(rc)) … … 3836 3845 break; 3837 3846 } 3838 3847 #ifdef DEBUG 3848 AssertMsg(cBDLE == pStrm->State.cBDLE, ("Loaded BDLE states (%RU32) vs. emulated ones (%RU32) don't match\n", 3849 cBDLE, pStrm->State.cBDLE)); 3850 #endif 3839 3851 /* Load BDLE states. */ 3840 3852 for (uint32_t a = 0; a < pStrm->State.cBDLE; a++) … … 4168 4180 pThis->u64BaseTS = PDMDevHlpTMTimeVirtGetNano(pDevIns); 4169 4181 4182 # ifndef VBOX_WITH_AUDIO_CALLBACKS 4170 4183 /* 4171 4184 * Stop the timer, if any. … … 4177 4190 AssertRC(rc2); 4178 4191 } 4192 # endif 4179 4193 4180 4194 for (uint8_t u8Strm = 0; u8Strm < 8; u8Strm++) /** @todo Use a define here. */ 4181 4195 { 4182 4196 PHDASTREAM pStrmSt = NULL; 4183 if (u8Strm == 0) 4184 pStrmSt = &pThis->StrmSt Out;4197 if (u8Strm == 0) /** @todo Implement dynamic stream IDs. */ 4198 pStrmSt = &pThis->StrmStLineIn; 4185 4199 # ifdef VBOX_WITH_HDA_MIC_IN 4186 else if (u8Strm == 2) 4200 else if (u8Strm == 2) /** @todo Implement dynamic stream IDs. */ 4187 4201 pStrmSt = &pThis->StrmStMicIn; 4188 4202 # endif 4189 else if (u8Strm == 4) 4190 pStrmSt = &pThis->StrmSt LineIn;4203 else if (u8Strm == 4) /** @todo Implement dynamic stream IDs. */ 4204 pStrmSt = &pThis->StrmStOut; 4191 4205 4192 4206 if (pStrmSt) … … 4202 4216 HDA_REG(pThis, STATESTS) = 0x1; 4203 4217 4218 # ifndef VBOX_WITH_AUDIO_CALLBACKS 4204 4219 /* 4205 4220 * Start timer again, if any. … … 4210 4225 AssertRC(rc2); 4211 4226 } 4227 # endif 4212 4228 4213 4229 LogRel(("HDA: Reset\n"));
Note:
See TracChangeset
for help on using the changeset viewer.