alsa: Fix SND_MIXER_SCHN_LAST related stuff.

Valid channel id range is from 0 to SND_MIXER_SCHN_LAST,
inclusive, so the size of the masks array in pa_alsa_element
has to be SND_MIXER_SCHN_LAST + 1. Similar "too small"
arrays were also in alsa-sink's and alsa-source's userdata,
but actually those arrays were not used at all so they were
removed.

element_is_subset() in alsa-mixer.c skipped the last channel
id when iterating the element masks array; that's now fixed
as well.

Thanks to David Henningsson for spotting the too small
arrays in alsa-sink and alsa-source and the
element_is_subset() problem.
This commit is contained in:
Tanu Kaskinen 2012-03-26 14:35:30 +03:00 committed by Tanu Kaskinen
parent 191d60688d
commit 5a26404f12
4 changed files with 3 additions and 7 deletions

View file

@ -127,8 +127,6 @@ struct userdata {
pa_rtpoll_item *alsa_rtpoll_item;
snd_mixer_selem_channel_id_t mixer_map[SND_MIXER_SCHN_LAST];
pa_smoother *smoother;
uint64_t read_count;
pa_usec_t smoother_interval;