From: Anssi Hannula Date: Sun, 8 Jun 2014 09:58:56 +0000 (+0300) Subject: pcm: Fix channel map query when there are lots of maps X-Git-Tag: v1.0.28~10 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=042223c4ee9b17ba8a24bcfc4019f24b69b8310b;p=alsa-lib.git pcm: Fix channel map query when there are lots of maps 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 Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 9ff83a92..ed831972 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -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;