camilladsp icon indicating copy to clipboard operation
camilladsp copied to clipboard

Log spam when capture device is idle

Open Taudris opened this issue 2 years ago • 1 comments

I've set up a Pi 4 as a USB to HDMI sound card with DSP for a Windows PC (got tired of Windows killing Equalizer APO with reboots/updates), with g_audio for capture and vc4hdmi0 for playback.

After a few seconds of no audio being output, Windows puts the audio device into some kind of standby state. When this occurs, ALSA can no longer provide samples, and CDSP begins spamming the log file with this message (15MB or so in a couple hours):

WARN  [src/alsadevice.rs:261] Wait timed out, capture device takes too long to capture frames

Since this condition seems to be pretty normal, this message should be de-emphasized somehow. Some ideas:

  • Raise the log level.
  • Only write this message to a log on the first occurrence, until the next time a frame is captured.

Taudris avatar Jul 24 '22 22:07 Taudris

The g_audio driver has quite a few quirks that need special treatment. The way it stalls and gives timeout errors when idle is one of them. The next version will handle these things better.

HEnquist avatar Jul 28 '22 07:07 HEnquist