
21 Cal.3d 460 (1978)
578 P.2d 1369
146 Cal. Rptr. 364
THE PEOPLE, Plaintiff and Respondent,
v.
KINNON WILKS, Defendant and Appellant.
Docket No. Crim. 19773.
Supreme Court of California.
May 30, 1978.
*462 COUNSEL
Henry P. Crabtree, under appointment by the Supreme Court, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Juliet H. Swoboda and David R. Chaffee, Deputy Attorneys General, for Plaintiff and Respondent.
*463 OPINION
BIRD, C.J.
Appellant, Kinnon Wilks, appeals from a judgment of conviction for two felony offenses and four prior convictions. He contends the following errors were made by the superior court: (1) the trial judge lacked jurisdiction to conduct appellant's jury trial because a timely motion pursuant to Code of Civil Procedure section 170.6 had been filed to disqualify that judge; (2) appellant's motion to suppress evidence pursuant to Penal Code section 1538.5 was erroneously denied; (3) the court abused its discretion in permitting appellant to represent himself; (4) appellant was improperly denied disclosure of the identity of an informant; (5) appellant was improperly found to have suffered four prior felony convictions when, in fact, he had suffered only two.
This court has determined that none of these contentions has merit. Therefore, with one modification, the judgment of conviction is affirmed.

I
An information was filed on July 15, 1975, in the South District of the Los Angeles Superior Court, charging appellant with two felonies, Health and Safety Code section 11351 (possession for sale of heroin) and Penal Code section 12021 (possession of a concealable firearm by a person previously convicted of a felony). Subsequently, the prosecutor filed an amended information alleging prior felony convictions, pleas of not guilty were entered, and the priors were denied.
On October 9th, the case was transferred from Department South J, the department of the master calendar judge, to Department South D "for 1538.5 and trial." When the matter was called in Department South D, it was continued because appellant stated that he no longer wanted to be represented by the public defender and thought he might be able to retain private counsel. When the case was called on October 10th, appellant indicated he had been unable to hire private counsel. The court proceeded with the section 1538.5 hearing, and a deputy public defender represented appellant.
Several witnesses were called by the prosecution, and they testified to the following events. The Long Beach Police Department received information that the occupants of apartment 5 of the Ho Hum Motel were trafficking in narcotics supplied to them by a person whose description was also given. Two officers were dispatched to watch that *464 apartment. During the surveillance, the police saw four or five individuals enter the apartment, remain a short time, and leave. Appellant was the last visitor. When he left the apartment, he walked in the direction of a second motel. The officers, believing appellant matched the description of the supplier, requested that a patrol unit contact him.
Two uniformed officers responded to the call. They observed appellant walking into a parking lot at the second motel and drove their patrol car toward him. Appellant turned, looked toward the patrol car, and ran into apartment 6 of that motel. As the officers were parking their car, appellant came out of the apartment. At the officers' request, appellant produced identification. During the course of the conversation, one officer concluded that appellant "was possibly under the influence of an opiate." The officer asked permission to enter apartment 6, and appellant replied, "Go ahead." Appellant and the two officers entered the apartment.
At this point, the two surveillance officers from the Ho Hum Motel arrived, and one of them asked appellant for permission to search the apartment. The officer "advised [appellant] that he did not have to give ... permission, that if he wished to refuse he could," and "if he did not wish to give ... permission [the officers] would attempt to obtain a search warrant." According to the officers, appellant agreed to this search of his apartment which revealed nine balloons of heroin, various narcotic paraphernalia, and a revolver.
Appellant and the occupants of apartments 3 and 5 of the Ho Hum Motel testified for the defense at the hearing. Their testimony indicated that appellant had spent the afternoon in apartment 3 and had not gone into apartment 5 on the day of his arrest. Further, appellant testified the officers did not ask for, and he did not give, consent to enter or search his apartment.
After hearing this evidence, the judge in Department South D denied the motion to suppress and set the trial for October 14th. The prosecutor was not ready to proceed on that date, and appellant reiterated his desire to remove his deputy public defender, stating he wished "to go pro per." The judge transferred the case back to Department South J for hearing "forthwith" on the motion regarding representation and for trial on November 20th.
*465 In Department South J, the hearing on the representation motion was continued by the master calendar judge several times before it was heard on October 28th. Appellant again stated he wished "to go pro per." The court discussed at length the problems of self-representation, and appellant acknowledged he understood but stated he was "willing to gamble." The court allowed him to proceed in propria persona after finding a knowing, intelligent, and voluntary waiver of the right to counsel.
On January 5, 1976, after additional continuances of the trial, the master calendar judge transferred the case to Department South D "for trial forthwith." The judge who presided at the motion to suppress was still sitting in that department. Appellant's case was called in Department South D and, after some brief proceedings, was adjourned to the following day for jury selection. Directly after adjournment, appellant filed with the clerk in Department South D a declaration pursuant to Code of Civil Procedure section 170.6 to disqualify the judge in that department. On January 6th, that judge denied the section 170.6 motion as "not filed timely," and the trial commenced.
Appellant was convicted of the weapon offense and of possession of heroin (Health & Saf. Code, § 11350, an offense necessarily included in possession for sale of heroin), and the prior convictions were found to be true. The court sentenced appellant to consecutive state prison terms for these offenses.

