Persistent audio mute support revisions (#1169)

* Don't disable DAC when other audio output is using it
* Persistent audio mute revisions
* Moved persistent audio mute code to audio.cpp
* Make "Disable AK speaker amp" take effect immediately
This commit is contained in:
Mark Thompson 2023-06-19 14:06:07 -05:00 committed by GitHub
parent f83027d451
commit fa06df1400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 38 deletions

View file

@ -166,15 +166,6 @@ void unmute() {
}
}
void speaker_disable() {
cfg_speaker_disable = true;
audio_codec->speaker_disable();
}
void speaker_enable() {
cfg_speaker_disable = false;
}
// The following functions are used by the navigation-bar Speaker Mute only,
// and override all other audio mute/unmute requests from apps
void speaker_mute() {
@ -191,6 +182,15 @@ void speaker_unmute() {
}
}
void update_audio_mute() {
cfg_speaker_disable = portapack::persistent_memory::config_speaker_disable();
if (portapack::persistent_memory::config_audio_mute())
speaker_mute();
else
speaker_unmute();
}
} /* namespace output */
namespace input {