In commenting on a recent LL post, Daddy G. asked
Does the term "code-switching" apply ONLY to those instances when the practice is consciously employed for effect? Or is the term more generally applied to the switching itself, regardless of whether or not there is conscious control involved?
With respect to the use of the term, the answer is simple. From the beginning — the classical reference is John Gumperz, "Linguistic and Social Interaction in Two Communities", American Anthropologist, 66(S3): 137-153, 1964 — the term "code switching" has been used to refer to what speakers do, not whether they do it consciously.
Specifically, "code-switching" is generally used to refer to the choice among languages in a multi-lingual situation, though it is also sometimes used to refer to choice among variants of a single language. It's true that linguists often talk about "decision" and "choice" in a way that evokes conscious selection among alternatives. Thus Gumperz:
The structure of verbal repertoires … includes a much greater number of alternants, reflecting contextual and social differences in speech. Linguistic interaction … can be most fruitfully viewed as a process of decision making, in which speakers select from a range of possible expressions. The verbal repertoire then contains all the accepted ways of formulating messages. It provides the weapons of everyday communication. Speakers choose among this arsenal in accordance with the meanings they wish to convey.
But this way of talking doesn't really imply that the "choices" are conscious ones. The arsenal of linguistic weapons, in Gumperz' military metaphor, includes not only alternative languages, but also alternative sentence structures, alternative word choices, alternative inflectional forms, alternative pronunciations, alternative intonation patterns and speech rates, and so on. Clearly, these are choices; but equally clearly, we're rarely conscious of the thousands of decisions among gazillions of alternatives that we're implicitly making when we speak. Nor should we be — you could write a book about all the considerations that bear on the first word of your first phrase; and by then, your interlocutor would probably have gone on to other things.
As Gumperz observed, these choices are constrained, or at least correlated, in many ways. Speakers are largely unaware of these relationships; and such awareness as they have is often mistaken. From a certain point of view, linguistics is an attempt to describe and explain these correlations among choices, and between them and the extralinguistic context.