II
(1) Appellant contends initially that the trial judge erred in ruling his motion to disqualify was "not filed timely."[1] This contention lacks merit.
Code of Civil Procedure section 170.6 generally provides for the automatic disqualification of any "judge ... of any superior, municipal or justice court ... when it shall be established as [herein] provided that such judge ... is prejudiced against any party or attorney or the interest of any party or attorney appearing in [any] action or proceeding." *466 Prejudice is "established" when an oral or written affidavit is timely[2] filed by a party or an attorney declaring, in "substantially" the words of the statute, that the party or attorney "cannot or believes he cannot have a fair and impartial trial or hearing before such judge...." (Code Civ. Proc., § 170.6, subds. (2), (5) and (6).) If disqualified, the judge may neither try the case nor "hear any matter therein which involves a contested issue of law or fact." However, the judge may participate in any nontrial proceeding that does not involve such an issue. (Thompson v. Superior Court (1962) 206 Cal. App.2d 702, 708-709 [23 Cal. Rptr. 841].)
The Attorney General contends that appellant's motion to disqualify should have been made before the master calendar judge at the time he assigned the case out for trial on January 5th. This contention is based on the third sentence of subdivision (2) of section 170.6: "If directed to the trial of a cause where there is a master calendar, the motion [to disqualify under section 170.6] shall be made to the judge supervising the master calendar not later than the time the cause is assigned for trial."
From the record in the present case, it is clear the superior court was operating with a "master calendar department system" on January 5th when this case was assigned to Department South D for trial "forthwith." Since the motion to disqualify was not made before the master calendar judge, the motion was untimely.[3]


*467 III
(2) Appellant's next contention is that his motion to suppress was improperly denied in that his consent to search was involuntarily obtained. Although he concedes there was substantial evidence to support the trial court's implied determination that consent was requested by the officers and given by appellant, he argues that "the evidence of duress [was] more than adequate to overcome the weight of evidence offered in support of a conclusion of free and voluntary consent."
Recently, this court held in a similar case that a trial court did not err when it held consent was voluntary. In People v. James (1977) 19 Cal.3d 99 [137 Cal. Rptr. 447, 561 P.2d 1135], four police officers went to an individual's home to arrest him for robbery. When he responded to their knocking, the officers asked him to step outside, arrested him, handcuffed him, and requested permission to search his house. The police did not advise him of his right to refuse to agree to the search. The trial court found that consent was voluntary.
Appellant's consent was given under less coercive circumstances than in James. Appellant was under detention rather than arrest, was not handcuffed, and had been advised of his right to refuse to consent. Appellant fails to show why James does not control under these facts.

