I've reported this issue separately in MacBook M1 Pro with USB headphones crackl… - Apple Community but looking at the discussion and workarounds (killing coreaudiod or changing the format in Audio MIDI Setup) it seems to be the same problem.
For everyone else, can you see if in your case MacOS unified logs show the same messages around the time that the crackling starts?
Use this command to stream logs in realtime with a filter that should show only audio-related events:
log stream --predicate '(eventMessage CONTAINS[c] "audio" || eventMessage CONTAINS[c] "media" || eventMessage CONTAINS[c] "IOSurface" || sender CONTAINS[c] "audio" || subsystem CONTAINS[c] "audio" || process CONTAINS[c] "audio") && NOT process IN {"runningboardd", "airportd"}'
In my case, there are 3 events in the logs that seem to accompany this problem: coreaudiod: (libAudioIssueDetector.dylib) (a report of detected audio issue ), usbaudiod: current microframe timestamp calcError (a USB audio error) and HALS_OverloadMessage: Overload (an overload errors in Apple CoreAudio Hardware Abstraction Layer).
In my case, the workarounds discussed (killing coreaudiod or switching the device's sample format in Audio MIDI Setup) only help temporarily, and the crackling comes back in a few minutes, gradually escalating to completely inaudible.