Production of singlet P-wave cc̄ and bb̄ states