]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: Fix channel map query when there are lots of maps
authorAnssi Hannula <anssi.hannula@iki.fi>
Sun, 8 Jun 2014 09:58:56 +0000 (12:58 +0300)
committerTakashi Iwai <tiwai@suse.de>
Sun, 8 Jun 2014 10:02:59 +0000 (12:02 +0200)
On most HDA Intel HDMI devices, the channel map list is approx. 500 ints
in size, making the 256-sized buffer used by
snd_pcm_query_chmaps_from_hw() too small and causing the query to fail
(NULL result to caller, ENOMEM).

Bump the buffer size to 2048 ints.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_hw.c

index 9ff83a92c41e58bb254e709120a88484f44fa4ba..ed8319728130f9e32aaa6c929dec61bbbb214f53 100644 (file)
@@ -1051,7 +1051,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
 {
        snd_ctl_t *ctl;
        snd_ctl_elem_id_t *id;
-       unsigned int tlv[256], *start;
+       unsigned int tlv[2048], *start;
        snd_pcm_chmap_query_t **map;
        int i, ret, nums;