ALSA: aloop: Fix initialization of controls
authorJonas Holmberg <jonashg@axis.com>
Wed, 7 Apr 2021 07:54:28 +0000 (09:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:41:56 +0000 (08:41 +0200)
commit6efe4c1f4d17f3d201ba698d4b578cc0d23bd2d4
treefe1dc1334ce28d78cdd24fe982c6e4ca0d18f055
parent4c933ff31f21279decea51e9ef5c192f40ece8a0
ALSA: aloop: Fix initialization of controls

commit 168632a495f49f33a18c2d502fc249d7610375e9 upstream.

Add a control to the card before copying the id so that the numid field
is initialized in the copy. Otherwise the numid field of active_id,
format_id, rate_id and channels_id will be the same (0) and
snd_ctl_notify() will not queue the events properly.

Signed-off-by: Jonas Holmberg <jonashg@axis.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210407075428.2666787-1-jonashg@axis.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/aloop.c