Skip to content
Snippets Groups Projects
Commit 18a20b5d authored by ave's avatar ave Committed by q3k
Browse files

audio passthrough: fix forcing line in when trrs and line in are plugged in

parent a36b46ba
No related branches found
No related tags found
1 merge request!208audio passthrough: fix forcing line in when trrs and line in are plugged in
Pipeline #7226 passed
......@@ -108,10 +108,12 @@ class AudioPassthrough(Application):
headset_connected = audio.headset_is_connected()
if self._force_mode == "FORCE_MIC":
audio.input_set_source(audio.INPUT_SOURCE_ONBOARD_MIC)
elif (
audio.line_in_is_connected() and self._force_mode == "AUTO"
) or self._force_mode == "FORCE_LINE_IN":
audio.input_set_source(audio.INPUT_SOURCE_LINE_IN)
elif headset_connected or self._force_mode == "FORCE_LINE_OUT":
audio.input_set_source(audio.INPUT_SOURCE_HEADSET_MIC)
elif audio.line_in_is_connected() or self._force_mode == "FORCE_LINE_IN":
audio.input_set_source(audio.INPUT_SOURCE_LINE_IN)
else:
audio.input_set_source(audio.INPUT_SOURCE_NONE)
......
......@@ -10,4 +10,4 @@ author = "ave"
license = "LGPL-3.0-only"
url = "https://git.flow3r.garden/flow3r/flow3r-firmware"
description = "Allows toggling audio passthrough through line-in/mic to speaker or lineout."
version = 6
version = 7
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