No grudge here Jim, you stated that the pump would compress air. It will not. What you have described is cavitation. This can happen if the water level is to low, or the plumbing is either too small on the suction side, or there are to many 90s in the plumbing. Foam sits on top of the water, so if it is being sucked into the pump, the water is to low. If all other factors or OK, I would pull the pump and check for a blocked, cracked, or broken impeller. I would also check for any blockage in the line.
No misinformation here, just an old spa tech telling it like it is.