On Tue, 2016-03-01 at 11:41 +0100, David Henningsson wrote: > The volume_use is set to ignore, but we continue the volume parsing > code, potentially referencing somewhere outside the array (which has > max two channels). > > Signed-off-by: David Henningsson <david.henningsson at canonical.com> > --- > Â src/modules/alsa/alsa-mixer.c | 1 + > Â 1 file changed, 1 insertion(+) > > diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c > index 1fe2a02..c0ab1ba 100644 > --- a/src/modules/alsa/alsa-mixer.c > +++ b/src/modules/alsa/alsa-mixer.c > @@ -1768,6 +1768,7 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) { > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â * 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); > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â e->volume_use = PA_ALSA_VOLUME_IGNORE; > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â e->n_channels = 2; I don't like setting e->n_channels to 2, the value has nothing to do with reality. The real bug is that we continue inspecting the element after we have decided to ignore it. The refactoring patch seems to fix the bug properly (it still sets n_channels to 2, but that can be removed). I didn't review the refactoring patch properly yet, I'll try to do it soon. --Â Tanu