浏览代码

ALSA: control: fix failure to return new numerical ID in 'replace' event data

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>
Takashi Sakamoto 11 年之前
父节点
当前提交
e6ff3840dc
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/core/control.c

+ 1 - 0
sound/core/control.c

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