Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: sof-hda-dsp / HUAWEI MACHD-WXX9 (CX11880): Speaker profile mutes the Headphone amp, which is what drives the internal speakers
Date: Thu,  1 Oct 2026 20:57:58 +0200 (CEST)	[thread overview]
Message-ID: <18da7cd96acc8700-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <18da7cd96a94b800-webhooks-bot@alsa-project.org>

alsa-project/alsa-ucm-conf issue #863 was opened from mistercyb3r:

## Summary

On a HUAWEI **MACHD-WXX9** (MateBook X, Conexant **CX11880**), the internal speakers are wired to the **headphone** amplifier. The generated `HiFi (..., Speaker)` profile switches on `Speaker Playback Switch`, which controls nothing audible on this board, while the `Headphones` device's `DisableSequence` mutes `Headphone Playback Switch` — the amplifier that actually drives the internal speakers.

Result: with the jack empty the internal speakers are nearly silent, while with the jack inserted the headphones and the internal speakers both play at full level.

## Environment

| | |
|---|---|
| Machine | HUAWEI MACHD-WXX9 (product_family `MateBook X`, board `MACHD-WXX9-PCB-B1`) |
| Codec | Conexant CX11880 (`0x14f11f86`) |
| Driver | `sof-hda-dsp` / `skl_hda_dsp_generic` |
| Distro | Arch Linux / Omarchy, kernel `7.2.5-3-omarchy` |
| alsa-ucm-conf | `1.2.16.1-1` |
| alsa-lib | `1.2.16.1-1` |
| sof-firmware | `2025.12.2-1` |

Kernel autoconfig:

```
snd_hda_codec_conexant ehdaudio0D0: autoconfig for CX11880: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
snd_hda_codec_conexant ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
snd_hda_codec_conexant ehdaudio0D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
```

## Measured state transitions (1 s sampling across plug/unplug)

| jack | pin 0x16 (HP) Pin-ctls | pin 0x17 (spk) Pin-ctls | `Speaker` ctl | `Headphone` ctl | active profile |
|---|---|---|---|---|---|
| plugged | `0xc0` (OUT HP) | `0x00` (off) | off | **on** | Headphones |
| unplugged | `0xc0` | `0x40` (OUT) | **on** | **off** | Speaker |

## Evidence that the internal speakers are not on the `Speaker` path

- Toggling `Speaker Playback Switch` provably mutes the amplifier it owns — the codec amp register flips `0x4a` (unmuted) to `0xca` (mute bit set) — yet the internal speakers keep playing.
- All codec GPIOs are unconfigured: `GET_GPIO_MASK`, `GET_GPIO_DIRECTION`, `GET_GPIO_DATA` and the sticky/wake masks all return `0x0`. There is no GPIO-based external-amplifier mute to fall back on.
- This matches reports for other Huawei boards with the same codec/wiring: https://github.com/pop-os/pop/issues/4064 and https://github.com/thesofproject/linux/issues/3350 ("Headphones and speakers play simultaneously when headphones are plugged in").

## Why this is a UCM issue and not a codec one

The jack is detected correctly (`Headphone Jack` toggles on/off, the port reports `available`, and WirePlumber switches profiles correctly). The only wrong part is *which* amplifier the Speaker profile toggles for this board.

## Suggested fix

`HiFi-spk.conf`'s `Speaker` device is generic, so the change needs a machine condition, e.g. in the Speaker `EnableSequence`:

```
If.huawei-machd {
    Condition { Type String ... "${sys:devices/virtual/dmi/id/product_name}" ... }
    True { cset "name='Headphone Playback Switch' on" }
}
```

(Comment: it would be worth guarding on `product_name == "MACHD-WXX9"`, possibly also `sys_vendor == "HUAWEI"`.)

## Interim workaround

A user service re-asserts `amixer -c0 sset Headphone on` whenever the jack switches, which restores full speaker level when unplugged. Headphones-only playback while plugged is not achievable on this board in software — the speakers and the jack share one amplifier and there is no mute line.

Issue URL     : https://github.com/alsa-project/alsa-ucm-conf/issues/863
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

           reply	other threads:[~2026-10-01 18:58 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <18da7cd96a94b800-webhooks-bot@alsa-project.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18da7cd96acc8700-webhooks-bot@alsa-project.org \
    --to=github@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox