All of lore.kernel.org
 help / color / mirror / Atom feed
From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: UCM HiFi profile fails on hardware with Master volume instead of Headphone volume controls (ASUS ZenBook UX425EA)
Date: Tue, 13 Jan 2026 10:11:07 +0100 (CET)	[thread overview]
Message-ID: <188a3f5b62a8a400-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <188a3f5b629de600-webhooks-bot@alsa-project.org>

alsa-project/alsa-ucm-conf issue #687 was opened from akincano:

### Hardware Information
- Laptop: ASUS ZenBook UX425EA_UX425EA
- Audio Controller: Intel Tiger Lake-LP Smart Sound Technology
- Audio Controller (PCI ID: 0x8086:0xa0c8)
- Codec: Realtek ALC294 (Vendor ID: 0x10ec0294, Subsystem ID: 0x10431cee)
- Kernel: 6.18.5.arch1-1
- Distribution: Arch Linux

### Software Versions
```bash
alsa-ucm-conf 1.2.15.2-1
sof-firmware 2025.12-1
linux 6.18.5.arch1-1
```

### Problem Description
The SOF HiFi profile fails to create speaker/headphone audio devices on this hardware. WirePlumber reports:
```bash
spa.alsa: No sink and source at HiFi: Headphones
```
The HiFi profile shows as available: no and only HDMI outputs are exposed, with no analog audio devices.

### Root Cause
**This is a UCM configuration issue**, not a kernel driver issue. The problem is that /usr/share/alsa/ucm2/HDA/HiFi-analog.conf checks for ALSA controls that don't exist on this hardware.

**ALSA controls exposed by this hardware (identical for both SOF and HDA):**
```bash
numid=3,iface=CARD,name='Speaker Phantom Jack'
numid=2,iface=MIXER,name='Master Playback Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
[HDMI/IEC958 controls omitted for brevity]
```

**Controls the UCM config expects but don't exist:**
- Headphone Playback Volume ❌ (only Master Playback Volume exists)
- Headphone Playback Switch ❌ (only Master Playback Switch exists)
- Headphone Jack ❌ (only Speaker Phantom Jack exists)

**UCM config logic that fails:**
In /usr/share/alsa/ucm2/HDA/HiFi-analog.conf:
```bash
If.hpvol {
    Condition {
        Type ControlExists
        Control "name='Headphone Playback Volume'"
    }
    False.Define.hpvol ""
}

If.hp {
    Condition {
        Type String
        Empty "${var:hpvol}"
    }
    False.SectionDevice."Headphones" {
        # ... creates headphone device
    }
}
```
Because Headphone Playback Volume doesn't exist, hpvol is set to empty string, and the If.hp condition prevents the headphone device from being created.

Similarly, the jack detection logic checks for:
```bash
Define.hpjack "Headphone Jack"
If.hpjack {
    Condition {
        Type ControlExists
        Control "iface=CARD,name='Headphone Mic Jack'"
    }
    # ... falls back to checking 'Front Headphone Jack'
}
```
But never checks for Speaker Phantom Jack, which is what this hardware exposes.

### Working Configuration (Legacy HDA Driver)
With the legacy snd_hda_intel driver (forced via blacklisting SOF), PulseAudio's built-in profile logic correctly handles this hardware:

**Working profile:** output:analog-stereo+input:analog-stereo

**Exposed ports:**
- analog-output-speaker: Speakers (uses Master Playback Volume/Switch)
- analog-output-headphones: Headphones (uses Master Playback Volume/Switch)
- Automatic jack detection via Speaker Phantom Jack

The legacy HDA driver works because PulseAudio has fallback logic that handles hardware with only Master volume controls, but SOF's UCM-based configuration doesn't have this fallback.

### Proposed Solution
The UCM configuration needs to be updated to handle hardware that only exposes Master Playback Volume/Switch instead of dedicated Headphone controls.

**Option 1: Add fallback logic to HiFi-analog.conf**

Check for Master Playback Volume when Headphone Playback Volume doesn't exist:
```bash
If.hpvol {
    Condition {
        Type ControlExists
        Control "name='Headphone Playback Volume'"
    }
    False.If.master {
        Condition {
            Type ControlExists
            Control "name='Master Playback Volume'"
        }
        True.Define.hpvol "Master"
    }
}
```

Similarly for jack detection, check Speaker Phantom Jack:
```bash
If.hpjack {
    Condition {
        Type ControlExists
        Control "iface=CARD,name='Headphone Mic Jack'"
    }
    True.Define.hpjack "Headphone Mic Jack"
    False.If.front {
        Condition {
            Type ControlExists
            Control "iface=CARD,name='Front Headphone Jack'"
        }
        True.Define.hpjack "Front Headphone Jack"
        False.If.speaker {
            Condition {
                Type ControlExists
                Control "iface=CARD,name='Speaker Phantom Jack'"
            }
            True.Define.hpjack "Speaker Phantom Jack"
        }
    }
}
```

**Option 2: Create a specific profile for this hardware**

Create a UCM profile specifically for Tiger Lake systems with Realtek ALC294 that only expose Master controls.

**Option 3: Update SOF topology**
If this is a SOF topology issue, update the topology to expose proper Headphone controls instead of just Master.

### Additional Debug Information
**Pin 0x21 configuration (headphone jack):**
```bash
Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Pincap 0x0001001c: OUT HP EAPD Detect
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
```
The pin is capable of jack detection (EAPD Detect in capabilities) but is misconfigured as "N/A" with "NO_PRESENCE". However, the jack detection still works via the Speaker Phantom Jack ALSA control.

**Full codec information:** Available upon request

**Full WirePlumber logs:** Available upon request

### Impact
This affects all ASUS ZenBook UX425EA users (and potentially other laptops with similar hardware configurations) running SOF. Users must either:

1. Use pro-audio profile (no automatic headphone/speaker switching)
2. Blacklist SOF and force legacy HDA driver (not a long-term solution)

### Related Issues
This was initially reported in #686 which was closed as a kernel issue, but further investigation revealed it's actually a UCM configuration problem. The kernel driver is exposing the ALSA controls correctly; the UCM config just doesn't know how to handle this hardware configuration.

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

           reply	other threads:[~2026-01-13  9:13 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <188a3f5b629de600-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=188a3f5b62a8a400-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.