Repository navigation
cros-sofaudio v1.1.10: Fix MAX98373 Speaker Audio Output
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
- 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.
- 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.
- Implemented an intelligent clock-locking routine that queries INT_STATE1 bit 1 (Clock Error) across candidate formats and ratios:
- 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.
- 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.
- 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.
- Volume & Gain Optimization:
- Enabled unattenuated 0 dB digital volume and +18.0 dB analog full-scale gain (R203E = 0x0A) for rich audio output.
- IOCTL Mute Support:
- Added support for IOCTL_CSAUDIO_SET_MUTE in the sidecar IOCTL dispatch table.
Installation
- Download cros-sofaudio-v1.1.10.zip and extract to a folder.
- Right-click install-drivers.cmd and select Run as administrator.