Involved in p-cresol and 2,4-xylenol catabolism. Catalyzes the oxidation of 4-hydroxybenzaldehyde and 4-hydroxy-3-methylbenzaldehyde to yield 4-hydroxybenzoic acid and 4-hydroxy-3-methylbenzoic acid, respectively. 4-hydroxybenzaldehyde + H2O + NADP(+) = 4-hydroxybenzoate + 2 H(+) + NADPH Cells lacking this gene are still able to produce 4-hydroxy-3-methylbenzoic acid and 4-hydroxybenzoic acid. Belongs to the aldehyde dehydrogenase family.