]> code.delx.au - pulseaudio/commit
alsa: Fix SND_MIXER_SCHN_LAST related stuff.
authorTanu Kaskinen <tanu.kaskinen@digia.com>
Mon, 26 Mar 2012 11:35:30 +0000 (14:35 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Wed, 28 Mar 2012 14:32:04 +0000 (17:32 +0300)
commit5a26404f12045c37988f53e2cd25004539476ca7
tree0b6b368ca60d45a259d49a1bc7bc4aeb070cdd10
parent191d60688d18591acb3b0ddeafb870a2b1007429
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.
src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-mixer.h
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c