Changeset 104529 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- May 7, 2024 9:43:37 AM (7 months ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp
r98103 r104529 806 806 AssertCompile(STAC9221_NUM_NODES <= RT_ELEMENTS(pThis->aNodes)); 807 807 pCfg->cTotalNodes = STAC9221_NUM_NODES; 808 pCfg->idxAdcVolsLineIn = STAC9220_NID_AMP_ADC0; 808 pCfg->idxAdcVolsLineIn = STAC9220_NID_AMP_ADC0; /* We treat ADC0 as Line-In. */ 809 pCfg->idxAdcVolsMicIn = STAC9220_NID_AMP_ADC1; /* We treat ADC1 as Mic-In. */ 809 810 pCfg->idxDacLineOut = STAC9220_NID_DAC1; 810 811 … … 2106 2107 hdaCodecSetRegisterU8(&LIFIER_REGISTER(*pAmplifier, AMPLIFIER_IN, AMPLIFIER_RIGHT, u8Index), uCmd, 0); 2107 2108 2108 /* 2109 * Check if the node ID is the one we use for controlling the line-in volume; 2110 * with STAC9220 this is connected to STAC9220_NID_AMP_ADC0 (ID 0x17). 2111 * 2112 * If we don't do this check here, some guests like newer Ubuntus mute mic-in 2113 * afterwards (connected to STAC9220_NID_AMP_ADC1 (ID 0x18)). This then would 2114 * also mute line-in, which breaks audio recording. 2115 * 2116 * See STAC9220 V1.0 01/08, p. 30 + oem2ticketref:53. 2117 */ 2118 if (CODEC_NID(uCmd) == pThis->Cfg.idxAdcVolsLineIn) 2119 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN); 2120 2121 #ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 2122 # error "Implement mic-in volume / mute setting." 2123 else if (CODEC_NID(uCmd) == pThis->Cfg.idxAdcVolsMicIn) 2124 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_MIC_IN); 2109 switch (pThis->Cfg.enmType) 2110 { 2111 case CODECTYPE_STAC9220: 2112 { 2113 /* 2114 * Check if the node ID is the one we use for controlling the recording (capturing) volume + mute status. 2115 * 2116 * The STAC9220 codec is connected to STAC9220_NID_AMP_ADC0 (ID 0x17) and 2117 * STAC9220_NID_AMP_ADC0 (ID 0x18). 2118 * 2119 * If we don't do this check here, some guests like newer Ubuntus mute mic-in 2120 * afterwards (connected to STAC9220_NID_AMP_ADC1 (ID 0x18)). This then would 2121 * also mute line-in, which breaks audio recording. 2122 * 2123 * See STAC9220 V1.0 01/08, p. 30 + @oem2ticketref{53}. 2124 */ 2125 if (CODEC_NID(uCmd) == pThis->Cfg.idxAdcVolsLineIn) 2126 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN); 2127 2128 #ifdef VBOX_AUDIO_HDA_MIC_IN_AS_LINE_IN 2129 /* Newer Windows 10 versions use STAC9220_NID_AMP_ADC1 (ID 0x18) for microphone 2130 * volume control by default. */ 2131 # ifndef VBOX_WITH_AUDIO_HDA_MIC_IN 2132 /* If we don't implement dedicated microphone-in support (we then only offer recording via line-in), 2133 * make sure to propagate volume control from mic-in to our line-in mixer control. See @oem2ticketref{93}. */ 2134 else if (CODEC_NID(uCmd) == pThis->Cfg.idxAdcVolsMicIn) 2135 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN); 2136 # endif 2125 2137 #endif 2126 2138 break; 2139 } 2140 2141 default: 2142 /* Nothing to do here. */ 2143 break; 2144 } 2127 2145 } 2128 2146 if (fIsOut) -
trunk/src/VBox/Devices/Audio/DevHdaCodec.h
r98103 r104529 837 837 uint8_t cTotalNodes; 838 838 uint8_t idxAdcVolsLineIn; 839 uint8_t idxAdcVolsMicIn; 839 840 uint8_t idxDacLineOut; 840 841 841 842 /** Align the lists below so they don't cross cache lines (assumes 842 843 * CODEC_NODES_MAX is 32). */ 843 uint8_t const abPadding1[CODEC_NODES_MAX - 1 5];844 uint8_t const abPadding1[CODEC_NODES_MAX - 16]; 844 845 845 846 /** @name Node classifications.
Note:
See TracChangeset
for help on using the changeset viewer.