Penal Code section 148 is the law that permits peace officers to arrest you IF you impede them from conducting their lawful duties. If he had reasonable suspicion to suspect you were armed he had the right to do a cursory (pat-down) search of you for officer safety which allows him to exercise reasonable control over you for that limited purpose, but there's nothing in your inquiry indicating a reason for such a suspicion. If he had probable cause to suspect you committed a crime he could arrest you and then could search around where you were located in the car "incident to a lawful arrest." Again, the arrest would have to be lawful. If he lawfully impounded the car he could conduct an "inventory search." The big issues here are whether the detention and later arrest were lawful, and I'm having my doubts.
The remaining issue is the codeine. If you did not have a valid prescription, the issue becomes whether we can suppress it so that it can't be used as evidence against you. This leads to an analysis of whether it was found and seized legally, which takes us back to the paragraph above.
Interesting facts; I think you should consult with an attorney to fully evaluate them. I'd be happy to offer a free consultation as would most of the other Avvo attorneys here.
Call a lawyer that handles criminal defense and civil rights violations. It might be able to suppress the search and file a civil rights violation against the officer.
You have an interesting set of facts. If your attorney can show in a Suppression Motion that he had no probable cause to arrest you, the Codeine can be suppressed and not an issue. Returning to the actual arrest, there doesn't appear to be any element met for PC 148 or PC 69, which are the Resisting Arrest statutes.
Additionally, an Officer does not have probable cause for a vehicle search if they only have evidence of an infraction. Possession of Marijuana is an infraction. Smoking in public is not, but likely he was looking for Marijuana on your person.
Another tool to use is the Pitchess Motion. This Officer may have numerous complaints from other citizens regarding his use of force.
You have plenty of issues in this case. Give me a call for a free consultation.
Seth Weinstein, Esq.
Los Angeles Criminal Defense Attorney
This reply should NOT be considered a legal opinion of your case / inquiry. At this time I do not have sufficient factual/legal documentation to give a complete answer to your question and there may be more to the issues you raised then I have set out in my brief reply.
I agree with Mr. Weinstein. You can bet the house, however, that the officer will place "facts" in his report for the purpose of establishing probable cause. If there is a filing in this case, I would advise you retain a lawyer to mount a vigorous defense.