summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-04-11 11:41:02 +0300
committerTakashi Iwai <tiwai@suse.de>2015-04-11 18:31:31 +0300
commitc78497e010ae62c8abfb33a45d0e0b361218e9bb (patch)
tree571bd29336e45b0319810ebb654911c862f468b9 /sound
parentfa863b2d5e62e2ea7d86ccfa9a888bd28dd79ebe (diff)
downloadlinux-c78497e010ae62c8abfb33a45d0e0b361218e9bb.tar.xz
ALSA: ctl: confirm to return all identical information in 'activate' event
When event originator doesn't set numerical ID in identical information, the event data includes no numerical ID, thus userspace applications cannot identify the control just by unique ID in event data. This commit fix this bug so as the event data includes all of identical information. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 00fcaa0ca647..90a9e5d9819a 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -578,6 +578,7 @@ error:
*
* Finds the control instance with the given id, and activate or
* inactivate the control together with notification, if changed.
+ * The given ID data is filled with full information.
*
* Return: 0 if unchanged, 1 if changed, or a negative error code on failure.
*/
@@ -607,6 +608,7 @@ int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
goto unlock;
vd->access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
}
+ snd_ctl_build_ioff(id, kctl, index_offset);
ret = 1;
unlock:
up_write(&card->controls_rwsem);