From 1cd056aa1eb3a773e430c64882b7b38007dcb5b8 Mon Sep 17 00:00:00 2001 From: Daniel Nouri Date: Mon, 6 Oct 2025 09:06:01 +0200 Subject: [PATCH] revert: Remove mixer path IEC958 fix Reverts alsa-mixer.c changes from 32a3ffc74. The comprehensive ACP layer fix (bdb82be4e) handles all scenarios including pro-audio profiles that bypass mixer paths, making this approach redundant. --- spa/plugins/alsa/acp/alsa-mixer.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/spa/plugins/alsa/acp/alsa-mixer.c b/spa/plugins/alsa/acp/alsa-mixer.c index 64088177f..1f494ee0b 100644 --- a/spa/plugins/alsa/acp/alsa-mixer.c +++ b/spa/plugins/alsa/acp/alsa-mixer.c @@ -1479,23 +1479,13 @@ int pa_alsa_path_select(pa_alsa_path *p, pa_alsa_setting *s, snd_mixer_t *m, boo if (s) setting_select(s, m); - /* Set hw mute switches to match device mute status. - * - * When mute_during_activation is enabled, switches are temporarily muted - * during path setup to avoid pops/clicks, and this restores them. - * - * When mute_during_activation is disabled (default), switches may still be - * in their kernel default state (often muted for digital outputs like IEC958). - * We must explicitly unmute them if the device isn't muted. - * - * This ensures HDMI/DisplayPort audio (IEC958) works correctly, as these - * digital output switches default to muted in ALSA drivers but are not - * automatically enabled when the path is selected. - */ - PA_LLIST_FOREACH(e, p->elements) { - if (e->switch_use == PA_ALSA_SWITCH_MUTE) { - if (element_set_switch(e, m, !device_is_muted) < 0) - return -1; + /* Finally restore hw mute to the device mute status. */ + if (p->mute_during_activation) { + PA_LLIST_FOREACH(e, p->elements) { + if (e->switch_use == PA_ALSA_SWITCH_MUTE) { + if (element_set_switch(e, m, !device_is_muted) < 0) + return -1; + } } }