The accuracy of the sensory neural code depends on the relationship between variability in population activity caused by the stimuli versus variability caused by noise. Whereas a large body of work has addressed this issue at a theoretical level, there have been few systematic empirical investigations using large-scale simultaneous recordings. We studied the geometry of the population code in the rat auditory cortex using sound stimuli varying across two orthogonal dimensions: the difference in sound level between the two ears, and the average level across the ears. We quantified the structure of the code across recordings spanning a wide range of brain states along the activation/inactivation continuum. We found that the nature of the code, both in terms of the stimulus and the noise subspaces, depends strongly on the degree of cortical activation. During the inactive (or synchronized) state, the code is characterized by a prevalence of contra-lateral tuning, a preference for loud sounds, gain-modulated tuning curves and coherent global noise fluctuations overlapping with the signal subspace. In contrast, in the most active (or desynchronized) recordings, there is an approximately symmetric preference between contra-, ipsi-, quiet and loud sounds, no systematic changes in the gain of lateralization tuning curves by sound intensity, and noise fluctuations span dimensions orthogonal to those evoked by the stimuli. Logistic regression could predict the sound lateralization with accuracy similar to the behaving rats, but only during cortical activation. Furthermore, also exclusively during the active state, the lateralization of sounds of different overall level could be decoded with the same accuracy, even by the same decoder, due to an orthogonal representation of level-differences and overall level across the population. Decoding accuracy from surrogate datasets with independent noise across neurons still displays strong state-dependence, suggesting that tuning curve reorganization plays a critical role in the overall effect of brain state on the population code. Our results provide an empirical foundation for the geometry and state dependence of cortical population codes.