The low-resistive p- and n-type transparent conductors are necessary for the efficient photovoltaic (PV) solar cells. We review a new valence control method of co-doping with doping Ga- (or In-, or Alsubstitutional impurity, and Li-interstitial impurity) donor and N-acceptor at the same time for the fabrication of a low-resistive p-type ZnO based upon the ab initio calculation. We compare our materials design to fabricate a low resistive p -type ZnO with the recent successful co-doping experiments. The Delafossite structure of CuAlO2 has great potentiality far p-type transparent conducting oxide to apply the high efficient photovoltaic solar-cells combined with n-type transparent conducting oxides such as ITO (indium tin oxides), SnO2 or ZnO. We have calculated the electronic structure, impurity levels, and formation energy of Cu-vacancy, Al-vacancy, Be, Mg, Ca acceptors at the Al-site, and Be, Mg, Ca donors at the Cu-site. Calculated acceptor energy levels are as follows; Cu-vacancy (-300meV from the VBM [valence band maximum]), Al-vacancy (671 meV from the VBM), Be-acceptor (85 meV from the VBM), Mg-acceptor (200 meV from the VBM), and Ca-acceptor (960 meV from the VBM). We find that the Mg impurity at the Cu-site is more stable than the Al-site. Therefore, Mg impurity acts as donor at the Cu-site in the CuAlO2. This is the reason why Mg doping reduces the p-type conductivity in CuAlO2. We propose the following valence control method for the fabrication of p-type CuAlO2; we should dope the high concentration of Cu-vacancy in order to form the impurity band with reducing the Cu vapor pressure during the PLD or MBE crystal growth method, or we dope the Mg or Be acceptors at the Al-site with reducing the Al vapor pressure and increasing the Cu vapor pressure during the thermal non-equilibrium crystal growth method such as MBE or MOCVD. We compare our materials design with the available experimental data. Finally, we propose the co-doping by 2PS(Se)+InCu+VCu for the fabrication of p-type CuInS2 or CuInSe2 based upon ab initio electronic structure calculation.