Does this sound happen when your driving or parked with the car running?
If it's happening while the car is parked and it's not like some loud ass metal on metal sound that doesn't get louder when you rev the car then, it prolly isn't your valves then....
We do have this freakin' solenoid for the charcoal canister that makes this weird ticking sound though.that motherfucker has been driving me nut's since I bought this fucking car....On my car it was located on my charge pipe by the throttle body maybe,it will be there at the top of you intake on your p5...
Hope this helped a bit....