diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-02-08 08:39:44 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-08 09:31:09 -0500 |
commit | d34890cf4113397625a6629d71749fa638a7a734 (patch) | |
tree | acce8f4357e7e20de216e3b00b1810bd190bbca4 /sound/core/control.c | |
parent | 12865cac38cc9e808ce8b479f4bb12fd00bfee7c (diff) |
ALSA: control: fix failure to return numerical ID in 'add' event
Currently when adding a new control, the assigned numerical ID is not
set for event data, thus userspace applications cannot realize it just
by event data.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control.c')
-rw-r--r-- | sound/core/control.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 60caba1f2211..8aae6eaa3564 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -373,6 +373,7 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) | |||
373 | card->controls_count += kcontrol->count; | 373 | card->controls_count += kcontrol->count; |
374 | kcontrol->id.numid = card->last_numid + 1; | 374 | kcontrol->id.numid = card->last_numid + 1; |
375 | card->last_numid += kcontrol->count; | 375 | card->last_numid += kcontrol->count; |
376 | id = kcontrol->id; | ||
376 | count = kcontrol->count; | 377 | count = kcontrol->count; |
377 | up_write(&card->controls_rwsem); | 378 | up_write(&card->controls_rwsem); |
378 | for (idx = 0; idx < count; idx++, id.index++, id.numid++) | 379 | for (idx = 0; idx < count; idx++, id.index++, id.numid++) |