Skip to content

cros-sofaudio v1.1.10: Fix MAX98373 Speaker Audio Output

Choose a tag to compare

@isaiahscape isaiahscape released this 22 Oct 00:41
· 25 commits to main since this release

Release v1.1.10 - Fix MAX98373 Speaker Audio Output via DAI Clock Auto-Lock & Proper Format Configuration

Summary

Resolves the issue on Alder Lake Chromebooks (Volmar / Acer Chromebook Vero 514 and other Brya models) where internal speaker amplifiers initialized successfully (reading revision ID �x43) but produced no audible sound during audio playback.

Root Causes Identified & Fixed

  1. Clock Ratio Mismatch (256x fs vs 64x fs):
    • On Alder Lake with standard I2S topology, the Intel Audio DSP SSP outputs a 64x fs (3.072 MHz BCLK) clock signal.
    • The driver previously fell into an ACPI condition that hardcoded clkRatio = 0x08 (256x fs = 12.288 MHz), causing the MAX98373 internal clock monitor to detect a 4x frequency mismatch and auto-mute the Class-D output stage.
  2. Dynamic Hardware DAI Auto-Lock Loop:
    • Implemented an intelligent clock-locking routine that queries INT_STATE1 bit 1 (Clock Error) across candidate formats and ratios:
      • Candidate 0: I2S 32-bit slot, 64x fs (3.072 MHz) [Alder Lake Brya default]
      • Candidate 1: I2S 32-bit slot, 128x fs (6.144 MHz)
      • Candidate 2: I2S 16-bit slot, 32x fs (1.536 MHz)
      • Candidate 3: TDM0 16-bit slot, 128x fs (6.144 MHz)
      • Candidate 4: TDM0 32-bit slot, 256x fs (12.288 MHz)
    • Automatically confirms PLL lock before unmuting the power stage.
  3. Right Speaker Input Channel Enable (MAX98373_R202B_PCM_RX_EN):
    • Fixed PCM_RX_EN from �x01 (Channel 0 only) to �x03 (Channel 0 and Channel 1 enabled). Previously, Channel 1 was disabled in hardware, causing the Right speaker (�x40) to receive complete silence.
  4. Eliminated TX Audio Bus Contention (MAX98373_R2020_PCM_TX_HIZ_EN_1):
    • Disabled feedback TX during pure audio playback (R202C = 0x00) and set all TX slots to high-impedance (Hi-Z, �xFF), ensuring the amplifier does not drive the bus and contend with incoming playback audio from the Intel ADSP.
  5. Standby at Boot & Runtime Re-initialization:
    • The amplifier now remains in clean standby at boot until the Intel DSP stream starts. When playback begins, the amplifier initializes with live BCLK present.
  6. Volume & Gain Optimization:
    • Enabled unattenuated 0 dB digital volume and +18.0 dB analog full-scale gain (R203E = 0x0A) for rich audio output.
  7. IOCTL Mute Support:
    • Added support for IOCTL_CSAUDIO_SET_MUTE in the sidecar IOCTL dispatch table.

Installation

  1. Download cros-sofaudio-v1.1.10.zip and extract to a folder.
  2. Right-click install-drivers.cmd and select Run as administrator.