The role of oxygen as a shallow donor and a DX-state in GaN is elucidated by recent Raman experiments under hydrostatic pressure and the findings of first principles calculations. A pressure induced transfer of electrons from a shallow donor state to a deep DX-like state of the same donor can be correlated with vibrational gap modes by monitoring the freeze-out dynamics. Both features are unique to oxygen doped GaN and cannot be observed in Si doped material. The gap modes can be well explained by a linear chain model of impurity vibrations of substitutional O on the N site. A mode variation, and switching steps in its pressure behavior, which occurs in parallel to the carrier freeze-out are proposed to reflect three different charge states of the strongly localized states of O. This DX-type behavior as well as the experimental threshold pressure values are in excellent agreement with the theory results.