Except as otherwise provided in the Vehicle Code, the proper court for the trial of criminal cases amounting to misdemeanor shall be the superior court of the county within which the offense charged was committed.
If an action or proceeding is commenced in a court other than the court herein designated as the proper court for the trial, the action may, notwithstanding, be tried in the court where commenced, unless the defendant, at the time of pleading, requests an order transferring the action or proceeding to the proper court. If after that request it appears that the action or proceeding was not commenced in the proper court, the court shall order the action or proceeding transferred to the proper court. The judge shall, at the time of arraignment, inform the defendant of the right to be tried in the county where the offense was committed.
Ca. Pen. Code § 1462.2