Skip to content

Conversation

@pennycoders
Copy link
Contributor

@pennycoders pennycoders commented Nov 24, 2025

Optimize TC358743 audio capture to eliminate artifacts and improve audio fidelity:

  • Disable automatic audio muting (AUTO_CMD0/AUTO_CMD1) to prevent ACR PLL instability during silence periods
  • Reduce audio initialization delay from 500ms to 200ms for faster startup after HDMI format changes
  • Disable sample rate-based muting (FS_MUTE) to prevent false muting
  • Tighten ACR clock tolerance from 976/1976/3906 PPM to 122/122/244 PPM for 8-32x better audio clock tracking precision
  • Increase divider settling time from 100ms to 600ms to eliminate artifacts during video resolution changes
  • Explicitly configure 24-bit I2S sample depth
  • Add V4L2_CTRL_FLAG_VOLATILE to audio_sampling_rate control to enable dynamic sample rate detection from userspace

These changes eliminate crackling and clipping artifacts during silence transitions and format changes, while providing significantly tighter audio clock synchronization with the HDMI source. The 122/244 PPM tolerance provides excellent audio quality while maintaining wide compatibility with consumer HDMI devices (typically 20-50 PPM crystal accuracy).

The sample rate detection capability allows userspace applications to query the actual HDMI audio sample rate via V4L2 ioctl, which is critical for supporting non-48kHz HDMI sources (e.g., 44.1kHz from Armbian SBC or other devices). This prevents sample rate mismatches that would cause audio distortion during resampling.

Optimize TC358743 audio capture to eliminate artifacts and improve
audio fidelity:

- Disable automatic audio muting (AUTO_CMD0/AUTO_CMD1) to prevent
  ACR PLL instability during silence periods
- Reduce audio initialization delay from 500ms to 200ms for faster
  startup after HDMI format changes
- Disable sample rate-based muting (FS_MUTE) to prevent false muting
- Tighten ACR clock tolerance from 976/1976/3906 PPM to 122/122/244 PPM
  for 8-32x better audio clock tracking precision
- Increase divider settling time from 100ms to 600ms to eliminate
  artifacts during video resolution changes
- Explicitly configure 24-bit I2S sample depth
- Add V4L2_CTRL_FLAG_VOLATILE to audio_sampling_rate control to enable
  dynamic sample rate detection from userspace

These changes eliminate crackling and clipping artifacts during silence
transitions and format changes, while providing significantly tighter
audio clock synchronization with the HDMI source. The 122/244 PPM
tolerance provides excellent audio quality while maintaining wide
compatibility with consumer HDMI devices (typically 20-50 PPM crystal
accuracy).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants