Photoluminescence and infrared absorption study of isoelectronic impurity passivation by hydrogen