]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: control: remove entry limitation for list operation
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 24 May 2017 01:04:30 +0000 (10:04 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 May 2017 08:18:28 +0000 (10:18 +0200)
In current implementation of ALSA control core, list operation has
a limitation to handle 16384 entries at once. This seems due to
allocation in kernel space to copy data from user space.

With a commit 53e7bf452584 ("ALSA: control: Simplify snd_ctl_elem_list()
implementation"), for the operation, ALSA control core copies data
into user space directly. No need to care of kernel spaces anymore.

This commit purges the limitation.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/control.c

index 47080da8451a60442e48f481250a3f1fc61776af..ecd358213b83f468d9937b296debc2d3a6589a1f 100644 (file)
@@ -757,9 +757,7 @@ static int snd_ctl_elem_list(struct snd_card *card,
                return -EFAULT;
        offset = list.offset;
        space = list.space;
-       /* try limit maximum space */
-       if (space > 16384)
-               return -ENOMEM;
+
        down_read(&card->controls_rwsem);
        list.count = card->controls_count;
        list.used = 0;