[alsa-devel] [PATCH 2/4] ALSA: ctl: fix a bug to return no identical information in

Takashi Sakamoto o-takashi at sakamocchi.jp
Wed Apr 8 19:07:16 CEST 2015


In operations of SNDRV_CTL_IOCTL_ELEM_INFO, identical information in
returned value is cleared. This is not better to userspace application.

This commit confirms to return full identical information to the
operations.

Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
 sound/core/control.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/core/control.c b/sound/core/control.c
index 6d12e85..37203a6 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1042,6 +1042,8 @@ static int snd_ctl_elem_user_info(struct snd_kcontrol *kcontrol,
 	struct user_element *ue = kcontrol->private_data;
 
 	*uinfo = ue->info;
+	uinfo->id = kcontrol->id;
+
 	return 0;
 }
 
@@ -1055,6 +1057,7 @@ static int snd_ctl_elem_user_enum_info(struct snd_kcontrol *kcontrol,
 	item = uinfo->value.enumerated.item;
 
 	*uinfo = ue->info;
+	uinfo->id = kcontrol->id;
 
 	item = min(item, uinfo->value.enumerated.items - 1);
 	uinfo->value.enumerated.item = item;
-- 
2.1.0



More information about the Alsa-devel mailing list