diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-07 19:44:06 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 11:44:08 +0400 |
commit | a07a949be6eb1c9aab06adaadce72dbd27b7d9cb (patch) | |
tree | 728f1ff2218cf11fc4440878440a93ae143a994c /sound/pci/hda/hda_generic.h | |
parent | affdb62b815b38261f09f9d4ec210a35c7ffb1f3 (diff) | |
download | linux-a07a949be6eb1c9aab06adaadce72dbd27b7d9cb.tar.xz |
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.h | 16 |
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 { unsigned int cur_mux[3]; /* channel model */ - int const_channel_count; /* min. channel count (for speakers) */ - int ext_channel_count; /* current channel count for multi-io */ + /* min_channel_count contains the minimum channel count for primary + * outputs. When multi_ios is set, the channels can be configured + * between min_channel_count and (min_channel_count + multi_ios * 2). + * + * ext_channel_count contains the current channel count of the primary + * out. This varies in the range above. + * + * Meanwhile, const_channel_count is the channel count for all outputs + * including headphone and speakers. It's a constant value, and the + * PCM is set up as max(ext_channel_count, const_channel_count). + */ + int min_channel_count; /* min. channel count for primary out */ + int ext_channel_count; /* current channel count for primary */ + int const_channel_count; /* channel count for all */ /* PCM information */ struct hda_pcm pcm_rec[3]; /* used in build_pcms() */ |