mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 13:37:41 +00:00
Moved AK Speaker Disable back to a title bar, and modified Mute Icon to differentiate (#1192)
* Added fn to indicate support for disabling speaker * Support both mute & speaker disable icons * Byte grouping for ui_config2_t bitmap * Fix disabling AK speaker to take effect immediately
This commit is contained in:
@@ -837,6 +837,10 @@ class AK4951 : public audio::Codec {
|
||||
void speaker_enable();
|
||||
void speaker_disable();
|
||||
|
||||
bool speaker_disable_supported() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
void set_headphone_volume(const volume_t volume) override;
|
||||
void headphone_mute();
|
||||
|
||||
|
@@ -265,9 +265,11 @@ struct ui_config2_t {
|
||||
bool hide_clock : 1;
|
||||
bool hide_sd_card : 1;
|
||||
|
||||
bool hide_mute : 1;
|
||||
bool UNUSED : 7;
|
||||
|
||||
uint8_t placeholder_1;
|
||||
uint8_t placeholder_2;
|
||||
uint8_t placeholder_3;
|
||||
};
|
||||
static_assert(sizeof(ui_config2_t) == sizeof(uint32_t));
|
||||
|
||||
@@ -861,6 +863,9 @@ void set_recon_auto_record_locked(const bool v) {
|
||||
bool ui_hide_speaker() {
|
||||
return data->ui_config2.hide_speaker;
|
||||
}
|
||||
bool ui_hide_mute() {
|
||||
return data->ui_config2.hide_mute;
|
||||
}
|
||||
bool ui_hide_converter() {
|
||||
return data->ui_config2.hide_converter;
|
||||
}
|
||||
@@ -886,6 +891,9 @@ bool ui_hide_sd_card() {
|
||||
void set_ui_hide_speaker(bool v) {
|
||||
data->ui_config2.hide_speaker = v;
|
||||
}
|
||||
void set_ui_hide_mute(bool v) {
|
||||
data->ui_config2.hide_mute = v;
|
||||
}
|
||||
void set_ui_hide_converter(bool v) {
|
||||
data->ui_config2.hide_converter = v;
|
||||
if (v)
|
||||
@@ -1084,6 +1092,7 @@ bool debug_dump() {
|
||||
pmem_dump_file.write_line("ui_config2 hide_bias_tee: " + to_string_dec_uint(data->ui_config2.hide_bias_tee));
|
||||
pmem_dump_file.write_line("ui_config2 hide_clock: " + to_string_dec_uint(data->ui_config2.hide_clock));
|
||||
pmem_dump_file.write_line("ui_config2 hide_sd_card: " + to_string_dec_uint(data->ui_config2.hide_sd_card));
|
||||
pmem_dump_file.write_line("ui_config2 hide_mute: " + to_string_dec_uint(data->ui_config2.hide_mute));
|
||||
|
||||
// misc_config bits
|
||||
pmem_dump_file.write_line("misc_config config_audio_mute: " + to_string_dec_int(config_audio_mute()));
|
||||
|
@@ -252,6 +252,7 @@ void set_recon_match_mode(const bool v);
|
||||
|
||||
/* UI Config 2 */
|
||||
bool ui_hide_speaker();
|
||||
bool ui_hide_mute();
|
||||
bool ui_hide_converter();
|
||||
bool ui_hide_stealth();
|
||||
bool ui_hide_camera();
|
||||
@@ -260,6 +261,7 @@ bool ui_hide_bias_tee();
|
||||
bool ui_hide_clock();
|
||||
bool ui_hide_sd_card();
|
||||
void set_ui_hide_speaker(bool v);
|
||||
void set_ui_hide_mute(bool v);
|
||||
void set_ui_hide_converter(bool v);
|
||||
void set_ui_hide_stealth(bool v);
|
||||
void set_ui_hide_camera(bool v);
|
||||
|
@@ -345,6 +345,9 @@ class WM8731 : public audio::Codec {
|
||||
|
||||
void speaker_enable(){};
|
||||
void speaker_disable(){};
|
||||
bool speaker_disable_supported() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
void microphone_enable(int8_t wm8731_boost_GUI) override {
|
||||
microphone_mute(true); // c/m to reduce "plop noise" when changing wm8731_boost_GUI.
|
||||
|
Reference in New Issue
Block a user