Skip to content

Add ConflictingDevice relationship between Speaker and Headphones for HDA#2

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-125333107-1088690268-abe9f353-391c-4a9f-a1ae-d2c5b59e64db
Draft

Add ConflictingDevice relationship between Speaker and Headphones for HDA#2
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-125333107-1088690268-abe9f353-391c-4a9f-a1ae-d2c5b59e64db

Conversation

Copy link

Copilot AI commented Nov 3, 2025

Raptor Lake HDA users report headphones require manual ALSA unmute and speakers don't auto-mute on jack insertion. UCM defines both devices with jack detection, but PipeWire/WirePlumber can activate them simultaneously due to missing conflict declaration.

Changes

Add mutual ConflictingDevice relationships in ucm2/HDA/HiFi-analog.conf:

 SectionDevice."Headphones" {
     Comment "Headphones"
 
+    ConflictingDevice [
+        "Speaker"
+    ]
+
     If.headphone_switch {
 True.SectionDevice."Speaker" {
     Comment "Speaker"
 
+    ConflictingDevice [
+        "Headphones"
+    ]
+
     If.seq {

This follows the established pattern in ucm2/codecs/cx2072x/HeadPhones.conf and enables proper auto-switching based on jack state.

Original prompt

This section details on the original issue you should resolve

<issue_title>Raptor Lake external jack needs manual ALSA unmute and speakers don’t auto-mute</issue_title>
<issue_description>keponk
opened 5 days ago
SOF HDA (skl_hda_dsp_generic) on Raptor Lake: Headphone/Line-out not exposed as a separate port to PipeWire; external jack needs manual ALSA unmute and speakers don’t auto-mute

Environment (for quick identification)

Distro: NixOS (current channel)
Audio stack: PipeWire/WirePlumber 1.4.7, PipeWire Pulse
Hardware: Intel Raptor Lake PCH HDA (onboard), SOF HDA path (skl_hda_dsp_generic)
Symptom device string seen in userspace: “Raptor Lake High Definition Audio Controller”
PipeWire sink name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink
Problem summary

The 3.5 mm headphone/line-out jack produces no audio unless the “Headphone” control is manually unmuted via ALSA (alsamixer/amixer).
PipeWire/WirePlumber only expose a single output port (“Speaker”) for this card/profile; there is no separate “Headphones/Line Out” port to select in GNOME/pavucontrol.
Internal speakers do not auto-mute when the external jack is used; some intermittent audio still leaks to the internal speakers.
Jack detection appears unstable (repeated “Headphone Jack” events seen) and the desktop toggles output availability intermittently.
Expected outcome

PipeWire/WirePlumber should expose distinct output ports for Speaker and Headphones/Line Out, based on UCM, for this device.
When the 3.5 mm plug is inserted, the system should:
Auto-switch to the Headphones/Line Out port,
Mute the internal speakers (auto-mute),
Keep the state stable (no flapping).
Users should not need to manipulate raw ALSA mixer controls manually for basic jack usage.
Actual outcome

Only “Speaker” is exposed as an output port; no “Headphones/Line Out” port is available to select.
Audio plays intermittently through internal speakers; external jack is silent until “Headphone” is manually unmuted in alsamixer.
After manual unmute, the external jack works, but internal speakers continue to output intermittently unless manually muted; auto-mute does not engage.
Jack-sense events appear to flap while the plug is steady, causing intermittent switching in the desktop.
Steps to reproduce (high level)

Boot system; log in to GNOME (PipeWire/WirePlumber active).
Plug powered external speakers/headphones into the 3.5 mm combo jack.
Observe that "Headphone" output intermittently appears on the dropdown. Hard to select via UI, but when is done, the sound comes out of the internal speakers only, in synchrony with the intermittence in the ui.
Use alsamixer on the SOF HDA card to unmute “Headphone”; external jack starts working, but internal speakers still play unless manually muted; behavior may fluctuate with jack events.
Impact:

Users cannot rely on auto-detection or desktop controls for basic headphone/line-out use. Manual ALSA mixer changes are required. Internal speakers may still play, causing privacy/UX issues.
Workaround:

Manually unmute “Headphone” and set “Speaker” to lowest volume in alsamixer; Auto-Mute doesn't seem to work in this setup.
Disabling HDA power saving didn't seem to help reduce jack flapping.
Possble solution:
In alsa-ucm-conf for the SOF HDA “skl_hda_dsp_generic” profile on this Raptor Lake codec:

Define and expose a proper “Headphones/Line Out” device/port alongside “Speaker.”
Add the appropriate Enable/Disable/Jack sequences to unmute Headphone, mute Speaker (auto-mute), and handle jack detection correctly.
If the UCM is already correct for this codec, guidance is appreciated on whether the issue should be addressed in:
ALSA kernel (snd_hda_intel/Realtek codec quirk) or SOF topology/firmware for stable jack sense and correct control exposure.
WirePlumber/PipeWire only if UCM provides the ports but they are not shown.
alsa-info: http://alsa-project.org/db/?f=357e5def55a9a2e737306ff2ec22b1526a14f87a

Activity
perexg
perexg commented 5 days ago
perexg
5 days ago
Member
Could you show output from alsaucm -c hw:sofhdadsp dump text. The headphone device should be always defined in UCM.

keponk
keponk commented 4 days ago
keponk
4 days ago
Author
here, with the heaphones connected and working using the workaround:

$ alsaucm -c hw:sofhdadsp dump text
Verb.HiFi {
Comment "Play HiFi quality Music"
Device.Headphones {
Comment Headphones
Values {
CaptureCTL "_ucm0001.hw:sofhdadsp"
JackControl "Headphone Jack"
PlaybackCTL "_ucm0001.hw:sofhdadsp"
PlaybackMasterElem Master
PlaybackMixerElem Headphone
PlaybackPCM "_ucm0001.hw:sofhdadsp"
PlaybackPriority 200
PlaybackSwitch "Headphone Playback Switch"
PlaybackVolume "Headphone Playback Volume"
...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… HDA

Co-authored-by: pyma1 <125333107+pyma1@users.noreply.github.com>
Copilot AI changed the title [WIP] Raptor Lake external jack needs manual ALSA unmute and speakers don’t auto-mute Add ConflictingDevice relationship between Speaker and Headphones for HDA Nov 3, 2025
Copilot AI requested a review from pyma1 November 3, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raptor Lake external jack needs manual ALSA unmute and speakers don’t auto-mute

2 participants