Skip to content
Snippets Groups Projects
  • euquiq's avatar
    Speaker icon sync with headphones · 5e32daa2
    euquiq authored
    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.
    5e32daa2