aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-07 10:44:06 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:44:08 -0500
commita07a949be6eb1c9aab06adaadce72dbd27b7d9cb (patch)
tree728f1ff2218cf11fc4440878440a93ae143a994c /sound/pci/hda/hda_generic.h
parentaffdb62b815b38261f09f9d4ec210a35c7ffb1f3 (diff)
ALSA: hda - Fix multi-io channel mode management
The multi-io channels can vary not only from 1 to 6 but also may vary from 6 to 8 or such. At the same time, there are more speaker pins available than the primary output pins. So, we need three variables to check: the minimum channel counts for primary outputs, the current channel counts for primary outputs, and the minimum channel counts for all outputs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.h')
-rw-r--r--sound/pci/hda/hda_generic.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 00a1eab2c0b2..b65769cbde2b 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -117,8 +117,20 @@ struct hda_gen_spec {
117 unsigned int cur_mux[3]; 117 unsigned int cur_mux[3];
118 118
119 /* channel model */ 119 /* channel model */
120 int const_channel_count; /* min. channel count (for speakers) */ 120 /* min_channel_count contains the minimum channel count for primary
121 int ext_channel_count; /* current channel count for multi-io */ 121 * outputs. When multi_ios is set, the channels can be configured
122 * between min_channel_count and (min_channel_count + multi_ios * 2).
123 *
124 * ext_channel_count contains the current channel count of the primary
125 * out. This varies in the range above.
126 *
127 * Meanwhile, const_channel_count is the channel count for all outputs
128 * including headphone and speakers. It's a constant value, and the
129 * PCM is set up as max(ext_channel_count, const_channel_count).
130 */
131 int min_channel_count; /* min. channel count for primary out */
132 int ext_channel_count; /* current channel count for primary */
133 int const_channel_count; /* channel count for all */
122 134
123 /* PCM information */ 135 /* PCM information */
124 struct hda_pcm pcm_rec[3]; /* used in build_pcms() */ 136 struct hda_pcm pcm_rec[3]; /* used in build_pcms() */