Hi,

This patch adds explicit control for the 'Line Out' ALSA element to fix audio
leakage on UOS systems when using headphones.


Thanks!


From 3c8a85931a677062d8fa0306c62ecec60a0324ad Mon Sep 17 00:00:00 2001
From: liujiahe <[email protected]>
Date: Fri, 6 Feb 2026 14:15:09 +0800
Subject: [PATCH] alsa-mixer: Add Line Out element to headphone and lineout
 paths


On some audio codecs (e.g., Realtek ALCxxx used in UOS systems),
the Line Out jack is not properly muted when headphones are plugged in,
causing audio leakage or duplicate output.


This patch explicitly controls the 'Line Out' ALSA element:
- In analog-output-headphones.conf: disable Line Out
- In analog-output-lineout.conf: enable and merge volume for Line Out


This ensures correct jack routing behavior on affected hardware.


Signed-off-by: liujiahe <[email protected]>
---
 src/modules/alsa/mixer/paths/analog-output-headphones.conf | 4 ++++
 src/modules/alsa/mixer/paths/analog-output-lineout.conf    | 4 ++++
 2 files changed, 8 insertions(+)


diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf 
b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index 3c62c5e67..641e28381 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -137,6 +137,10 @@ volume = zero
 switch = off
 volume = off
 
+[Element Line Out]
+switch = off
+volume = off
+
 [Element Surround]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-lineout.conf 
b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
index 1ffce2225..39f84d680 100644
--- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
@@ -155,6 +155,10 @@ volume = merge
 override-map.1 = all-rear
 override-map.2 = rear-left,rear-right
 
+[Element Line Out]
+switch = mute
+volume = merge
+
 [Element Surround]
 switch = mute
 volume = merge
-- 
2.20.1
        
 liujiahe
[email protected]

Reply via email to