Skip to content
Snippets Groups Projects
Commit a801b78f authored by dx's avatar dx Committed by moon2
Browse files

Headphone detection override state in audio settings

Audio settings in the headphones section now has a "jack detection"
on/off setting that when set to off shows a "headphone state" setting.
If jack detection is off and headphone state is on, headphones will be
assumed to be connected. If headphone state is off, headphones will be
assumed to be disconnected.

On the backend, this uses the existing but almost unused API
audio.headphones_detection_override(). This API is extended to take a
second optional parameter for the desired state (default True to keep
the previous behavior)

For UI clarity/space reasons, audio settings refers to jack detection
being on or off which is the opposite of override being on or off.
Jack detection on means override off.

The main motivation for this change is to allow the user to record audio
through the headset mic (which, unlike line in, can receive power from
TRRS) but still output sound through the internal speaker. So connecting
a TRRS lavalier mic to headset out doesn't result in losing sound output.
parent 2e4b2345
No related branches found
No related tags found
1 merge request!657Headphone detection override state in audio settings
Pipeline #12757 passed