Skip to content

Commit 87a2583

Browse files
Disable conversational awareness in transparency mode to avoid volume bugs
Co-authored-by: YimingZhanshen <76594627+YimingZhanshen@users.noreply.github.com>
1 parent ed3085b commit 87a2583

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Source/Core/AirPods.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,9 @@ void Manager::OnNoiseControlModeNotification(AAP::NoiseControlMode mode)
918918
{
919919
LOG(Info, "Noise control mode changed to: {}", Helper::ToString(mode).toStdString());
920920

921+
// Track the current noise control mode
922+
_currentNoiseControlMode = mode;
923+
921924
// Update the cached state in the state manager if we have a current state
922925
auto state = _stateMgr.GetCurrentState();
923926
if (state.has_value()) {
@@ -986,6 +989,14 @@ void Manager::OnSpeakingLevelChanged(AAP::SpeakingLevel level)
986989
return;
987990
}
988991

992+
// Disable conversational awareness in transparency mode to avoid volume restoration bugs
993+
// The AAP firmware in transparency mode doesn't reliably send restoration events
994+
if (_currentNoiseControlMode.has_value() &&
995+
_currentNoiseControlMode.value() == AAP::NoiseControlMode::Transparency) {
996+
LOG(Info, "Conversational awareness disabled in transparency mode to avoid volume bugs");
997+
return;
998+
}
999+
9891000
switch (level) {
9901001
case AAP::SpeakingLevel::StartedSpeaking_GreatlyReduce:
9911002
case AAP::SpeakingLevel::StartedSpeaking_GreatlyReduce2:

Source/Core/AirPods.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ class Manager
208208
bool _personalizedVolumeEnabled{false};
209209
bool _loudSoundReductionEnabled{false};
210210
uint8_t _adaptiveTransparencyLevel{25};
211+
std::optional<AAP::NoiseControlMode> _currentNoiseControlMode;
211212

212213
// AAP Manager for L2CAP protocol communication
213214
AAP::Manager _aapMgr;

0 commit comments

Comments
 (0)