Spin locking of the nuclear magnetization of a spin with S=1 such as deuterium in the presence of a radio-frequency field under magic angle spinning (MAS) is described in terms of adiabatic modulations of the energy levels. In a brief initial period, part of the initial density operator nutates about the Hamiltonian and is dephased. The remaining spin-locked state undergoes persistent oscillatory transfer processes between various coherences with a periodicity given by the rotation of the sample. While all crystallites in the powder undergo such periodic transfer processes, the phases of the oscillations depend on the angle gamma of the crystallites. The angle gamma is the azimuthal angle defining the orientation of the unique axis of the quadrupolar interaction tensor in a rotor-fixed frame. The theory is extended to describe cross-polarization between spins S=1 and I=12 under MAS. There are four distinct Hartmann-Hahn matching conditions that correspond to four zero-quantum matching conditions, all of which are shifted and broadened compared to their spin S=12 counterparts. These matching conditions are further split into a family of sideband conditions separated by the spinning frequency. The theory allows the calculation of both shifts and broadening factors of the matching conditions, as verified by simulations and experiments.