Whittingham and Sean Morrison both went close inside the opening few minutes as the hosts enjoyed a string of early set pieces.
Aron Gunnarsson then headed wide from Joe Ralls's cross, before Ralls nearly opened the scoring in dramatic fashion when he beat two Birmingham defenders and hammered a 20-yard effort narrowly wide of goal.
Cardiff took the lead five minutes after the restart when substitutes Matthew Kennedy and Doyle combined, with the former Chesterfield man sweeping the ball home from close range for his first goal for the club.
With time running out for the Blues, Gary Rowett's frustration boiled over and the Birmingham manager was sent to the stands for his fiery reaction to a decision from the assistant referee.
Doyle then struck the post before he was brought down in the box, with Whittingham stepping up to double Cardiff's lead from the spot.
Birmingham rallied in search of a late goal that would have dragged them back into the game, but Cardiff held on to extend their unbeaten run to three games.