I had this crop up a couple months ago. Had it tested, the alternator was "ok" but the battery was recommended for replacing. 2 months later, the whining came back. Took it to another garage who tested the alternator for a good minute and noticed the charge would be fine at first, but then drop over time, and then go up and down. So, we replaced the alternator, and its gone now.
Hopefully that fixes it for good. Only time will tell.