IV
(3) Appellant contends further that the court abused its discretion by initially granting appellant's motion to represent himself and by subsequently failing to appoint counsel sua sponte during the trial. These contentions lack merit. A trial court has no discretion to deny an accused's valid motion for self-representation.
The Sixth Amendment of the United States Constitution "implies a right of self-representation" for an accused in a criminal case. (Faretta v. California (1975) 422 U.S. 806, 821 [45 L.Ed.2d 562, 574, 95 S.Ct. 2525].) This right may be invoked by an accused who "knowingly and intelligently" waives "the traditional benefits associated with the right to counsel." (Id., at p. 835 [45 L.Ed.2d at p. 581].) The accused's "technical legal knowledge, as such, [is] not relevant to an assessment of his knowing exercise of the right to defend himself." (Id., at p. 836 [45 L.Ed.2d at p. 582].) Rather, the accused "should be made aware of the dangers and disadvantages of self-representation, so that the record will establish that *468 `he knows what he is doing and his choice is made with eyes open.'" (Id., at p. 835 [45 L.Ed.2d at p. 582].) If, after being thus appraised, the accused wishes to waive the right to counsel and represent himself, he must be permitted to do so.[4] (People v. Windham (1977) 19 Cal.3d 121, 128 [137 Cal. Rptr. 8, 560 P.2d 1187].)
The record in the present case shows compliance with these principles. The master calendar judge engaged appellant in a lengthy discussion of the difficulties he would face as an unskilled legal practitioner, but appellant steadfastly maintained he was "willing to gamble." Since appellant's decision was clearly knowing and intelligent, the judge was bound to grant appellant's request. It is irrelevant that the motion was heard after the trial had been continued, since it preceded the actual commencement of the trial (cf. Windham, supra).
It would not have been permissible for the trial judge to have acted sua sponte and imposed counsel upon appellant during the trial without his consent. Such a procedure, in effect, would render the Faretta decision meaningless, since it would condition the exercise of the right to self-representation on the trial court's exercise of discretion. This is precisely the defect that was condemned in Faretta.[5]

