]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ALSA: control: fix failure to return new numerical ID in 'replace' event data
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 9 Feb 2015 15:01:45 +0000 (00:01 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Feb 2015 15:23:25 +0000 (16:23 +0100)
In 'replace' event data, numerical ID of control is always invalid. This
commit fix this bug so as the event data has renewed numerical ID for
control.

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

index 8aae6eaa3564f773022db871abc32a1a46842a98..35324a8e83c867f126256f67b493b5320b9652c7 100644 (file)
@@ -440,6 +440,7 @@ add:
        card->controls_count += kcontrol->count;
        kcontrol->id.numid = card->last_numid + 1;
        card->last_numid += kcontrol->count;
+       id = kcontrol->id;
        count = kcontrol->count;
        up_write(&card->controls_rwsem);
        for (idx = 0; idx < count; idx++, id.index++, id.numid++)