Substitutional doping of a-SixNi1-x: H and the structural properties have been systematically investigated. Valency control of a-SixN1-x: H is found to be possible, although the efficiency of phosphorus doping is rather low with respect to that of boron doping. Vibrational spectra of boron-doped films showed the presence of a considerable amount of the BN bonds, which reduces the amount of the SiN bonds in the network, while phosphorus-doped films contain no PN bonds. Excellent thermal stability of undoped a-SixN1-x: H and the absence of photostructural change are also confirmed.