Skip to content
Snippets Groups Projects
Commit 5e32daa2 authored by euquiq's avatar euquiq
Browse files

Speaker icon sync with headphones

Speaker icon now behaves naturally: When the speaker amp is off (muted speaker), the headphones amp is on, and viceversa.

Fom now on, whenever a future app needs to turn audio output ON, it will depend on the speaker mode.

For example:

Before, you just did audio::output::unmute(); to activate audio output.

Now, you do: portapack::set_speaker_mode(portapack::speaker_mode);

Which will take into account (if present) the speaker mode, and either unmute the headphones, or the speaker.

If the user has no Speaker Icon active on the Status-bar (as may be the case with H2 users), it will always unmute the headphones.

This new approach has the added benefit of not turning on two amps at the same time (the headphones AND speaker) inside the AK4951 audio codec IC.
parent 85664c27
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment