@@ -46,6 +46,7 @@ struct snd_kcontrol_new {
unsigned int index; /* index of item */
unsigned int access; /* access rights */
unsigned int count; /* count of same elements */
+ unsigned int kcontrol_type;
snd_kcontrol_info_t *info;
snd_kcontrol_get_t *get;
snd_kcontrol_put_t *put;
@@ -65,6 +66,7 @@ struct snd_kcontrol {
struct list_head list; /* list of controls */
struct snd_ctl_elem_id id;
unsigned int count; /* count of same elements */
+ unsigned int kcontrol_type;
snd_kcontrol_info_t *info;
snd_kcontrol_get_t *get;
snd_kcontrol_put_t *put;
@@ -268,6 +268,8 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
}
kctl->id.index = ncontrol->index;
+ kctl->kcontrol_type = ncontrol->kcontrol_type;
+
kctl->info = ncontrol->info;
kctl->get = ncontrol->get;
kctl->put = ncontrol->put;
Current kcontrol structs don't have a member to describe the control type. The type is present in the widget which contains the control. As there can be many controls in one widget it is inherently presumed that the control types are the same. Lately there has been use cases where different types of controls would be needed for single widget. Thus enable this by adding the control type to kcontrol and kcontrol_new structs. Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> --- include/sound/control.h | 2 ++ sound/core/control.c | 2 ++ 2 files changed, 4 insertions(+)