Skip to content

cros-sofaudio v1.1.9: Working Speaker Output via OpenGMaxCodec

Choose a tag to compare

@isaiahscape isaiahscape released this 21 Oct 22:55
· 26 commits to main since this release

Release v1.1.9 - Fix Internal Speaker Sound Output via CoolStar OpenGMaxCodec Hardware Sequencing

Summary

Resolves the issue where internal speakers had no audible sound output on Chromebooks running Windows 11. By cross-referencing and porting the Maxim MAX98373 smart amplifier register sequencing from CoolStar's proven open-source coolstar/opengmaxcodec driver, all hardware timing, DAI formatting, and bus-routing mismatches have been resolved.

Root Causes Identified & Fixed

  1. DAI Format Mismatch (MAX98373_R2024_PCM_DATA_FMT_CFG):
    • Intel SOF ADSP SSP DAI transmits TDM Mode 0 (DSP_A format) frames, not standard I2S.
    • Configured MAX98373_PCM_FORMAT_TDM_MODE0 with 16-bit channel size (�x58), allowing the amplifier hardware to properly lock onto and decode digital audio frames.
  2. Clock Ratio Mismatch (MAX98373_R2026_PCM_CLOCK_RATIO):
    • Replaced incorrect 64x fs ratio with 128x fs (�x06) to match the 4-slot 32-bit (or 8-slot 16-bit) TDM frame width (6.144 MHz BCLK at 48 kHz), preventing the MAX98373 internal clock monitor from auto-muting the amplifier.
  3. Digital Volume & Gain Staging (MAX98373_R203D_AMP_DIG_VOL_CTRL & �x203E):
    • Fixed digital volume control to unmuted level 12 (�x0C, -6 dB full-scale) and analog path gain to �x00, preventing the amplifier from entering mute on playback start.
  4. TX Hi-Z Bus Contention:
    • Moved voltage and current sense feedback from playback slots 0/1 to slots 4/5 (Right speaker) and 6/7 (Left speaker). Slots 0, 1, 2, and 3 are kept completely Hi-Z on TX, eliminating bus contention with the Intel DSP's RX audio playback.
  5. Synchronous Inter-Driver Callback Bridge:
    • Integrated a listener for \CallBack\CsAudioCallbackAPI (CSAudioEndpointStart / CSAudioEndpointStop) directly into Max98373Audio, ensuring the amplifier wakes and sleeps synchronously with CsAudioIntcsof.

Installation

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