Skip to content

Headphone detection override state in audio settings

dx requested to merge dx/headphone-detection-override into main

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.

Merge request reports