First principles calculations are used to investigate the effects of magnetic ordering on the minimum-energy structure and on the full phonon dispersion relation of CdCr2O4, focusing on the changes through the coupled magnetic/structural transition which shows relief of the geometric frustration of the antiferromagnetic ordering on the pyrochlore lattice. We computed the full phonon dispersion relations for the ferromagnetic and antiferromagnetic orderings in cubic and tetragonal structures of CdCr2O4. We extracted the phonon dispersion for the cubic paramagnetic phase and found that it compares well with the experimental results. The AFM ordering is seen to lower the symmetry and induce a lattice distortion comparable in magnitude to that observed in the transition. While the spin-phonon couplings are large for modes which involve displacement of the Cr atoms, there are no unstable modes at any point in the Brillouin zone for either of the magnetic orderings considered, and thus we conclude that the phase transition is driven not by spin-phonon coupling, but by the atomic forces and stresses induced by the magnetic order. Finally, by comparison of the phonon frequencies for structures with different magnetic orderings and structural distortions, we find that the spin-phonon coupling, rather than the coupling of the phonons to the structural change, is the dominant factor in the observed changes of phonon frequencies through the phase transition.