Package: alsa-ucm-conf
Version: 1.2.14-1
Severity: normal

On a Huawei MateBook X Pro 2024 (VGHH-XX/M1010) using sof-hda-dsp,
lowering the desktop volume with the stock UCM speaker configuration
attenuated the mixer path named Speaker while Bass Speaker remained
at full gain. At a GNOME volume setting of 31%, ALSA reported Speaker
44/74 (-30 dB), Bass Speaker 74/74 (0 dB), and Master 74/74 (0 dB).
These are ALSA control names. The physical speaker groups were tested
separately, as described below.

A per-card UCM override matches the exact ALSA long name
HUAWEI-VGHH_XX-M1010-VGHH_XX_PCB. For that card it initializes the
Master, Speaker and Bass Speaker gains and omits the hardware volume
mapping from the Speaker device. This lets the audio server apply a
common gain to the speaker paths. The stock mapping is retained on
other cards. With the override, both stereo mixer paths held at 68,68
(-6 dB) at 10% and 20% desktop volume. PipeWire reported equal left
and right software gain, changing from 0.001 at 10% to 0.008 at 20%.

In separate direct ALSA playback tests under SOF, both low-frequency
modules, both high-frequency channels, and the internal digital
microphone were functional. Muting the left low-frequency amplifier
reduced the recorded 203 Hz tone from -30.0 to -56.1 dBFS. Muting the
right one reduced the 234 Hz tone from -29.4 to -57.8 dBFS. Restoring
the amplifiers returned both tones to their original levels. Muting or
isolating the ALSA control named Bass Speaker was misleading as a test
of these physical modules. The amplifier test establishes their
contribution to the output in the tested configuration. The gain
measurements above show the effect of the UCM override.

Setup: Debian 13.7 amd64, linux-image-7.2.12+deb13-amd64
7.2.12-1~bpo13+1, firmware-sof-signed 2025.01-1, PipeWire 1.4.2-1,
WirePlumber 0.5.8-2. Codec Conexant CX11970 [14f1:20d0],
subsystem [19e5:32a4].

The local UCM diff follows as a reference for discussion. The fixed
gain values were chosen on one unit. Their suitability as distribution
defaults, and hardware mute behavior with this override, still need
review. The EQ preset used for listening is independent of this change.

ALSA's ongoing work on synchronizing the speaker controls appears
related: https://github.com/alsa-project/alsa-ucm-conf/pull/878 .
The measurements above are from the trixie package version given in
this report. The newer trixie-backports UCM package was not tested.

Expected: the speaker paths keep their relative balance as the desktop
volume changes. Could the ALSA maintainers advise how to expose a common
volume and mute control for this card?

--- a/ucm2/HDA/HiFi-analog.conf
+++ b/ucm2/HDA/HiFi-analog.conf
@@ -120,10 +120,24 @@
                Value {
                        PlaybackPriority 100
                        PlaybackPCM "hw:${CardId}"
-                       PlaybackMixerElem "Speaker"
-                       PlaybackMasterElem "Master"
-                       PlaybackVolume "Speaker Playback Volume"
-                       PlaybackSwitch "Speaker Playback Switch"
+               }
+               If.matebook_vghh {
+                       Condition {
+                               Type String
+                               String1 "${CardLongName}"
+                               String2 "HUAWEI-VGHH_XX-M1010-VGHH_XX_PCB"
+                       }
+                       True.EnableSequence [
+                               cset "name='Master Playback Volume' 64"
+                               cset "name='Speaker Playback Volume' 68,68"
+                               cset "name='Bass Speaker Playback Volume' 68,68"
+                       ]
+                       False.Value {
+                               PlaybackMixerElem "Speaker"
+                               PlaybackMasterElem "Master"
+                               PlaybackVolume "Speaker Playback Volume"
+                               PlaybackSwitch "Speaker Playback Switch"
+                       }
                }
        }
 }

Reply via email to