I have an 07 Compass and have had my issues with WWD - "whining while driving".
Two things that turned out to be my problem.
One was the alternator going bad... I have changed it and don't experience that whine anymore.
The other is a common issue with Compass/Patriot. The transmission fluid in the CVT overheating. Check to see if having that changed fixes your issues.
It only happened to me 3x over the summer (once last year and 2x this year) during long drives in the heat. It's the cooler season now and winter's coming so I plan on changing my tranny oil myself in the spring. It's way overdue.
2007 Jeep Compass Sport 4WD - Black
4 Cyl, 2.4L CVT
215/65R17 - Continental ProContact ECOPlus
Replaced entire front end suspension at 190,000mi (control arms, inner/outer tie rods, bushings, etc.) (did it myself)
new Monroe struts at 160,000/mi (did it myself)
Ball Joints 2x-both sides - various mileage (did it myself)