ALSA: aloop: Fix initialization of controls
authorJonas Holmberg <jonashg@axis.com>
Wed, 7 Apr 2021 07:54:28 +0000 (09:54 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 7 Apr 2021 08:21:25 +0000 (10:21 +0200)
commit168632a495f49f33a18c2d502fc249d7610375e9
treed3fd4a9bb933edce047e9652ff8f30ae713174d6
parentc6423ed2da6214a68527446b5f8e09cf7162b2ce
ALSA: aloop: Fix initialization of controls

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>
sound/drivers/aloop.c