Skip to content

[Bug] No Speaker Audio on MacBook Pro 13" M1 (J293): tas2770 probe failed (-5) and ALSA UCM ${CardId} undefined #251

@ZhiH2333

Description

@ZhiH2333

Description

I am experiencing a complete loss of built-in speaker audio on my MacBook Pro 13" M1 (J293) running Fedora 42 Asahi. The hardware works perfectly under macOS, ruling out physical damage.

The issue seems to have two layers:

  1. Kernel/Hardware level: The tas2770 amplifier fails to probe (error -5), causing snd-soc-macaudio instantiation to fail.

  2. ALSA UCM level: Attempting to manually trigger the UCM state results in a ${CardId} undefined error, and the UCM path seems broken or missing variables.

Environment

  • Hardware: MacBook Pro (13-inch, M1, 2020) - J293

  • OS: Fedora Linux 42 (Asahi)

  • Kernel: 6.18.10-402.asahi.fc42.aarch64+16k

  • PipeWire/WirePlumber Version: 1.4.10

  • External Audio: Occasionally use a USB audio interface (KT_USB_AUDIO), but the issue persists even when completely disconnected during a cold boot.

Steps to Reproduce

  1. Perform a deep cold boot (completely shut down, disconnect all USB devices, wait, and power on).

  2. Check dmesg for tas2770 and macaudio statuses.

  3. Check wpctl status. The audio_effect.j293-convolver filter exists, but the physical speaker sink is missing or stuck in "Headphones" mode.

  4. Run the ALSA UCM command to force the speaker state:

    alsaucm -c AppleMCA set _verb HiFi set _enadev Speaker

Expected Behavior

  • macaudio and tas2770 should probe successfully on boot.

  • Built-in speakers should appear in wpctl status as an available sink and output audio properly.

  • alsaucm should execute without variable substitution errors.

Actual Behavior / Logs

1. Kernel Error (sudo dmesg | grep -iE 'macaudio|tas2770'):

Plaintext

[    2.901220] tas2770 2-0031: ASoC error (-6): at soc_component_write_no_lock() on tas2770.2-0031 for register: [0x00000001]
[    2.903198] tas2770 2-0031: ASoC error (-5): at snd_soc_component_update_bits() on tas2770.2-0031 for register: [0x0000000f]
[    2.903199] tas2770 2-0031: ASoC error (-5): at snd_soc_component_probe() on tas2770.2-0031
[    2.903211] snd-soc-macaudio sound: ASoC: failed to instantiate card -5
[    2.923070] snd-soc-macaudio sound: probe with driver snd-soc-macaudio failed with error -5

2. ALSA UCM Error:

When running alsaucm -c AppleMCA set _verb HiFi set _enadev Speaker, it fails with:

Plaintext

ALSA lib ucm_subs.c:965:(uc_mgr_get_substituted_value) [error.ucm] variable '${CardId}' is not defined in this context!
ALSA lib main.c:1804:(snd_use_case_mgr_open) [error.ucm] failed to import AppleMCA use case configuration -22
alsaucm: error failed to open sound card AppleMCA: Invalid argument

Troubleshooting Steps Already Taken

I have tried extensive debugging to rule out user error or corrupted packages:

  1. Firmware Update: Ran sudo asahi-fwupdate successfully. No change.

  2. Cold Booting: Shut down the system, unplugged all Type-C/USB devices, waited, and booted to ensure the DCP/I2C bus wasn't locked by external peripherals. No change.

  3. Reinstalling Audio Packages: Executed sudo dnf reinstall alsa-ucm-asahi asahi-audio and restarted PipeWire services.

  4. UCM Path Fixing (Workarounds Attempted):

    • Found that /usr/share/alsa/ucm2/AppleMCA was missing a direct entry point.

    • Manually created symlinks to point AppleMCA to /usr/share/alsa/ucm2/conf.d/macaudio.

    • Specifically linked MacBook Pro J293.conf as AppleMCA.conf.

    • To bypass the ${CardId} error, I used sed to hardcode Define.CardId "AppleJ293" into the config, and even tried replacing all instances of ${CardId} with AppleJ293 across the entire macaudio directory using find and sed.

    • Despite these aggressive workarounds, ALSA still fails to parse the context and the hardware remains muted.

Any guidance on whether this is a known regression in the 6.18 kernel or a missing component in the Fedora 42 alsa-ucm-asahi package for the J293 hardware would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions