I've implemented the basic version of the triggering setup. Basically a single trigger. I start the ADC DMA and run the trigger detection code. After the trigger is detected, I wait for ~64K more samples and stop the capture.
The issue is that on continuous AC signals the trigger is detected immediately, so there is no pre-trigger history. So it looks like I just need to collect 64K samples without running the trigger detection code, and then start it. I guess it is fine, since this is really only an issues for periodic signals, and they will hopefully continue running.
A bigger issue is that current trigger detection code actually just detects that sample is above the threshold, not the moment of crossing. So if trigger detection code starts when the signal is already higher than the trigger, it marks the first sample as the trigger point. It is not a big deal, but will cause some loss of performance.