There is no definitive California case on this issue, but the police can record you during a traffic stop so I doubt it is illegal for you to record them.
It appears you have already read California Penal Code §632, which makes it illegal to record a confidential conversation without the consent of all parties. There are cases saying the police can tape your conversations when you're handcuffed in the back of a police car, so I don't see how any police officer could reasonably think you were having a confidential conversation during a traffic stop,
With that said: I handled a case involving this issue several years ago. The client was convicted of battery on a police officer for attempting to stop him from confiscating a tape recorder under the belief that it was illegal for someone to record him during a traffic stop. The case was eventually thrown out on appeal, but the client spent many thousands of dollars and went through a couple of years of stress before it was over.
The state of Washington has a similar privacy statute and the state supreme court has ruled it is not illegal for a motorist to record a police officer during a traffic stop. See Devenpeck v. Alford (2004) 543 U.S. 146, the US Supreme Court case dealing with this motorist's lawsuit against the officers.