V
(4a) Next, appellant contends reversible error occurred when the trial court refused to require the prosecution to disclose the identity of the person who had given the information leading to the surveillance of the Ho Hum Motel.
(5) It is well established that the prosecution must disclose the identity of an informant who is a "material witness" in a criminal case. Failure to do so results in the dismissal of charges against the defendant. (Eleazer v. Superior Court (1970) 1 Cal.3d 847, 851 [83 Cal. Rptr. 586, 464 P.2d 42].) An informant is a "material witness" if it appears from the evidence presented that there is a reasonable possibility the informant could give evidence on the issue of guilt which might result in a defendant's exoneration. (People v. Borunda (1974) 11 Cal.3d 523, 527 *469 [113 Cal. Rptr. 825, 522 P.2d 1].) However, an informant is not a material witness when "`he simply points the finger of suspicion toward a person who has violated the law....'" (People v. McShann (1958) 50 Cal.2d 802, 808 [330 P.2d 33].)
(4b) The informant in the present case was not a material witness under these standards, because there was no "reasonable possibility that [the informant] could give evidence bearing on [appellant's] guilt...."[6] (People v. Tolliver (1975) 53 Cal. App.3d 1036, 1043 [125 Cal. Rptr. 905].) Here, the informant's sole relationship to the case was to provide partial justification for appellant's detention. This was a separate issue which had been adjudicated at the pretrial hearing on the motion to suppress. (People v. O'Brien (1969) 71 Cal.2d 394, 403 [78 Cal. Rptr. 202, 79 Cal. Rptr. 313, 455 P.2d 138, 456 P.2d 969].) Further, the prosecutor did not attempt to inject this issue into the trial.[7] (People v. Aguilar (1971) 16 Cal. App.3d 1001, 1006-1007 [94 Cal. Rptr. 492].) Therefore, the trial court was not required to order the disclosure of the identity of the informant.

VI
Finally, appellant contends that for purposes of determining his minimum prison term the judgment should be modified to reflect two prior felony convictions instead of four, since three of the convictions grew out of a single, multi-count information. At the time appellant was sentenced, Penal Code section 3024, subdivision (c)[8] set a minimum term of two years for a person sentenced to prison after conviction of a felony, who had been "previously convicted of a felony in this state or elsewhere." Since under this section it is immaterial how many prior felony convictions appellant suffered and since he was not accused or convicted of being an habitual criminal (see former Pen. Code, § 644[9]), it *470 is irrelevant whether appellant had two prior convictions (as he concedes) or four.
(6) However, the judgment is in error since as to count 2 (possession of a concealable firearm by a person previously convicted of a felony (Pen. Code, § 12021)) it allows the same priors to be used both as an element of the substantive offense and to enhance punishment for that same offense. This practice was condemned in People v. Perry (1974) 42 Cal. App.3d 451, 457-460 [116 Cal. Rptr. 853].

VII
Since appellant's motion to disqualify the trial judge was untimely and since none of his remaining contentions warrants reversal, the judgment of conviction is affirmed; except that as to count 2, the judgment is modified to provide that the prior convictions shall not enhance punishment on that count. (Pen. Code, § 1203 and former § 3024.)
Tobriner, J., Mosk, J., Clark, J., Richardson, J., Manuel, J., and Jefferson, J.,[*] concurred.
NOTES
[1]  There has been no claim that appellant's attempt to invoke section 170.6 was technically deficient on its face. The sole issue presented is one of timeliness.
[2]  The provisions regarding timeliness are set forth in sentences 2 through 7 of subdivision (2) of Code of Civil Procedure section 170.6, which provide in pertinent part: "Where the judge ... assigned to or who is scheduled to try the cause or hear the matter is known at least 10 days before the date set for trial or hearing, the motion shall be made at least five days before that date. If directed to the trial of a cause where there is a master calendar, the motion shall be made to the judge supervising the master calendar not later than the time the cause is assigned for trial. In no event shall any judge ... entertain such motion if it be made after the drawing of the name of the first juror, or if there be no jury, after the making of an opening statement by counsel for plaintiff, or if there be no such statement, then after swearing in the first witness or the giving of any evidence or after trial of the cause has otherwise commenced. If the motion is directed to a hearing (other than the trial of a cause), the motion must be made not later than the commencement of the hearing. In the case of trials or hearings not herein specifically provided for, the procedure herein specified shall be followed as nearly as may be. The fact that a judge ... has presided at or acted in connection with a pretrial conference or other hearing, proceeding or motion prior to trial and not involving a determination of contested fact issues relating to the merits shall not preclude the later making of the motion provided for herein at the time and in the manner hereinbefore provided."
[3]  It is also asserted that the section 170.6 motion was untimely because the trial judge had already heard appellant's motion to suppress evidence and could not thereafter be disqualified. (See Code Civ. Proc., § 170.6, subd. (2), 7th sentence.) This court does not reach the merits of that contention, since the motion to disqualify was properly denied under the master calendar provision of section 170.6.
[4]  A defendant who chooses to represent himself must be competent to make that decision, but nothing in the record or the briefs suggests appellant was incompetent.
[5]  In an appropriate case, there might arise a duty for a trial judge to reexamine whether the accused wished to continue exercising his right of self-representation.
[6]  Since the request for disclosure was made during the course of appellant's trial, the materiality of the witness to the pretrial motion to suppress was not presented. (Cf. People v. Shipstead (1971) 19 Cal. App.3d 58 [96 Cal. Rptr. 513]; Theodor v. Superior Court (1972) 8 Cal.3d 77, 104-105 [104 Cal. Rptr. 226, 501 P.2d 234].)
[7]  The basis for appellant's detention was elicited at trial by cross-examination of the prosecution's witness.
[8]  The Legislature has repealed section 3024 in its entirety, effective July 1, 1977. (Stats. 1976, ch. 1139, § 279, p. 5151.)
[9]  Former Penal Code section 644, which was repealed by the Legislature effective July 1, 1977 (Stats. 1976, ch. 1139, § 261.5, p. 5136), provided for augmented punishment of "habitual criminals." The section specified that in determining whether a defendant was an habitual criminal, consideration could be given only to those enumerated prior felony convictions which had been "separately brought and tried" and which resulted in "separate terms ... in any state prison and/or federal penal institution."
[*]   Assigned by the Chairperson of the Judicial Council.
