diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 2fe2ae4..cf10aa1 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -1641,17 +1641,17 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) { return -1; } - if (e->n_channels > 2) { + if (e->n_channels > 8) { /* FIXME: In some places code like this is used: * * e->masks[alsa_channel_ids[p]][e->n_channels-1] * * The definition of e->masks is * - * pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2]; + * pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][8]; * - * Since the array size is fixed at 2, we obviously - * don't support elements with more than two + * Since the array size is fixed at 8, we obviously + * don't support elements with more than eight * channels... */ pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels); return -1; diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h index ec39fab..1d4f51f 100644 --- a/src/modules/alsa/alsa-mixer.h +++ b/src/modules/alsa/alsa-mixer.h @@ -144,7 +144,7 @@ struct pa_alsa_element { long volume_limit; /* -1 for no configured limit */ double min_dB, max_dB; - pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2]; + pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][8]; unsigned n_channels; pa_channel_position_mask_t merged_mask;