Cal. Civ. Proc. Code § 1986
A subpoena is obtainable as follows:
(c) To require attendance out of court, in cases not provided for in subdivision (a), before a judge, justice, or other officer authorized to administer oaths or take testimony in any matter under the laws of this state, it is obtainable from the judge, justice, or other officer before whom the attendance is required.
If the subpoena is to require attendance before a court, or at the trial of an issue therein, it is obtainable from the clerk, as of course, upon the application of the party desiring it. If it is obtained to require attendance before a commissioner or other officer upon the taking of a deposition, it must be obtained, as of course, from the clerk of the superior court of the county wherein the attendance is required upon the application of the party requiring it.